Joined: 03 Jan 2006 Posts: 13 Location: Bangalore india
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.
Joined: 26 Apr 2004 Posts: 4650 Location: Raleigh, NC, USA
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.
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:
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: