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

COPY header to different format


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

New User


Joined: 19 Jun 2008
Posts: 91
Location: banglore

PostPosted: Fri Feb 20, 2009 6:01 pm
Reply with quote

Hi,

I have header in file 1 as

1|06|U.S.A.|New York|Compliance|2008-12-12-05.52.19.844818

i need to copy the file contents to another file but the header has to be chagned to

1|04|United Kingdom|London|Compliance|2008-12-12-05.52.19.844818

the file is VB format with LRECL 2000.

U.S.A. has to be changed to United Kingdom .. the lengths are different ....

If a replace option is not available creating a new header will also do with the system time at the end ..

Please help.
Back to top
View user's profile Send private message
ashimer

Active Member


Joined: 13 Feb 2004
Posts: 551
Location: Bangalore

PostPosted: Fri Feb 20, 2009 7:23 pm
Reply with quote

chk this sort card

Code:

//SYSIN DD *
  OPTION COPY
  INREC IFTHEN=(WHEN=(5,1,CH,EQ,C'1'),
    OVERLAY=(43:37,26,5:C'1|04|United Kingdom|London|Compliance|'))
/*


if youe header is always constant except for timestamp
Back to top
View user's profile Send private message
bhairon singh rathore

New User


Joined: 19 Jun 2008
Posts: 91
Location: banglore

PostPosted: Fri Feb 20, 2009 7:48 pm
Reply with quote

thanks ashimer icon_biggrin.gif
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: Fri Feb 20, 2009 10:43 pm
Reply with quote

Here's a more straightforward DFSORT job to do it:

Code:

//S1    EXEC  PGM=SORT
//SYSOUT    DD  SYSOUT=*
//SORTIN DD DSN=...  input file (VB)
//SORTOUT DD DSN=...  output file (VB)
//SYSIN    DD    *
  OPTION COPY
  INREC IFTHEN=(WHEN=(5,1,CH,EQ,C'1'),
    BUILD=(1,6,C'04|United Kingdom|London',25))
/*
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 Populate last day of the Month in MMD... SYNCSORT 2
No new posts Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
No new posts VB to VB copy - Full length reached SYNCSORT 8
No new posts Need to convert date format DFSORT/ICETOOL 20
No new posts InfoSphere OPTIM CSV ouput vs DSNTIUA... IBM Tools 3
Search our Forums:

Back to Top