Writing to 2 DD names that point to the same datset
Posted: Mon Jul 26, 2010 4:35 pm
There was a topic somwhere on these boards where there was JCL something like this -I can't find this topic any more, and I realized that we had all missed the key point. The problem is there was nothing in a.dataset.
The key point is this is not something you can do in OS/360 type systems. The first write in SYSPRINT will wipe out anything in a.dataset written to SYSTSPRT (since that is the most likely sequence). What you have to do is something like this -
//A EXEC PGM=IKJEFT01
//SYSTSPRT DD DISP=MOD,DSN=a.dataset
//SYSPRINT DD DISP=MOD,DSN=a.dataset
//SYSTSIN DD *
TSO commands that (I think) invoke DB2 functions
//SYSTSPRT DD DISP=MOD,DSN=a.dataset
//SYSPRINT DD DISP=MOD,DSN=a.dataset
//SYSTSIN DD *
TSO commands that (I think) invoke DB2 functions
The key point is this is not something you can do in OS/360 type systems. The first write in SYSPRINT will wipe out anything in a.dataset written to SYSTSPRT (since that is the most likely sequence). What you have to do is something like this -
//A EXEC PGM=IKJEFT01
//SYSTSPRT DD DISP=(,PASS),UNIT=SYSDA,SPACE=(CYL,(1,1)),
// DCB=(RECFM=FBA,LRECL=133,DSORG=PS)
//SYSPRINT DD DISP=(,PASS),UNIT=SYSDA,SPACE=(CYL,(1,1)),
// DCB=(RECFM=FBA,LRECL=133,DSORG=PS)
//SYSTSIN DD *
TSO commands that (I think) invoke DB2 functions
//B EXEC PGM=IEBGENER
//SYSPRINT DD SYSOUT=*
//SYSUT1 DD DISP=OLD,DSN=*.A.SYSTSPRT
// DD DISP=OLD,DSN=*.A.SYSPRINT
//SYSUT2 DD DISP=MOD,DSN=a.dataset
//SYSIN DD DUMMY
//SYSTSPRT DD DISP=(,PASS),UNIT=SYSDA,SPACE=(CYL,(1,1)),
// DCB=(RECFM=FBA,LRECL=133,DSORG=PS)
//SYSPRINT DD DISP=(,PASS),UNIT=SYSDA,SPACE=(CYL,(1,1)),
// DCB=(RECFM=FBA,LRECL=133,DSORG=PS)
//SYSTSIN DD *
TSO commands that (I think) invoke DB2 functions
//B EXEC PGM=IEBGENER
//SYSPRINT DD SYSOUT=*
//SYSUT1 DD DISP=OLD,DSN=*.A.SYSTSPRT
// DD DISP=OLD,DSN=*.A.SYSPRINT
//SYSUT2 DD DISP=MOD,DSN=a.dataset
//SYSIN DD DUMMY