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
 

 

Adding multiple trailer records at reqular interval

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
kenshin

New User


Joined: 02 Aug 2014
Posts: 16
Location: Saint Paul , USA

PostPosted: Fri Sep 25, 2015 11:01 am    Post subject: Adding multiple trailer records at reqular interval
Reply with quote

Hi All ,

can you please help me in getting follwing result:
Can we add mutiple trailer records ?

Input dataset:
AAA AK 3
BBB AK 5
CCC AK 1

AAA AL 1
BBB AL 2
CCC AL 3

AAA FL 1
BBB FL 1
CCC FL 3


Ouput:
AAA AK 3
BBB AK 5
CCC AK 1
count :9
AAA AL 1
BBB AL 2
CCC AL 3
cout :6
AAA FL 1
BBB FL 1
CCC FL 3

count : 5
Back to top
View user's profile Send private message

Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7315

PostPosted: Fri Sep 25, 2015 12:41 pm    Post subject: Reply to: Adding multiple trailer records at reqular interval
Reply with quote

Use WHEN=GROUP to PUSH an ID to a temporary extension of the record, then use OUTFIL reporting features, TRAILER3 with SECTIONS on the ID, and use TOT(AL).
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7315

PostPosted: Fri Sep 25, 2015 2:03 pm    Post subject: Reply to: Adding multiple trailer records at reqular interval
Reply with quote

And, since you're using reporting features but don't want a report, specify REMOVECC not not get the "carriage control" codes.
Back to top
View user's profile Send private message
kenshin

New User


Joined: 02 Aug 2014
Posts: 16
Location: Saint Paul , USA

PostPosted: Fri Sep 25, 2015 2:36 pm    Post subject:
Reply with quote

Hi Bill,

Thank you providing solutions.

I will try it out.

I have one question , when you said "PUSH an ID to a temporary extension of the record," i didnt get you

Can you please elaborate more?
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7315

PostPosted: Fri Sep 25, 2015 3:29 pm    Post subject: Reply to: Adding multiple trailer records at reqular interval
Reply with quote

If you look up WHEN=GROUP you'll find PUSH. PUSH is like OVERLAY, except you can only PUSH data from the first record of the group, or the special ID and SEQ, which represent a sequence-number for groups, and a sequence-number within groups respectively.
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7315

PostPosted: Sat Sep 26, 2015 5:04 am    Post subject: Reply to: Adding multiple trailer records at reqular interval
Reply with quote

Missed the "regular interval" in the title, and didn't trust your data :-)

Someone's pointed out something shorter, neater, and faster.

Code:
  OPTION COPY                                   
  OUTFIL REMOVECC,LINES=4,                       
  TRAILER2=('COUNT : ',TOT=(8,1,ZD,EDIT=(IT)))


It's still using the reporting functions of OUTFIL (so you need the REMOVECC, as you don't want a "report"), but uses the TRAILER2, which appears "at the bottom of each page". So you set the page-length (LINES=) to four (including the total) and format your trailer.

If you don't have regular data, you'll get a mess, but it's the best way for regular data.
Back to top
View user's profile Send private message
kenshin

New User


Joined: 02 Aug 2014
Posts: 16
Location: Saint Paul , USA

PostPosted: Sat Sep 26, 2015 9:41 am    Post subject:
Reply with quote

As per my requirment ,I modified your statements and it worked ..!!!!

OPTION COPY
OUTFIL REMOVECC,LINES=8,
TRAILER2=(22:'TOTAL HOMESAVER RECORDS
TOT=(59,7,ZD,EDIT=(IIIIIIT)))


yes ,I have regular data reoccuring in bundle of 8 rows having different states.

Thanks Bill, You are the best!! :-)
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 -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
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
No new posts Validating file with multiple header/... mohitsaini DFSORT/ICETOOL 6 Thu Apr 13, 2017 1:53 am
No new posts Data replication from multiple Db2 ta... kishpra DB2 9 Mon Mar 27, 2017 9:58 pm
No new posts Unable to catalog a gdg dataset resid... Shovan JCL & VSAM 7 Fri Mar 24, 2017 2:24 pm
No new posts To display values of multiple rows in... vinu78 DB2 2 Thu Mar 09, 2017 1:20 pm


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