Portal | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Forum Index
 
Register
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Syncsort - help needed with ICETOOL OCCURS

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> SYNCSORT
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    Post subject: Syncsort - help needed with ICETOOL OCCURS
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: 7312
Location: Inside the Matrix

PostPosted: Wed Apr 16, 2014 4:21 pm    Post subject: Reply to: Syncsort - help needed with ICETOOL OCCURS
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    Post subject: Reply to: Syncsort - help needed with ICETOOL OCCURS
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    IBMMAINFRAMES.com Support Forums -> SYNCSORT All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Populating Date and Sequence numer in... PORYES SYNCSORT 11 Thu Jul 16, 2020 5:01 pm
No new posts Insert System Runtime in HEADER In SY... Rick Ryan SYNCSORT 9 Tue May 26, 2020 9:01 pm
No new posts SYNCSORT in Z/VSE nithinkarthika SYNCSORT 24 Mon May 11, 2020 3:44 pm
No new posts COBOL Student learning COBOL File Han... torrind COBOL Programming 3 Sat May 09, 2020 3:40 am
No new posts Removing Hyphens and Dots using Syncsort PORYES SYNCSORT 8 Tue Apr 28, 2020 9:52 pm

Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us