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

SORT Help


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
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
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

Moderator Emeritus


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

PostPosted: Fri Feb 28, 2014 3:47 pm
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

Moderator Emeritus


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

PostPosted: Mon Mar 03, 2014 9:30 pm
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Need to set RC4 through JCL SORT DFSORT/ICETOOL 5
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts JCL sort card - get first day and las... JCL & VSAM 9
No new posts Sort First/last record of a subset th... DFSORT/ICETOOL 7
No new posts how to calculate SUM value for VB fil... DFSORT/ICETOOL 1
Search our Forums:

Back to Top