Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Converting one file layout to another

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: Converting one file layout to another
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

Moderator Team Head


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

PostPosted: Thu Jun 29, 2006 5:21 am    Post subject: Re: Converting one file layout to another
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 Moderator


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

PostPosted: Thu Jun 29, 2006 5:58 am    Post subject:
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:

http://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    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 Compare yesterday's date to the one o... migusd SYNCSORT 7 Fri Sep 22, 2017 11:35 pm
No new posts Split 1 file into 10 output Files - S... Prasanth Kumar SYNCSORT 5 Sat Sep 16, 2017 12:02 am
No new posts BUILD OUTFIL based on condition other... balaji81_k DFSORT/ICETOOL 13 Fri Sep 08, 2017 11:06 pm
No new posts Skip file from delete pema_yozer All Other Mainframe Topics 3 Tue Aug 29, 2017 3:19 pm
No new posts editting the file by inserting zeros ... pramodrsingh DFSORT/ICETOOL 9 Mon Aug 21, 2017 5:58 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us