execute proc to create PDS



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

execute proc to create PDS

Postby dn2012 » Thu Apr 12, 2012 8:03 pm

Hello All

I have created following procedure.

//EXTPROC PROC
//************************************************************
//***************THE DD STATEMENT FOR A NEW DATA SET**********
//*CREATE A PDS
//************************************************************
//*
//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)
//*


Now I need to execute proc to create PDS.
Do I need to write JCL in the same proc? If yes how?
Assume I am creating PDS called "THANKS.FOR.HELP".

EXEC EXTPROC,DSNAME=THANKS.FOR.HELP

thx
dn2012
 
Posts: 114
Joined: Thu Feb 16, 2012 6:10 am
Has thanked: 0 time
Been thanked: 0 time

Re: Proc

Postby Robert Sample » Thu Apr 12, 2012 8:38 pm

Look in the JCL Reference manual (if you don't have it bookmarked, look at http://www.ibm.com to find it) and read up on the JCLLIB statement.

And, by the way, using a title of "Proc" in a JCL forum is not very smart since it tells us nothing about what your problem is and the sheer genreality of the title will cause some people to skip reading it.
Robert Sample
Global moderator
 
Posts: 3719
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 279 times

Re: Proc

Postby dn2012 » Thu Apr 12, 2012 8:44 pm

//EXTPROC JOB XXXXXX,ACCOUNT,CLASS=1,MSGCLASS=0,NOTIFY=XXXX
//***************THE DD STATEMENT FOR A NEW DATA SET**********
//*CREATE A PDS
//************************************************************
//*
//EXTPROC PROC
//STEP1 EXEC PGM=IEFBR14
//SQADB512 DD DSN=&DSNAME,DISP=(NEW,CATLG),
// SPACE=(TRK,(5,3,1)),UNIT=SYSDA,
// DCB=(RECFM=FB,LRECL=80,BLKSIZE=800,DSORG=PO)
// PEND
//*
//STEP1 EXEC EXTPROC,DSNAME=SIMOTIME.DEMO.TEMP02


getting errors as

08.08.44 JOB12636 ACF99913 ACF2 VIOLATION-08,06,TSSDN,,SIMOTIME.DEMO.TEMP02,N/A
08.08.44 JOB12636 IEF452I CREPDSTP - JOB NOT RUN - JCL ERROR
08.08.44 JOB12636 $HASP396 CREPDSTP TERMINATED


STMT NO. MESSAGE
3 IEFC001I PROCEDURE EXTPROC WAS EXPANDED USING INSTREAM PROCEDURE DEFIN
ACF99913 ACF2 VIOLATION-08,06,TSSDN,,SIMOTIME.DEMO.TEMP02,N/A
6 IGD308I DATA SET ALLOCATION REQUEST FAILED -
RACF FUNCTION: RACDEF FOR
DATA SET: SIMOTIME.DEMO.TEMP02 WITH RETURN CODE 08 REASON CODE 00
dn2012
 
Posts: 114
Joined: Thu Feb 16, 2012 6:10 am
Has thanked: 0 time
Been thanked: 0 time

Re: Proc

Postby Akatsukami » Thu Apr 12, 2012 8:48 pm

IOW, your attempt to create a PDS with the HLQ SIMOTIME was a security violation.
"You have sat too long for any good you have been doing lately ... Depart, I say; and let us have done with you. In the name of God, go!" -- what I say to a junior programmer at least once a day
User avatar
Akatsukami
Global moderator
 
Posts: 1058
Joined: Sat Oct 16, 2010 2:31 am
Location: Bloomington, IL
Has thanked: 6 times
Been thanked: 51 times

Re: Proc

Postby BillyBoyo » Thu Apr 12, 2012 9:01 pm

More stuff just copy/pasted from the internet.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Re: Proc

Postby dn2012 » Thu Apr 12, 2012 9:06 pm

it did work.
dn2012
 
Posts: 114
Joined: Thu Feb 16, 2012 6:10 am
Has thanked: 0 time
Been thanked: 0 time

Re: Proc

Postby dn2012 » Thu Apr 12, 2012 9:19 pm

Now I execute two jobs but get errors as below;

//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)
// PEND
//*
//STEP1 EXEC EXTPROC,DSNAME=TSSDN.DEMO.TEMP02
//STEP2 EXEC EXTPROC,DEFGDG=TSSDN.GDBD.TEMP02
//*

JOB14189 IEFC452I EXTPROC - JOB NOT RUN - JCL ERROR 201
9 IEFC601I INVALID JCL STATEMENT
10 IEFC001I PROCEDURE EXTPROC WAS EXPANDED USING INSTREAM PROCEDURE DEFI
10 IEFC657I THE SYMBOL DEFGDG WAS NOT USED
16 IEFC601I INVALID JCL STATEMENT
dn2012
 
Posts: 114
Joined: Thu Feb 16, 2012 6:10 am
Has thanked: 0 time
Been thanked: 0 time

Re: Proc

Postby Robert Sample » Thu Apr 12, 2012 9:30 pm

1. Unless you are running the latest version of z/OS, you cannot have SYSIN DD * in a PROC -- PERIOD.
2. Even if you ARE running z/OS 1.13, you cannot use JCL symbolics (like your &DEFGDG) in the SYSIN. You can define symbols to SORT, but that doesn't work for IDCAMS.
3. You completely and totally misunderstand the PROC -- each execution of EXTRPROC will invoke IEFBR14, then IDCAMS, as you have coded your PROC. So you are exeucting FOUR programs by executing EXTPROC twice.

You would be FAR better served by not posting anything in this forum again until you have read the JCL Reference and JCL User's Guide manuals cover to cover, even if it takes you weeks to do so.
Robert Sample
Global moderator
 
Posts: 3719
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 279 times

Re: Proc

Postby dn2012 » Thu Apr 12, 2012 9:37 pm

Can you send me the links for JCL Reference and JCL User's Guide ? thanks
dn2012
 
Posts: 114
Joined: Thu Feb 16, 2012 6:10 am
Has thanked: 0 time
Been thanked: 0 time

Re: Proc

Postby NicC » Thu Apr 12, 2012 10:21 pm

Why not help yourself and search for the links - either in the forum or via Google (jcl manual is a good thing to begin with in google and then look for links beginning publiz.boulder)?
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 3025
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 136 times

Next

Return to JCL

 


  • Related topics
    Replies
    Views
    Last post