SET value in JCL

Go down

SET value in JCL

Post  kasthuri on Sun Jan 27, 2013 5:24 pm

Hi,

For one of the requirements, I have to execute a job(e.g. TESTJOB1), which uses the older version of GDG. For e.g. In TESTJOB1, I have to use GDG version - USER.TESTGDG.SEP(-2),(-3),(-4),etc. However, the original job(JOB1), which creates a new GDG version USER.TESTGDG.SEP(+1) executes for a longer time and does not allow the TESTJOB1 to access -2,-3,-4 versions and TESTJOB1 waits for the datasets. Instead of referring to -2,-3,-4 versions, if I use the absolute GDG version number (E.g. USER.TESTGDG.SEP.G10001V00,USER.TESTGDG.SEP.G10002V00, USER.TESTGDG.SEP.G10003V00), TESTJOB1 will not wait for the datasets and executes succesfully. Here, JOB1 has the Exclusive hold of GDG base.

I have found a way to get the absolute GDG version number using the below IDCAMS statement.

//*****************************************************
//STEP0005 EXEC PGM=IDCAMS
//*****************************************************
//DD1 DD DSN=USER.TESTGDG.SEP(-2),DISP=SHR
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
PRINT INFILE(DD1) COUNT(0) CHAR
/*

From STEP0005 output, I could get the absolute version number. However, I will have to identify a way to SET GDG version number to a symbolic variable as show below.

FILE1 -> Should contain the absolute GDG version number to be used like below.

//*****************************************************
//STEP0010 EXEC PGM=TESTPGM
//*****************************************************
//SYSOUT DD SYSOUT=*
//SYSIN DD DUMMY
//SYSUT2 DD SYSOUT=*
//SYSUT1 DD DSN=&FILE1

Is there a way to read a file and store the value in SET variable?

kasthuri

Posts : 212
Join date : 2013-01-27

View user profile

Back to top Go down

Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum