execute proc to create PDS



JES, JES2, JCL utilities, IDCAMS, Compile & Run JCLs, PROCs etc...

Re: Proc

Postby Robert Sample » Thu Apr 12, 2012 10:23 pm

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.
Robert Sample
Global moderator
 
Posts: 3720
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 279 times

Re: execute proc to create PDS

Postby dn2012 » Fri Apr 13, 2012 5:01 am

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
dn2012
 
Posts: 114
Joined: Thu Feb 16, 2012 6:10 am
Has thanked: 0 time
Been thanked: 0 time

Re: execute proc to create PDS

Postby dick scherrer » Fri Apr 13, 2012 7:10 am

Hello,

Review your last post. . .

The // PEND is misplaced. . .

It must preceed the execution of the proc.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: execute proc to create PDS

Postby halfteck » Fri Apr 13, 2012 2:32 pm

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.
halfteck
 
Posts: 42
Joined: Tue Nov 08, 2011 8:47 pm
Has thanked: 0 time
Been thanked: 0 time

Re: execute proc to create PDS

Postby BillyBoyo » Fri Apr 13, 2012 3:20 pm

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.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Re: execute proc to create PDS

Postby dn2012 » Mon Apr 16, 2012 8:14 pm

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
dn2012
 
Posts: 114
Joined: Thu Feb 16, 2012 6:10 am
Has thanked: 0 time
Been thanked: 0 time

Re: execute proc to create PDS

Postby dn2012 » Mon Apr 16, 2012 8:25 pm

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
//*
dn2012
 
Posts: 114
Joined: Thu Feb 16, 2012 6:10 am
Has thanked: 0 time
Been thanked: 0 time

Re: execute proc to create PDS

Postby steve-myers » Mon Apr 16, 2012 8:45 pm

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.
steve-myers
Global moderator
 
Posts: 2105
Joined: Thu Jun 03, 2010 6:21 pm
Has thanked: 4 times
Been thanked: 243 times

Re: execute proc to create PDS

Postby dick scherrer » Mon Apr 16, 2012 10:00 pm

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.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: execute proc to create PDS

Postby Monitor » Mon Apr 16, 2012 11:33 pm

Monitor
 
Posts: 98
Joined: Wed Jan 18, 2012 8:59 pm
Has thanked: 0 time
Been thanked: 7 times

PreviousNext

Return to JCL

 


  • Related topics
    Replies
    Views
    Last post