Page 2 of 2

Re: PROC and pass all the variables from Job

PostPosted: Wed Apr 04, 2012 11:45 pm
by dn2012
What do mean by "external proc"?

Do not worry , I understand it.

Step 1 - JCL can create a sequential dataset and a PDS dataset. Your spec seems to imply the procedure can select the type based on some symbolic parameter. This is possible if the symbolic parameter includes the entire SPACE parameter, but this is not a good way to use symbolics.

Here is my proc and performing Step1:

//***************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)
//*
******************************** Bottom of Data ************



Step 2 - You seem to imply the output dataset is the dataset created in step 1. Since you want the output dataset to be on tape, it is not a good idea to "create" the dataset in step 1 and the use it in step 2.

I will not use same DS which I created a step1.
I need to write JCL to copy DS from tape to tape.
If it is possible to use substitute variables its great.

Step 3 - JCL, by itself, cannot create a generation data index. It must be created by a utility such as IDCAMS and by using IDCAMS control statements. Starting with z/OS Release 13 the IDCAMS control statements can be in the procedure, but not all sites are running this release.

I may use followoing JCl in teh procdure, it does work along,

//***************************************************
//* JCL FOR CREATING GDG INDEX
//***************************************************
//STEP3 EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN DD *

DEFINE GENERATIONDATAGROUP -
(NAME(TESTA.IMF714.USA.SOURCE.DATA.GDG) -
LIMIT(10) SCRATCH)
//*

But how to add substitute variable in this?

(NAME(&GDG) - <== wil it work?

Step 4 - Is the GDG using the index specified in step 3? Is the input dataset the dataset created in step 2?

Need some assist
Step 5 - A KSDS needs many more parameters. What are they?

I need to create VSAM File (KSDS, Key length 30)

Re: PROC and pass all the variables from Job

PostPosted: Wed Apr 04, 2012 11:46 pm
by dick scherrer
Hello,

We will help you understand your homework requirement and help when you are stuck on something specific, but as Steve mentions, we will not do your homework for you.

Re: PROC and pass all the variables from Job

PostPosted: Thu Apr 05, 2012 12:21 am
by dn2012
Dick,

I had wrote two steps are they ok? Please see step1 & step3.

thanks

Re: PROC and pass all the variables from Job

PostPosted: Thu Apr 05, 2012 1:28 am
by Robert Sample
But how to add substitute variable in this?

(NAME(&GDG) - <== wil it work?
You cannot -- in general (with very few exceptions), symbolic parameters can be used in JCL statements but not in program parameters -- PERIOD. You must give a fully qualified name, without any ampersands, to IDCAMS to define the GDG base. Most programmers handle this type of situation by creating a job to be submitted through the internal reader that has the specifc values included in the JCL and program parameters.

http://www.ibm.com is the web site to look for manuals. Search for AMS for Catalogs (which is the name of the manual that has all IDCAMS parameters, including what is needed to define a KSDS VSAM file, and a GDG, and so forth).

Re: PROC and pass all the variables from Job

PostPosted: Thu Apr 05, 2012 10:55 am
by Monitor