Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Syncsort - SECTIONS with Multiple INCLUDE Conditions

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
jpdeshai

New User


Joined: 24 Jun 2007
Posts: 57
Location: US

PostPosted: Wed May 07, 2008 8:39 pm    Post subject: Syncsort - SECTIONS with Multiple INCLUDE Conditions
Reply with quote

Hi,

I have 2 seperate SORT cards which generate 2 reports as given below.
1st Card:
SORT FIELDS=(236,9,CH,A)
INCLUDE COND=(1,3,CH,NE,C'000',AND,(215,1,CH,EQ,C'X',OR,
215,1,CH,EQ,C'R'),AND,
258,1,CH,NE,C'O',AND,
33,1,CH,EQ,C'P')
OUTFIL FNAMES=SORTOUT,NODETAIL,LINES=60,
SECTIONS=(236,9,
TRAILER3=(25:236,9,44:COUNT)),
HEADER1=(15:'MASS CARD PRINTED ZIP STAT - POV - REPORT'),
HEADER2=(/,5:'PAGE : ',PAGE,' REPORT DATE : ',DATE=(MD4/),
' TIME : ',TIME,//,
22:' ZIP CODE ',45:' CARDS BATCH ',/,
22:'**********',45:'************'),
TRAILER1=(/,15:'TOTAL NUMBER OF CARDS ISSUED:',SUBCOUNT)

The ouput is:
ZIP CODE CARDS BATCH
********** ************
09094 139
09099 149

2nd Card:
SORT FIELDS=(236,9,CH,A)
INCLUDE COND=(1,3,CH,NE,C'000',AND,215,1,CH,EQ,C'X',AND,
258,1,CH,EQ,C'O',AND,
33,1,CH,EQ,C'P')
OUTFIL FNAMES=SORTOUT,NODETAIL,LINES=60,
SECTIONS=(236,9,
TRAILER3=(25:236,9,44:COUNT)),
HEADER1=(15:'MASS CARDS PRINTED ONLINE - POV - REPORT'),
HEADER2=(/,5:'PAGE : ',PAGE,' REPORT DATE : ',DATE=(MD4/),
' TIME : ',TIME,//,
22:' ZIP CODE ',45:' CARDS ONLINE ',/,
22:'**********',45:'*************'),
TRAILER1=(/,15:'TOTAL NUMBER OF CARDS ISSUED:',SUBCOUNT)

The output is:
ZIP CODE CARDS ONLINE
********** *************
09094 150
09099 150

Question:

I need a Report like below with one Sort Card:

ZIP CODE CARDS BATCH CARDS ONLINE
********** ************* *************
09094 139 150
09099 149 150

Any help appriciated.
Back to top
View user's profile Send private message

rajatbagga

Active User


Joined: 11 Mar 2007
Posts: 193
Location: india

PostPosted: Wed May 07, 2008 10:07 pm    Post subject:
Reply with quote

hello jpdeshai,

You can try the below JCL to meet your requirement.

Code:
//VZM1CKKN JOB (3GAHF3,R),                                         
//         'RAJAT TEST',CLASS=X,MSGCLASS=Y,NOTIFY=&SYSUID           
//S1      EXEC PGM=ICETOOL                                         
//TOOLMSG  DD SYSOUT=*                                             
//DFSMSG   DD SYSOUT=*                                             
//IN1      DD *                                                     
ZIP CODE   CARDS BATCH                                             
********** ************                                             
09094      139                                                     
09099      149                                                     
/*                                                                 
//IN2      DD *                                                     
ZIP CODE   CARDS ONLINE                                             
********** *************                                           
09094      150                                                     
09099      150                                                     
/*                                                                 
//T1       DD DSN=&&T1,UNIT=SYSDA,SPACE=(CYL,(5,5)),DISP=(MOD,PASS)
//T2       DD DSN=&&T2,UNIT=SYSDA,SPACE=(CYL,(5,5)),DISP=(MOD,PASS)
//OUT      DD SYSOUT=*                                             
//TOOLIN   DD *                                                     
    COPY FROM(IN1) TO(T1) USING(CNT0)                               
    COPY FROM(IN2) TO(T1) USING(CNT1)                               
    SPLICE FROM(T1) TO(T2) ON(1,5,CH) WITH(26,3) KEEPNODUPS         
    COPY FROM(T2) TO(OUT) USING(CNT2)                               
/*                                                                 
//CNT0CNTL DD *                                                     
  OMIT COND=(1,1,CH,EQ,C'Z',OR,1,1,CH,EQ,C'*')                     
/*                                                                 
//CNT1CNTL DD *                                                     
  OMIT COND=(1,1,CH,EQ,C'Z',OR,1,1,CH,EQ,C'*')                     
  OUTREC BUILD=(1,5,26:12,3)                                       
/*                                                                 
//CNT2CNTL DD *                                                     
  OUTFIL FNAMES=OUT,                                               
  HEADER2=(1:'ZIP CODE',12:'CARDS BATCH',26:'CARDS ONLINE',/,       
           1:'**********',12:'*************',26:'*************'), 
  OUTREC=(1,5,12:12,3,26:26,3,80:X)                               
/*                                                                 



OUTPUT

Code:
ZIP CODE   CARDS BATCH   CARDS ONLINE   
********** ************* *************   
09094      139           150             
09099      149           150             

In place of IN1 and IN2 you need to use the SORTOUT of above to two cards showed by you.

I hope this helps..
Back to top
View user's profile Send private message
jpdeshai

New User


Joined: 24 Jun 2007
Posts: 57
Location: US

PostPosted: Wed May 07, 2008 10:14 pm    Post subject:
Reply with quote

Thanks Rajat,

I will try and let you know...one small doubt..We use SYNCSORT...will this work with that too..??
Back to top
View user's profile Send private message
jpdeshai

New User


Joined: 24 Jun 2007
Posts: 57
Location: US

PostPosted: Wed May 07, 2008 10:30 pm    Post subject:
Reply with quote

Rajat,

It works perfectly...Thanks a lot.
One more..IF we can...

Can we Group them like below..
Input:
ZIP CODE CARDS BATCH
********** ************
09094 130
09094 130
09094 140
09099 149

ZIP CODE CARDS ONLINE
********** *************
09094 150
09099 150
09099 150
09099 150

ZIP CODE CARDS BATCH CARDS ONLINE
********** ************* *************
09094 400 150
09099 149 450
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Changeman get multiple "Browse C... elixir1986 Compuware & Other Tools 4 Fri Jul 14, 2017 1:48 am
No new posts How to write Specific Fields from Mul... Padhu SYNCSORT 6 Thu Jul 06, 2017 10:26 am
No new posts Include/omit with "ALL" pa... mgl DFSORT/ICETOOL 6 Wed Jun 14, 2017 2:31 pm
No new posts Unable to create multiple files using... mbattu COBOL Programming 3 Fri May 05, 2017 5:35 pm
This topic is locked: you cannot edit posts or make replies. SDSF multiple spool datasets extracte... PJAlarcon CLIST & REXX 1 Fri Apr 21, 2017 10:50 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us