I have a PDS (BPAA.CNTLCARD.V0610) which has some set of control cards. If there is any change in any of the member a new PDS (BPAA.CNTLCARD.V0611) will be created with the same set of members and with the changes in the respective member.
I have a jcl where they use the control card PDS with the naming convention of BPAA.CNTLCARD.&version, where they change this version manually whenever they create a new PDS.
Is there anyway with which i can get the version number automatically by checking the last qualifier of the PDS and get it dynamically selected in my jcl when it get triggers?
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
Well, all I can say is that whoever thought up the idea of constantly changing the name of a PDS each time it gets updated should perhaps look for a career outside of IT.
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
Shobana wrote:
Is there anyway with which i can get the version number automatically by checking the last qualifier of the PDS and get it dynamically selected in my jcl when it get triggers?
Yes, I would think you could do that. It will most likely require two jobs - one to determine and store the last name of the PDS, and then your job that uses that variable. Something maybe like this:
After analysing the sysin in step2 with the output of the step1, i did few changes.
//SYSIN DD *
OPTION VLSHRT
SORT FIELDS=(18,44,CH,D)
OUTFIL CONVERT,INCLUDE=(2,7,CH,EQ,C'NONVSAM'),ENDREC=3,
OUTREC=(C'// SET THEPDS=',18,44,80:X)
/*
Even though am not getting any data in the output file.
Could you please explain me the sysin, so that i can check what wud be the reason?
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
OK, the first solution was a poor one, since I didn't account for the fact that the number of datasets listed could vary. The process needs to use ICETOOL instead of SORT:
Simple and clean ! no fussing around with Your procedures
the critical events:
creating the new pds and defining the alias are concentrated in single step
regards
e.s
P.S.
it the same technique used by IBM to manage the installation of new DB2 releases
the production job will always refer to
DSN.DSNLOAD
the real dataset would be
DSN.V8R1M0.DSNLOAD
DSN.V9R1M0.DSNLOAD
DSN.DSNLOAD would point to DSN.V8R1M0.DSNLOAD
at cutover time to the new relase
a simple
Code:
DEFINE ALIAS ( -
NAME(DSN.DSNLOAD) -
RELATE(DSN.V9R1M0.DSNLOAD) )
would implement the switch with no changes to ANY jcl
In the above list i need BPAA.DBA.R010.CNTLCARD.V0708 in &THEPDS, but am getting BPAA.DBA.R010.CNTLCARD.V8TEST.
I tried listing the PDS as BPAA.DBA.R010.CNTLCARD.V0* but it's not working.
Is there any way i can get the list of PDS with BPAA.DBA.R010.CNTLCARD.V0*?
By Using the above SORT card i can able to get the latest PDS. i.e BPAA.DBA.R010.CNTLCARD.V0706T0, but i need to get BPAA.DBA.R010.CNTLCARD.V0706 PDS as my output.