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

Syncsort - help needed with ICETOOL OCCURS


IBM Mainframe Forums -> SYNCSORT
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
ramas.kamal

New User


Joined: 03 Mar 2014
Posts: 22
Location: India

PostPosted: Wed Apr 16, 2014 4:17 pm
Reply with quote

Hi, I have a file with LRECL=80,RECFM=FB and want to find no.of occurrences based on three fields.

Input:
Code:

4784311500001008 5160 1500
4784311500001016 5160 1000
4784311500001024 5160 1200
4784311500001032 7007 0500
4784311500001040 7007 1500
4784311500001057 7007 1500
4784311500001065 7007 2500


Output:
Code:

 4784    500     500                 1
 4784    500    1000                 1
 4784    500    1200                 1
 4784    500    1500                 3
 4784    500    2500                 1


I tried below code and got this output.

Code:

//STEP0001 EXEC PGM=SYNCTOOL                     
//TOOLMSG  DD SYSOUT=*                           
//SSMSG    DD SYSOUT=*                           
//IN       DD *                                 
4784311500001008 5160 1500                       
4784311500001016 5160 1000                       
4784311500001024 5160 1200                       
4784311500001032 7007 0500                       
4784311500001040 7007 1500                       
4784311500001057 7007 1500                       
4784311500001065 7007 2500                       
//RPT      DD SYSOUT=*                           
//TOOLIN   DD    *                               
 OCCUR FROM(IN) LIST(RPT) NOHEADER BLANK -       
    ON(1,4,ZD) ON(8,3,ZD) ON(23,4,ZD) ON(VALCNT)


I request you to help me to get below shown "Expected Output". This output needs to have "DAILYCYCLE OUTGOING" at 1st column and "present date" at 44th column.

Expected Output:
Code:

----+----1----+----2----+----3----+----4----+----5----+----6----+----7
DAILYCYCLE OUTGOING 4784    500     500    20140416             1
DAILYCYCLE OUTGOING 4784    500    1000    20140416             1
DAILYCYCLE OUTGOING 4784    500    1200    20140416             1
DAILYCYCLE OUTGOING 4784    500    1500    20140416             3
DAILYCYCLE OUTGOING 4784    500    2500    20140416             1


What do I need to add to the TOOLIN? Please help.

Thanks.
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Wed Apr 16, 2014 4:21 pm
Reply with quote

Either get those in the heading, or re-write using SORT with OUTFIL.
Back to top
View user's profile Send private message
ramas.kamal

New User


Joined: 03 Mar 2014
Posts: 22
Location: India

PostPosted: Wed Apr 16, 2014 4:57 pm
Reply with quote

Bill, thanks for idea !
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 -> SYNCSORT

 


Similar Topics
Topic Forum Replies
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Shift left VB record without x00 endi... DFSORT/ICETOOL 11
No new posts how to calculate SUM value for VB fil... DFSORT/ICETOOL 1
No new posts how to calculate SUM for VB file usin... JCL & VSAM 1
No new posts Null values are considered in Total c... DFSORT/ICETOOL 6
Search our Forums:

Back to Top