MVSFORUMS.com A Community of and for MVS Professionals
View previous topic :: View next topic
Author
Message
ranga_subham Intermediate Joined: 31 Jan 2006 Posts: 255 Topics: 72
Posted: Fri Mar 30, 2007 11:16 pm Post subject: Any possibility to tweak this?
Hi,
We are using "SYNCSORT FOR Z/OS 1.2.2.1R" at our shop.
I have the following JCL that extracts data to two different output files based on two INCLUDE conditions. But, the input is the same.
Code:
//JS010 EXEC PGM=SYNCSORT,
// REGION=4096K
//*
//SORTIN DD DSN=PXXXX.OXXXX.XXXX.NXXXX.TXXXXXXX(0),
// DISP=(SHR,KEEP,KEEP)
//*
//SORTOUT DD DSN=TXXXX.OXXXX.XXXX.NXXXX.TXXXXXXX.EXXX.D099999,
// DISP=(NEW,CATLG,DELETE),
// MGMTCLAS=XXXXXX,
// AVGREC=K,
// SPACE=(640,(300,150),RLSE),
// DCB=(RECFM=FB,LRECL=640,BLKSIZE=0,DSORG=PS)
//*
//SYSIN DD *
SORT FIELDS=COPY
INCLUDE COND=(9,9,CH,EQ,C'111111',AND,39,9,CH,EQ,C' ')
/*
//SORTWK01 DD UNIT=XXXDA,SPACE=(CYL,(50,50),RLSE)
//SORTWK02 DD UNIT=XXXDA,SPACE=(CYL,(50,50),RLSE)
//*
//SORTMSG DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//*
//JS020 EXEC PGM=SYNCSORT,
// REGION=4096K
//*
//SORTIN DD DSN=PXXXX.OXXXX.XXXX.NXXXX.TXXXXXXX(0),
// DISP=(SHR,KEEP,KEEP)
//*
//SORTOUT DD DSN=TXXXX.OXXXX.XXXX.NXXXX.TXXXXXXX.EXXX.D199999,
// DISP=(NEW,CATLG,DELETE),
// MGMTCLAS=XXXXXX,
// AVGREC=K,
// SPACE=(640,(300,150),RLSE),
// DCB=(RECFM=FB,LRECL=640,BLKSIZE=0,DSORG=PS)
//*
//SYSIN DD *
SORT FIELDS=COPY
INCLUDE COND=(9,9,CH,EQ,C'111111')
/*
//SORTWK01 DD UNIT=XXXDA,SPACE=(CYL,(50,50),RLSE)
//SORTWK02 DD UNIT=XXXDA,SPACE=(CYL,(50,50),RLSE)
//*
//SORTMSG DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//*
//
Is it possible to get this done in a single step?
Thanks.
_________________ Ranga
*****
None of us is as smart as all of us - Ken Blanchard
Back to top
kolusu Site Admin Joined: 26 Nov 2002 Posts: 12375 Topics: 75 Location: San Jose
Posted: Sat Mar 31, 2007 7:42 am Post subject:
ranga_subham,
You just need 1 step to split the input file into 2 output files.
Code:
//JS010 EXEC PGM=SYNCSORT
//*
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=PXXXX.OXXXX.XXXX.NXXXX.TXXXXXXX(0),
// DISP=SHR
//*
//OUT1 DD DSN=TXXXX.OXXXX.XXXX.NXXXX.TXXXXXXX.EXXX.D099999,
// DISP=(NEW,CATLG,DELETE),
// MGMTCLAS=XXXXXX,
// SPACE=(CYL,(20,10),RLSE)
//*
//OUT2 DD DSN=TXXXX.OXXXX.XXXX.NXXXX.TXXXXXXX.EXXX.D199999,
// DISP=(NEW,CATLG,DELETE),
// MGMTCLAS=XXXXXX,
// SPACE=(CYL,(20,10),RLSE)
//*
//SYSIN DD *
SORT FIELDS=COPY
INCLUDE COND=(9,9,CH,EQ,C'111111')
OUTFIL FNAMES=OUT1,INCLUDE=(39,9,CH,EQ,C' ')
OUTFIL FNAMES=OUT2
/*
Hope this helps...
Cheers
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu
Back to top
ranga_subham Intermediate Joined: 31 Jan 2006 Posts: 255 Topics: 72
Posted: Mon Apr 02, 2007 12:07 am Post subject: Not giving expecte results.
Kolusu, Thanks for the reply.
I tried the solution you've given but it produced 1st file wrongly and 2nd file got the same number of records for both the jobs.
I tried both the versions on an input file and got the 2nd output correctly but 1st file has come out different. With my earlier job, the first file output should have '0' records. With new job, it has got some records written.
Pls suggest.
Thx. _________________ Ranga
*****
None of us is as smart as all of us - Ken Blanchard
Back to top
kolusu Site Admin Joined: 26 Nov 2002 Posts: 12375 Topics: 75 Location: San Jose
Posted: Mon Apr 02, 2007 5:46 am Post subject:
ranga_subham ,
Show me the sysout from your 2 steps job and the sysout of my job.
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu
Back to top
ranga_subham Intermediate Joined: 31 Jan 2006 Posts: 255 Topics: 72
Posted: Mon Apr 02, 2007 11:38 pm Post subject:
I am sorry Kolusu. My mistake. Instead of copying it from here, I manually typed the Sysin that caused the problem. I rectified it and it is working perfect......
Thanks a lot.[/code] _________________ Ranga
*****
None of us is as smart as all of us - Ken Blanchard
Back to top
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum