Joined: 06 Oct 2009 Posts: 41 Location: Melbourne, Australia
In this obvious example, the proc is provided with an incorrect full-stop and 'UNTI' instead of 'UNIT'. But it appears that you cannot override the incorrect DD with a correct one (even though the JCL parser has found the correct location in the JCL stream).
Code:
3 //CPY PROC DSN2=
//GENER EXEC PGM=IEFBR14
//SYSUT2 DD DSN=&DSN2,SPACE=(TRK,(1)),
// DISP=(NEW,CATLG,DELETE),UNTI=SYSDA,
// RECFM=FB,LRECL=1700.BUFNO=100
// PEND
4 //MAKE EXEC CPY,DSN2=TS.PACH.TEST
5 ++CPY PROC DSN2=
6 ++GENER EXEC PGM=IEFBR14
7 ++BEFORE DD DUMMY
8 //GENER.SYSUT2 DD DSN=&DSN2,SPACE=(TRK,(1)),
// DISP=(NEW,CATLG,DELETE),UNIT=SYSDA,
// RECFM=FB,LRECL=1700,BUFNO=100
IEFC653I SUBSTITUTION JCL - DSN=TS.PACH.TEST,SPACE=(TRK,(1)),DISP=(NEW,CATLG,DELETE),UNIT=SYSDA,RECFM=FB,
LRECL=1700,BUFNO=100
+/SYSUT2 DD DSN=&DSN2,SPACE=(TRK,(1)),
+/ DISP=(NEW,CATLG,DELETE),UNTI=SYSDA,
+/ RECFM=FB,LRECL=1700.BUFNO=100
IEFC653I SUBSTITUTION JCL - DSN=TS.PACH.TEST,SPACE=(TRK,(1)),DISP=(NEW,CATLG,DELETE),UNIT=SYSDA,RECFM=FB,
LRECL=1700.BUFNO=100
9 ++AFTER DD DUMMY
STMT NO. MESSAGE
4 IEFC001I PROCEDURE CPY WAS EXPANDED USING INSTREAM PROCEDURE DEFINITION
8 IEFC630I UNIDENTIFIED KEYWORD UNTI
8 IEFC641I IMPROPER SUBPARAMETER LIST IN THE LRECL FIELD
8 IEFC624I INCORRECT USE OF PERIOD IN THE LRECL FIELD
Is there a way of overriding a DD in a proc if that DD is generating a JCL error with its incorrect syntax? Or do you always have to replace the proc/point to a new one?
I guess that a proc should never reach a procedure library without being tested - right? Maybe I'm getting old (or I've been spoilt too much with pristine procedures) or maybe it was DOS procedures that would override the entire DD - but was it always this way?
P.S. I have tried to search through the manuals, but couldn't find anyting on overrides when I had found JCL errors, and couoldn't find anything on errors when I was looking for overrides. If I missed something, then simply a manual name would be enough!
•Using system symbols and JCL symbols
•Using overrides.
Using system symbols and JCL symbols, you can design your procedures to be easily modified. If the procedure does not contain required system symbols and JCL symbols, you can override the statement.
For its current execution, you can override an in-stream or cataloged procedure by:
•Overriding, nullifying, or adding EXEC statement parameters
•Overriding, nullifying, or adding parameters to DD or OUTPUT JCL statements
•Adding DD or OUTPUT JCL statements
Overriding a parameter modifies only that parameter; the system uses all other parameters on the original statement. For example, if you override the data set name on a DD statement that includes a UNIT and VOL=SER parameter, the system will still use the UNIT and VOL=SER parameters.
Invalid parameters in a procedure cannot be corrected through overrides. Before processing overrides, the system scans the original procedure statements for errors and issues error messages.
--------------------------------------------------------------------------------
Notices | Terms of use | Support | Contact z/OS