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 Record Not found in AlX but record re... mukun264 COBOL Programming 2 Fri Mar 24, 2017 9:28 am
No new posts Count the length of the record & ... sreekusr DFSORT/ICETOOL 4 Thu Mar 23, 2017 7:52 pm
No new posts IMS DB-How to update a record (a sing... Nic Clouston IMS DB/DC 9 Thu Mar 09, 2017 4:38 pm
No new posts To Merge mutliple records into a sing... anandgbe DFSORT/ICETOOL 6 Wed Feb 22, 2017 8:49 am
No new posts Ccompar BLOB (images of type jpg) on ... nihad DB2 0 Sun Feb 05, 2017 3:13 pm


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