Page 2 of 3

Re: Proc

PostPosted: Thu Apr 12, 2012 10:23 pm
by Robert Sample
JCL Reference: http://www-01.ibm.com/support/docview.wss?uid=pub1sa22759715
JCL User's Guide: http://www-01.ibm.com/support/docview.wss?uid=pub1sa22759807
You'll have to click on the link on each page to get to the actual manual. These are the release 1.13 versions of the manuals -- if you're not using 1.13 z/OS yet, then some parts of these manuals may not apply.

Re: execute proc to create PDS

PostPosted: Fri Apr 13, 2012 5:01 am
by dn2012
Thanks for feed backs.

I am executing EXTPROC once and getting following message

2 IEFC005I PROC STATEMENT WITHOUT MATCHING PEND STATEMENT


Here is my last JCL.

//EXTPROC PROC
//STEP1 EXEC PGM=IEFBR14
//SQADB512 DD DSN=&DSNAME,DISP=(NEW,CATLG,DELETE),
// SPACE=(TRK,(5,3,1)),UNIT=SYSDA,
// DCB=(RECFM=FB,LRECL=80,BLKSIZE=800,DSORG=PO)
//
//STEP2 EXEC PGM=IDCAMS,REGION=512K
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
DEFINE GDG( -
NAME(&DEFGDG)-
LIMIT(7) NOEMPTY SCRATCH)
//*
//FINAL EXEC EXTPROC,DSNAME=TSSDN.DEMO.TEMP02,DEFGDG=TSSDN.GDBD.TEMP02
// PEND
//*

thanks

Re: execute proc to create PDS

PostPosted: Fri Apr 13, 2012 7:10 am
by dick scherrer
Hello,

Review your last post. . .

The // PEND is misplaced. . .

It must preceed the execution of the proc.

Re: execute proc to create PDS

PostPosted: Fri Apr 13, 2012 2:32 pm
by halfteck
Not to mention the '//' statement within the PROC.
If i might ask, are you planning to execute this proc a number of times?, if not then instream JCL would be preferable.

Re: execute proc to create PDS

PostPosted: Fri Apr 13, 2012 3:20 pm
by BillyBoyo
It is all as usual from this TS.

Multiple, obvious, errors. Refusal to read and act on what has been written. Bald statements that "it works". Etc, etc, etc, etc, etc.

If you are real, get your basic training finished, talk to your mentor/colleagues/teacher/classmates. You need hand-holding, which we don't really do.

Re: execute proc to create PDS

PostPosted: Mon Apr 16, 2012 8:14 pm
by dn2012
Halfteck


You Said:

"Not to mention the '//' statement within the PROC.
If i might ask, are you planning to execute this proc a number of times?, if not then instream JCL would be preferable".

Probably not now, but later we may plan to execute this proc a number of times.

What do you meant by Not to mention the '//' statement within the PROC?

Do you meant to remove // from all rows?

thanks

Re: execute proc to create PDS

PostPosted: Mon Apr 16, 2012 8:25 pm
by dn2012
I moved // PEND above and not got error in submit the job but TSSDN.DEMO.TEMP02 & TSSDN.GDBD.TEMP02 has not been created.

//EXTPROC PROC
// PEND
//STEP1 EXEC PGM=IEFBR14
//SQADB512 DD DSN=&DSNAME,DISP=(NEW,CATLG,DELETE),
// SPACE=(TRK,(5,3,1)),UNIT=SYSDA,
// DCB=(RECFM=FB,LRECL=80,BLKSIZE=800,DSORG=PO)
//
//STEP2 EXEC PGM=IDCAMS,REGION=512K
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
DEFINE GDG( -
NAME(&DEFGDG)-
LIMIT(7) NOEMPTY SCRATCH)
//*
//FINAL EXEC EXTPROC,DSNAME=TSSDN.DEMO.TEMP02,DEFGDG=TSSDN.GDBD.TEMP02
//*

Re: execute proc to create PDS

PostPosted: Mon Apr 16, 2012 8:45 pm
by steve-myers
There are 2 problems, both problems have already been mentioned.
  • You cannot use a // (all blanks) JCL statement in a procedure.
  • z/OS release
    • Unless you are running z/OS Release 13 or higher, you cannot insert non JCL data in the procedure.
    • Even if you can insert non JCL data in the procedure, you cannot do symbol substitution in the data.

Re: execute proc to create PDS

PostPosted: Mon Apr 16, 2012 10:00 pm
by dick scherrer
Hello,

You have incorrectly relocated the // PEND statement. It should come after all of the JCL for the procedure and before the first EXEC statement.

You CANNOT have a null (// all spaces) statement in a PROCedure.

You CANNOT imbed SYSIN data in a PROCedure. Place this in a member in some control library (often named hlq.mlq.CTLLIB or something similar according to hyour syste's standards.

SYSIN data CANNOT contain &symbol to be resolved at runtime.

Re: execute proc to create PDS

PostPosted: Mon Apr 16, 2012 11:33 pm
by Monitor