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 Read two inputs and write into output... murali.andaluri DFSORT/ICETOOL 6 Wed Jul 26, 2017 7:35 pm
No new posts Extra character appears in file when ... Balu5491 All Other Mainframe Topics 1 Wed Jul 26, 2017 2:39 pm
No new posts Loading data to table gives wrong for... Raghu navaikulam DB2 19 Thu Jul 13, 2017 2:11 pm
No new posts Need to write record of PS File in ex... Chandan1993 JCL & VSAM 1 Wed Jun 07, 2017 1:35 am
No new posts Adding big TEXT lines to each record ... bshkris SYNCSORT 4 Sat May 06, 2017 1:40 am


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