View previous topic :: View next topic
|
Author |
Message |
maki_psg
New User
Joined: 28 Jan 2010 Posts: 47 Location: India
|
|
|
|
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? |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
the only thing that can be modified during a job is the contents of a file that will be used in a later step.
for the 10 millionth time, jcl can not be modified after it is processed by the initiator.
also, can't quite get a handle on why step005 can access gdg(-5) but step0010 can not? |
|
Back to top |
|
|
maki_psg
New User
Joined: 28 Jan 2010 Posts: 47 Location: India
|
|
|
|
Thanks for the reply, dbzTHEdinosauer
You were right. I would get the same "waiting for datasets" in STEP0005 itself. I will have to identify any other way to directly use the absolute GDG version number rather than using GDG references (-2,-3,-4,etc). |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
Well, no you wouldn't get the same messages. You can't do it.
You'll need something which knows which dataset you want to create/amend the JCL which can then specify that dataset.
Easiest way is for that "something" is for it to be you. Otherwise, do something to break it up, particularly as presumably the IDCAMS step was not in the original JCL. |
|
Back to top |
|
|
David Robinson
Active User
Joined: 21 Dec 2011 Posts: 199 Location: UK
|
|
|
|
Firstly, I would question the initial design. It seems a bit odd that you're trying to read earlier generations at the same time as creating a new (+1). What happens if one of the jobs starts at a different time, or runs quicker than usual? You will end up reading a different generation to what you expected.
If you really must do it, you could do a LISTCAT of the base, read the output with a Rexx or whatever to determine the absolute name of the generations that you want and generate some REPRO commands. You could then copy it to a work file that has a constant name. |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
I also share the same thoughts as of David and would question the initial design. Why do you want to execute both the Jobs simultaneously? Perhaps, it would help if you tell us what is that you want to achieve instead of what design you choose to do that.
And it's "generations", not "versions". |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Also I would take the time to learn and use the correct terminology when referring to a GDS |
|
Back to top |
|
|
maki_psg
New User
Joined: 28 Jan 2010 Posts: 47 Location: India
|
|
|
|
Hi David/Anuj, I am not bothered about the data in latest GDG version, which is created in JOB1. I will have to run TESTJOB1 and use earlier versions of GDG - (-2,-4,-6..) to see the average deviations for a particular period of time. Even if I point to a wrong GDG version, since I am going to consider the average deviations, the results would be more or less same...
As David had mentioned earlier, I think I need to write a REXX program to get the absolute GDG version number and then update the PDS, which contains the GDG references (-2,-4,-6,etc) with the absolute GDG versions. |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
maki_psg wrote: |
Even if I point to a wrong GDG version, since I am going to consider the average deviations, the results would be more or less same... |
If that's your motive and acceptable - why are you thinking this hard? Why not just execute your Test-Job once the other Job, JOB1, is over? |
|
Back to top |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2455 Location: Hampshire, UK
|
|
|
|
maki_psg: do you realise that a GDG number is made up of 2 parts GXXXX which is the number and VYY which is the version? When you talk about a gdg version you are referring to VYY. If you really mean GXXXX then refer to GDG number - as you were told to do before. |
|
Back to top |
|
|
maki_psg
New User
Joined: 28 Jan 2010 Posts: 47 Location: India
|
|
|
|
We need to identify the deviations and generate few reports based on TESTJOB1 irrespective of JOB1 completion. It is one of the rare scenarios anyone would come across.
Thanks for correcting me, Nic. |
|
Back to top |
|
|
|