![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi, I've tried to write a program to validate all my dicts in all my files on my system (we are porting from mvbase to unidata). Basically i've tried selecting all files, then selecting all dicts per file, then list file dict and checking the output. The problem is, when executing a virtual dict which is invalid the program bombs out; LIST PLANNINGMZ TEST 10:29:27 10 JUL 2006 1 PLANNINGMZ TEST................ 'BPUSER TESTTESTTEST' is not cataloged. Virtual Attribute Error: BPUSER TESTTESTTEST Indirect call error. I thought about using COMPILE.DICT, but that seems to just check the syntax. Any ideas anyone? Thanks. |
#3
| |||
| |||
|
#4
| |||
| |||
|
|
Have you tried using a statement such as EXECUTE 'LIST PLANNINGMZ TEST' CAPTURING CCCC RETURNING RRRR in your test program, and you can then inspect the contents of CCCC and/or RRRR to see whether it blew up or not. Regards Malcolm Bull |
ICTLIST<I>
#5
| |||
| |||
|
|
Is your virtual dict calling a subroutine ? - ie.. the BPUSER TESTTESTTEST entry. If so you will need to compile and catalog all of these as well first. rgds Symeon. |
#6
| |||
| |||
|
|
MBTraining (AT) aol (DOT) com wrote: Have you tried using a statement such as EXECUTE 'LIST PLANNINGMZ TEST' CAPTURING CCCC RETURNING RRRR in your test program, and you can then inspect the contents of CCCC and/or RRRR to see whether it blew up or not. Regards Malcolm Bull Hi Malcolm, russell_a_brooke (AT) yahoo (DOT) co.uk wrote: That's what i tried to do to start off with. Problem is that if you execute a LIST PLANNINGMZ TEST and the TEST is a duff virtual dict, the program bombs out to tcl. Try doing this to see what i mean; 1. CREATE a tempfile called RBTEMP 2. Create 2 duff dicts called TEST1 and TEST2 (See dict example) 3. Cut and paste code and run (See code example) You'll see the program bombs out after trying to execute the first duff statement. I want the program to carry on. Dict Example duff dicts; TEST1 and TEST2 0001 V 0002 SUBR("NOTGOINGTOWORK",@ID) 0003 0004 RBTEMP 0005 40L 0006 M 0007 Program Example PROMPT "" OPEN "DICT","RBTEMP" TO RBTEMP ELSE STOP COMMAND = "SSELECT DICT RBTEMP" EXECUTE COMMAND CAPTURING OUTPUT DICTLIST = "" LOOP READNEXT KEY ELSE KEY = "" UNTIL KEY = "" DO DICTLIST = DICTLIST : KEY :@AM REPEAT NOOFITEMS = DCOUNT(DICTLIST,@AM) NOOFITEMS = NOOFITEMS - 1 * FOR I = 1 TO NOOFITEMS COMMAND = "LIST RBTEMP " ICTLIST<ICRT COMMAND EXECUTE COMMAND CAPTURING OUTPUT RETURNING ERROR CRT OUTPUT<1 COMMAND = "Q" EXECUTE COMMAND CAPTURING OUTPUT RETURNING ERROR NEXT I * |
#7
| |||
| |||
|
|
Symeon wrote: Is your virtual dict calling a subroutine ? - ie.. the BPUSER TESTTESTTEST entry. If so you will need to compile and catalog all of these as well first. rgds Symeon. Hi Symeon, Thanks for the reply. I know the program in the being called from the dict should be compiled and cataloged. I'm trying to write a program which will check all files, all dicts, check the output and then create a list of dicts to correct. There are about 50,000 dicts in total against all files which is why i'm writing a program auto validate all dicts in all files. Thanks. |
#8
| |||
| |||
|
|
Start a phantom process to execute the command, then check the phantom process log, aka the _PH_ file. -- frosty |
#9
| |||
| |||
|
| Start a phantom process to execute the command, then check the phantom process log, aka the _PH_ file. -- frosty Good plan, i'll give that a go. Thanks. Russ |
![]() |
| Thread Tools | |
| Display Modes | |
| |