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

Changing record codes position


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
revdpoel

New User


Joined: 01 Nov 2006
Posts: 56

PostPosted: Tue Mar 10, 2009 5:03 pm
Reply with quote

Hai

I have a file with 4 recordcodes (first position), FB 80
recordcode 0 = header-record
recordcode 1 = data-record
recordcode 2 = data-record
recordcode 9 = trailer-record

recordcode 2 must be converted to recordcode 1

So input

0200901
1bbaa
1ccdd
2eerr
900005

output

0200901
1bbaa
1ccdd
1eerr
900005

How do I do that?

thanx
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Tue Mar 10, 2009 9:04 pm
Reply with quote

Here's a DFSORT job that will do what you asked for:

Code:

//S1    EXEC  PGM=SORT
//SYSOUT    DD  SYSOUT=*
//SORTIN DD DSN=...  input file (FB/80)
//SORTOUT DD DSN=...  output file (FB/80)
//SYSIN    DD    *
  OPTION COPY
  INREC IFTHEN=(WHEN=(1,1,CH,EQ,C'2'),OVERLAY=(1:C'1'))
/*
Back to top
View user's profile Send private message
revdpoel

New User


Joined: 01 Nov 2006
Posts: 56

PostPosted: Wed Mar 11, 2009 9:31 pm
Reply with quote

it works
thanx
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 How to split large record length file... DFSORT/ICETOOL 10
No new posts INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts FINDREP - Only first record from give... DFSORT/ICETOOL 3
No new posts To find whether record count are true... DFSORT/ICETOOL 6
Search our Forums:

Back to Top