MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Any possibility to tweak this?

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
ranga_subham
Intermediate


Joined: 31 Jan 2006
Posts: 255
Topics: 72

PostPosted: Fri Mar 30, 2007 11:16 pm    Post subject: Any possibility to tweak this? Reply with quote

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
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12375
Topics: 75
Location: San Jose

PostPosted: Sat Mar 31, 2007 7:42 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
ranga_subham
Intermediate


Joined: 31 Jan 2006
Posts: 255
Topics: 72

PostPosted: Mon Apr 02, 2007 12:07 am    Post subject: Not giving expecte results. Reply with quote

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
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12375
Topics: 75
Location: San Jose

PostPosted: Mon Apr 02, 2007 5:46 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
ranga_subham
Intermediate


Joined: 31 Jan 2006
Posts: 255
Topics: 72

PostPosted: Mon Apr 02, 2007 11:38 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
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


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group