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
 

 

COPY header to different format

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: COPY header to different format
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    Post subject:
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    Post subject:
Reply with quote

thanks ashimer icon_biggrin.gif
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


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

PostPosted: Fri Feb 20, 2009 10:43 pm    Post subject:
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    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 copy SEQ to PDS and create stats steve-myers JCL & VSAM 5 Thu Apr 27, 2017 1:15 am
No new posts Copy load modules and alias vasanthz IBM Tools 5 Thu Apr 20, 2017 6:31 am
No new posts Validating file with multiple header/... mohitsaini DFSORT/ICETOOL 6 Thu Apr 13, 2017 1:53 am
No new posts Format record to remove Leading zeroes Learncoholic DFSORT/ICETOOL 14 Wed Apr 05, 2017 2:43 pm
No new posts How to pick only YYMMDD from DATE1P (... atulbaviskar SYNCSORT 7 Wed Mar 22, 2017 11:39 am


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