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

Converting one file layout to another


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

New User


Joined: 03 Jan 2006
Posts: 13
Location: Bangalore india

PostPosted: Thu Jun 29, 2006 4:40 am
Reply with quote

Hi all,

I have the below requirement:

File 1 with a particular layout (Layout 1) having some FB record length.
File 2 with another layout (Layout 2) having different FB record length.

I know the field level details of both the files.

Now, i would like to know if we have both these file structures in two different Copybooks, could we use some JCL utility or something which take File 1 as input and can create File 2 with data from file one.

I can also define how fields in File 1 are mapped to fields in File 2.

Of course, i can write a progam to do but i was wondering if there is an alternate to this.

Thanks,
Puneet
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Thu Jun 29, 2006 5:21 am
Reply with quote

I moved this to the DFSORT forum since that is a viable option. However, for what it's worth, most shops would use a data mapping system (Cloverleaf, Gentran, Mercator, etc.) to do something like what you are asking.
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: Thu Jun 29, 2006 5:58 am
Reply with quote

Quote:
i would like to know if we have both these file structures in two different Copybooks, could we use some JCL utility or something which take File 1 as input and can create File 2 with data from file one.


You can do this with DFSORT, but you'll have to specify the output columns and input fields one at a time. It won't read the Copybooks and do it automatically. You can convert the COBOL declares to DFSORT Symbols using the REXX provided here:

www.ibm.com/servers/storage/support/software/sort/mvs/tricks/srtmst03.html#t12

You could then use the Symbols from the output Copybook for the output columns and the Symbols from the input Copybook for the input field names, but you'll still have to specify the output column symbols and input field symbols one at a time. Something like:

Code:

   OPTION COPY
   OUTREC BUILD=(outcol1:infield1,
       outcol2:infield2,
       ...)
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 Compare 2 files and retrive records f... DFSORT/ICETOOL 0
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Issues Converting From ZD to Signed N... DFSORT/ICETOOL 4
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
Search our Forums:

Back to Top