Visit SDSUSA site please  

Go Back   mvsHelp Boards > Help Bulletin Board > JCL
User Name
Password
-->
FAQ Search Manuals Calendar New Posts Search Today's PostsMark Forums Read

Reply
 
Thread Tools Search this Thread Display Modes
  #11  
Old 06-28-2010, 11:49 PM
T-Bonham@scc.net T-Bonham@scc.net is offline
Senior Member
 
Join Date: Aug 2002
Location: Minneapolis, MN USA
Posts: 1,753
Default

I seem to recall from long ago that the OS will return these generations in order of the most recently cataloged first.

Which can lead to a rather obscure bug, if your logic depends on them being in a specific order.

If you have GDG Base: MDMX000.BS100.GDG
Version 1: MDMX000.BS100.GDG.G0001V00
Version 2: MDMX000.BS100.GDG.G0002V00
Version 3: MDMX000.BS100.GDG.G0003V00
Version 4: MDMX000.BS100.GDG.G0004V00
Version 5: MDMX000.BS100.GDG.G0005V00

But a recent fix created & cataloged a new version of generation 3, thus now:
Version 3: MDMX000.BS100.GDG.G0003V01
then the order they will be returned in is
1st: MDMX000.BS100.GDG.G0003V01
2nd: MDMX000.BS100.GDG.G0005V00
3rd: MDMX000.BS100.GDG.G0004V00
4th: MDMX000.BS100.GDG.G0002V00
5th: MDMX000.BS100.GDG.G0001V00

Can anyone confirm if this is correct, or am I remembering it wrong?

(In any case, the smart way to program this is to make it independent of the order of the input, either by reading an appropriate date off a header record or a data field on each record, or by sorting the input as needed before the program, or some similar programming technique.)
__________________
Tim Bonham
Reply With Quote
  #12  
Old 06-29-2010, 03:27 AM
stefan's Avatar
stefan stefan is offline
Senior Member
 
Join Date: Nov 2003
Location: Germany
Posts: 501
Default

Quote:
Originally Posted by T-Bonham@scc.net
Can anyone confirm if this is correct, or am I remembering it wrong?
I think you're wrong. Look at this job:
Code:
//* --------------------------------------------------------------- *// //DEFINE EXEC PGM=IDCAMS //SYSPRINT DD SYSOUT=* //SYSIN DD * DELETE INT1098.GDG.* DELETE INT1098.GDG GDG DEFINE GDG(NAME('INT1098.GDG') SCRATCH LIMIT(3)) SET MAXCC=0 /* //* --------------------------------------------------------------- *// //CREATE1 EXEC PGM=IEBGENER //SYSPRINT DD SYSOUT=* //SYSIN DD DUMMY //SYSUT1 DD * FIRST //SYSUT2 DD DSN=INT1098.GDG(+1),DISP=(NEW,CATLG,DELETE), // LRECL=80,BLKSIZE=0,RECFM=FB,DSORG=PS,SPACE=(TRK,(1)) /* //* --------------------------------------------------------------- *// //CREATE2 EXEC PGM=IEBGENER //SYSPRINT DD SYSOUT=* //SYSIN DD DUMMY //SYSUT1 DD * SECOND //SYSUT2 DD DSN=INT1098.GDG(+2),DISP=(NEW,CATLG,DELETE), // LRECL=80,BLKSIZE=0,RECFM=FB,DSORG=PS,SPACE=(TRK,(1)) /* //* --------------------------------------------------------------- *// //CREATE3 EXEC PGM=IEBGENER //SYSPRINT DD SYSOUT=* //SYSIN DD DUMMY //SYSUT1 DD * THIRD //SYSUT2 DD DSN=INT1098.GDG(+3),DISP=(NEW,CATLG,DELETE), // LRECL=80,BLKSIZE=0,RECFM=FB,DSORG=PS,SPACE=(TRK,(1)) /* //* --------------------------------------------------------------- *// //CONCAT1 EXEC PGM=IEBGENER //SYSPRINT DD SYSOUT=* //SYSIN DD DUMMY //SYSUT1 DD DISP=SHR,DSN=INT1098.GDG //SYSUT2 DD SYSOUT=* /* //* --------------------------------------------------------------- *// //DELETE EXEC PGM=IDCAMS //SYSPRINT DD SYSOUT=* //SYSIN DD * DELETE INT1098.GDG.G0002V00 /* //* --------------------------------------------------------------- *// //CREATE2N EXEC PGM=IEBGENER //SYSPRINT DD SYSOUT=* //SYSIN DD DUMMY //SYSUT1 DD * SECOND (FIXED) //SYSUT2 DD DSN=INT1098.GDG.G0002V01,DISP=(NEW,CATLG,DELETE), // LRECL=80,BLKSIZE=0,RECFM=FB,DSORG=PS,SPACE=(TRK,(1)) /* //* --------------------------------------------------------------- *// //CONCAT2 EXEC PGM=IEBGENER //SYSPRINT DD SYSOUT=* //SYSIN DD DUMMY //SYSUT1 DD DISP=SHR,DSN=INT1098.GDG //SYSUT2 DD SYSOUT=* /* //
The output on SYSUT2 of step CONCAT1 is as follows:
Code:
THIRD SECOND FIRST
That's the concatenation as expected (youngest first).
Now look at the output at SYSUT2 of step CONCAT2:
Code:
THIRD SECOND (FIXED) FIRST
As you see, nothing has changed although the second generation has been deleted and recreated and thus is the "youngest" one.
__________________
Stefan
There are 10 types of people in the world: Those who understand binary, and those who don't.
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off


All times are GMT -4. The time now is 06:55 AM.


Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.