I have two files
File1 having 80 LRECL
File2 having 818 Lrecl
In file1 at position 11 with length 6 i have to match with the file2 at position 38 with length 6 and join the records in the file1 at position 43 length 35 and over lay in the in file3.
In file 1 i have data like Lrecl 80 Key field is at position 11 and length is 6
and the group name is at position 43 and length is 35
Code:
000001 India
000002 US
000003 Melbourne
000004 Denmark
In file2 the data is like Lrecl 818 Key field is at position 38 and length is 6
Code:
India 000001 53 63 45
US 000002 63 41 86
Melbourne 000003 78 87 98
Denmark 000004 69 58 47
pairs 000005 21 32 21
new york 000007 11 10 11
i want to join these two files. I want the records in file 1 as it is the details in the file 2 should come in my output file. the output should come like this
Code:
India 000001 53 63 45
US 000002 63 41 86
Melbourne 000003 78 87 98
Denmark 000004 69 58 47
Please help me in this regard... i tried with sync sort but i m getting sort exceeded and while joining using ice tool i m getting the records in the file 2 which are not in file 1
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
Hello,
Is WORK the proper unit for sortwork on this system?
Is there enough space available? You might try an experiment with a primary of 25 and no secondary specified in the jcl. You might also try sysda instead of work - just as an experiment.
With all possible parm parameters using MAX sort i tried but of no use it is giving the same error and i tried using as many work space with maximum cylinders.
I think it is not working with syncsort. With icetool it is joining but i m getting more records in out file.
Please find the icetool jcl and can u please tell me whether i m going correct or not
DIT TST.INFILE1 Columns 00001 00072
===> Scroll ===> CSR
----+----1----+----2----+----3----+----4----+----5----+----6----+----7--
***************************** Top of Data ******************************
000001 INDIA_________________________
000002 US____________________________
000003 MELBOURNE_____________________
000004 DENMARK_______________________
and File 2:
Code:
DIT TST.INFILE2 Columns 00001 00072
===> Scroll ===> CSR
----+----1----+----2----+----3----+----4----+----5----+----6----+----7--
***************************** Top of Data ******************************
XXXXXXXXXXXXXXXXXXXXXXXIndia 000001 53 63 45
XXXXXXXXXXXXXXXXXXXXXXXUS 000002 63 41 86
XXXXXXXXXXXXXXXXXXXXXXXMelbourne 000003 78 87 98
XXXXXXXXXXXXXXXXXXXXXXXDenmark 000004 69 58 47
XXXXXXXXXXXXXXXXXXXXXXXpairs 000005 21 32 21
XXXXXXXXXXXXXXXXXXXXXXXnew york 000007 11 10 11
and got
Code:
DIT TST.OUTFILE Columns 00001 000
===> Scroll ===> CS
----+----1----+----2----+----3----+----4----+----5----+----6----+----
***************************** Top of Data ***************************
-Warning- The UNDO command is not available until you change
your edit profile using the command RECOVERY ON.
INDIA__________________________ XXXXXXXXXXXXXXXXXXXXXXXIndia
US_____________________________ XXXXXXXXXXXXXXXXXXXXXXXUS
MELBOURNE______________________ XXXXXXXXXXXXXXXXXXXXXXXMelbourne
DENMARK________________________ XXXXXXXXXXXXXXXXXXXXXXXDenmark
Code:
DIT TST.OUTFILE Columns 00070 00141
===> Scroll ===> CSR
7----+----8----+----9----+----0----+----1----+----2----+----3----+----4
***************************** Top of Data *****************************
-Warning- The UNDO command is not available until you change
your edit profile using the command RECOVERY ON.
000001 53 63 45
000002 63 41 86
000003 78 87 98
000004 69 58 47
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
Dick, the esoteric for the DASD is something that can vary from site to site. I have worked in quite a few where the temporary dataset pool was accessed via UNIT=WORK
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
Hi Expat,
Yup, i've seen work, temp, scrat, and a few others, but sometimes they are extremely low on space<g>. Stuff that should be transient (or not exist at all) winds up cluttering the volumes. . . I do remember one place where a programmer asked me why he couldn't create a particular dataset. Seems like they'd gotten "not cat 2" many, many times and had an allocation on every volume in the group. Only one in the catalog, but a vtoc entry on every available volume. . .
I thought that sysda might show something. . .
I'm also still confused by the "MAX sort" reference.