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
 

 

SORT Help

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

Active User


Joined: 13 Jul 2005
Posts: 136

PostPosted: Fri Feb 28, 2014 3:23 pm    Post subject: SORT Help
Reply with quote

My input file has 100 records like below. Here I need to insert "A" in 5th, 10th 15th........... records but I need to have all records in output. I have to use the Dfsort. let me know if you have any thoughts.

Input input file
1111
2222
3333
4444
5555
6666
7777
8888
9999
1000
---
1000

Output file should be
1111
2222
3333
4444
5555
a
6666
7777
8888
9999
1000
a
--
--
Back to top
View user's profile Send private message

Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7315

PostPosted: Fri Feb 28, 2014 3:47 pm    Post subject: Reply to: SORT Help
Reply with quote

OUTFIL IFTHEN=(WHEN=INIT to assign a one-digit sequence number in an extension to each record. IFTHEN=(WHEN=(logical expression to identify every fifth record and use BUILD=(1,yourlength,/,C'A',yourlength:X), WHEN=NONE for BUILD=(1,yourlength)
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7315

PostPosted: Mon Mar 03, 2014 9:30 pm    Post subject: Reply to: SORT Help
Reply with quote

A better solution has been pointed out to me, using the OUTFIL reporting functions. LINES= says how long a "page" is and TRAILER2 is "printed" at the end of each page.

So, with REMOVECC,LINES=6,TRAILER2='the value you want want' it should be about there.
Back to top
View user's profile Send private message
Ed Goodman

Active Member


Joined: 08 Jun 2011
Posts: 556
Location: USA

PostPosted: Mon Mar 03, 2014 9:44 pm    Post subject:
Reply with quote

But Bill, if you go with the simpler version, then ANYONE can understand it!
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
No new posts How to change 'K' or 'M' use Sort vice_versa DFSORT/ICETOOL 5 Thu May 18, 2017 7:11 am
No new posts Adding big TEXT lines to each record ... bshkris SYNCSORT 4 Sat May 06, 2017 1:40 am
This topic is locked: you cannot edit posts or make replies. SORT trick needed bshkris SYNCSORT 6 Tue May 02, 2017 4:35 am
No new posts SORT JSON type of data maxsubrat DFSORT/ICETOOL 8 Wed Apr 19, 2017 6:01 pm
No new posts Sort Large record length cmsmoon DFSORT/ICETOOL 14 Tue Apr 11, 2017 5:49 pm


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