PROC and pass all the variables from Job



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

Re: PROC and pass all the variables from Job

Postby dn2012 » Wed Apr 04, 2012 11:45 pm

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

Re: PROC and pass all the variables from Job

Postby dick scherrer » Wed Apr 04, 2012 11:46 pm

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.
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: PROC and pass all the variables from Job

Postby dn2012 » Thu Apr 05, 2012 12:21 am

Dick,

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

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

Re: PROC and pass all the variables from Job

Postby Robert Sample » Thu Apr 05, 2012 1:28 am

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).
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: PROC and pass all the variables from Job

Postby Monitor » Thu Apr 05, 2012 10:55 am

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

Previous

Return to JCL

 


  • Related topics
    Replies
    Views
    Last post