View previous topic :: View next topic
|
Author |
Message |
bhairon singh rathore
New User
Joined: 19 Jun 2008 Posts: 91 Location: banglore
|
|
|
|
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 |
|
|
ashimer
Active Member
Joined: 13 Feb 2004 Posts: 551 Location: Bangalore
|
|
|
|
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 |
|
|
bhairon singh rathore
New User
Joined: 19 Jun 2008 Posts: 91 Location: banglore
|
|
|
|
thanks ashimer |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
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 |
|
|
|