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
 

 

Insert extra bytes for a particular type of record

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

New User


Joined: 28 Nov 2006
Posts: 69
Location: India

PostPosted: Thu Feb 05, 2009 11:14 am    Post subject: Insert extra bytes for a particular type of record
Reply with quote

I have a file of length 80 in the format like

Header1
Header2
Detail1
Detail2
Detail1
Detail2
Detail1
Detail2
Trailer
Header1
Header2
Detail1
Detail2
.............. so on

I want to insert 2 bytes '00' at 5th position of the Detail2 record. Don't want to change anyother record. I can not spilt/remerge file.
Is it possible thru DFSORT to check whether it's a Detail2 record and insert 2 additional bytes.

Sample i/p
010HHHH1
020HHHH2
031DDDD1
032DDDD2
99TTTTTTT

Expected o/p
010HHHH1
020HHHH2
031DDDD1
032D00DDD2
99TTTTTTT
Back to top
View user's profile Send private message

km_abdullah

New User


Joined: 03 Nov 2008
Posts: 60

PostPosted: Thu Feb 05, 2009 11:39 am    Post subject:
Reply with quote

Hello hsk,

My understanding is Detail2 record is identified by characters 'D2' in 7-8 columns. Is this correct? If so below code will work -

Code:
//SYSIN DD *                           
 SORT    FIELDS=COPY                   
 OUTREC IFTHEN=(WHEN=(7,2,CH,EQ,C'D2'),
    BUILD=(1,4,C'00',5,74))           


Hi all,
Please let me know if any other simpler method is available.
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 update a portion of text in a ... Bill Woodger DFSORT/ICETOOL 25 Wed Nov 09, 2016 9:41 pm
No new posts sort with previous record anatol DFSORT/ICETOOL 9 Thu Oct 06, 2016 2:36 am
No new posts Get Record count in summary record fo... Atul Banke DFSORT/ICETOOL 21 Fri Sep 23, 2016 4:17 pm
No new posts Removing Extra Spaces in a comma sepa... Puspojit DFSORT/ICETOOL 3 Tue Sep 13, 2016 7:46 am
No new posts Change date (DD/MM/YY) in 2nd record ... uday kiran DFSORT/ICETOOL 12 Wed Sep 07, 2016 10:57 pm


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