Debugging EXEC Procedures
If you have difficulty getting anEXEC procedure to execute properly, or
if you are modifying an existingEXEC and wish to test it, there are a
couple of simple techniques that you can use thatmay save you time. One is to place the &CONTROL ALL control statement at the top of your EXEC file. When &CONTROL ALL is in effect, all the EXEC control
statements are displayed before they execute, as well as theCMS command
lines.One of the advantages of using this method is that the line is
displayed after it is scanned, so that you can see the results of symbol
and variable substitution.
"StackingEXEC Files" in "Section 14. Building EXEC Procedures"
described aPREFIX EXEC, which changes the prefixes of groups of files.
If theEXEC had an &CONTROL ALL statement, it might execute as follows:
prefix pt ag&CONTROL ALL &LNAME = &CONCAT PT *
LISTFILEPT* SCRIPT * ( EXEC EXEC CMS &STACK &LOOP -END &READFLA EQ CONSOLE LOOP UNTIL: STAC K EQ CONS &READ VARS &NAME &TYPE &MOD &SUFFIX = &SUBSTR PTA 3 6 &NEWNAM = &CONCAT AG A
RENAMEPTA SCRIPT 11 IGI SCRIPT 11 &IF 0 EQ 0 &SKIP &SKIP LOOP UNTIL: STAC K EQ CONS &READ VARS &HAME &TYPE &MOD &SUFFIX = &SUBSTR PTB 3 6 &NEWNAM = &CONCAT AG B RENAME PTB SCRIPT A1 AGB SCRIPT 11 &IF 0 EQ 0 &SKIP &SKIP LOOP UNTIL: CONS OLE EQ CONS R; You can see from this execution summary that the files named PTA SCRIPT and PTB SCRIPT are renamed to AGI SCRIPT and AGB SCRIPT. Notice that
the&LOOP statement results in a special LOOP UNTIL statement in the
executionsummary, which indicates the condition under which the loop
executes.USING CMS SUBSET When you are using the CMS editor to create or modify an EXEC procedure,
you can test theEXEC in the CMS subset environment, as long as the EXEC does not issue any CMS commands that are invalid in CMS subset.
Before enteringCMS subset with the CMS subcommand, you must issue
theSAVE subcommand to write the current version of the EXEC onto disk;
then, inCMS subset, execute the EXEC. For example: 308 IBM VM/370 CMS User's Guide
If you have difficulty getting an
if you are modifying an existing
couple of simple techniques that you can use that
statements are displayed before they execute, as well as the
lines.
displayed after it is scanned, so that you can see the results of symbol
and variable substitution.
"Stacking
described a
If the
prefix pt ag
LISTFILE
RENAME
the
execution
executes.
you can test the
Before entering
the
then, in