I have two PS files say 1 and 2. File 1 & File 2 are having a LRECL=133.
Now Suppose File1 is having 5 columns A,B,C,D,E and File2 is having Columns F,G,H. I want to concatenate Columns A,B,D,F,G into another file say File3. Can anybody please let me know how to put these columns from two different files into another file. File3 is having LRECL=100.
Thanks
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
GaganGarg,
If you want more help with this, you have to give more details.
Please show an example of the records in each input file (relevant fields only) and what you expect for output. Explain the "rules" for getting from input to output. Give the starting position, length and format of each relevant field. Give the RECFM and LRECL of the input files. If file1 can have duplicates within it, show that in your example. If file2 can have duplicates within it, show that in your example.
Also, run this job and show the //SYSOUT messages you receive, so I can see what level you're at:
Hi,
LRECL for File 1 and File2 is 133. File3 (output file) is having LRECL=100. Length of column A=10, column B=12, Column C=5, column D=7, Column E=16, column F=10, Column G=12, Column H=14.
File1 and File2 are having equal number of records and There is 1:1 mapping between the file1 and file2 records, I mean record 1 is mapped to record 1 and record 2 is mapped to record 2 and so on.
File1, File2 and File3 are having RECFM=FB. All the fields in the file1 and 2 are of CH type. Files can have duplicates.
File1:
Code:
Command ===>
****** ***************************** Top of Data *************
000100 ABCDEFCODE23456789012123457RAMESHGXXXXXXXXXXXXXXXX
000101 ABCDEFCODE23456789012123457RAMESHGXXXXXXXXXXXXXXXX
000200 MNBRKTCODE23456789012123457SHARMALYYYYYYYYYYYYYYYY
****** **************************** Bottom of Data ***********
File2:
Code:
Command ===> Scroll ===> CSR
=COLS> ----+----1----+----2----+----3----+----4----+----5----+----6----+----7--
****** ***************************** Top of Data ******************************
000100 BILL PENDG00000000123DATE05-05-2010
000110 BILL CLEAR00000000000DATE16-05-2010
000120 BILL CLEAR00000001290DATE04-05-2010
****** **************************** Bottom of Data ****************************
File3:
Code:
****** ***************************** Top of Data ******************
000100 ABCDEFCODE234567890121RAMESHGBILL PENDG00000000123
000200 ABCDEFCODE234567890121RAMESHGBILL CLEAR00000000000
000300 MNBRKTCODE234567890121SHARMALBILL CLEAR00000001290
****** **************************** Bottom of Data ****************
My Client mainframe installation is using the DFSORT and please find below the scrrenshot for spool messages after submitting the sort step:
Code:
COMMAND INPUT ===> SCROLL ===> CSR
********************************* TOP OF DATA **********************************
ICE143I 0 BLOCKSET COPY TECHNIQUE SELECTED
ICE250I 0 VISIT http://www.ibm.com/storage/dfsort FOR DFSORT PAPERS, EXAMPLES AN
ICE000I 1 - CONTROL STATEMENTS FOR 5694-A01, Z/OS DFSORT V1R10 - 23:43 ON SUN MA
OPTION COPY
ICE201I F RECORD TYPE IS F - DATA STARTS IN POSITION 1
ICE751I 0 C5-K90014 C6-K90014 C7-K45047 C8-K42136 E9-K40168 C9-BASE E5-K45240
ICE193I 0 ICEAM1 INVOCATION ENVIRONMENT IN EFFECT - ICEAM1 ENVIRONMENT SELECTED