IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Syncsort - SECTIONS with Multiple INCLUDE Conditions


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
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
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: 199
Location: india

PostPosted: Wed May 07, 2008 10:07 pm
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
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts How to load to DB2 with column level ... DB2 6
No new posts Multiple table unload using INZUTILB DB2 2
Search our Forums:

Back to Top