I have 2 files. FILE-1 has 100 records with LRECL=11 and FILE-2 has 100 records with LRECL=200. Both are FB format.
I need to create output file FILE-3 with 1 to 11 position data from FILE-1 and 12 to 211 data from FILE-2. I don’t have any key field in both the files.
In simple terms need to append each record from the FILE-1 to each record in FILE-2.
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
This is a link to the DFSORT smart tricks documentation which has many examples of matching records, including matching records one to one without keys.
Because the solution for sort related questions may vary from product to product, please ensure that you state clearly which sort product you are using.
If you are not sure, then by running a simple sort step shown below, you will be able to find out for yourself.
If the messages start with ICE then your product is DFSORT. Please also post the output of the complete line which has a message code ICE201I, as this will enable our DFSORT experts to determine which release of DFSORT that you have installed. This may also affect the solution offered.
If the messages start with WER or SYT then the product is SYNCSORT and should be posted in the JCL forum. Please also post the information telling which version of SYNCSORT is installed, as this may also affect the solution offered.
Thank you for taking your time to ensure that the valuable time of others is not wasted by offering inappropriate solutions which are not relevant due to the sort product being used and/or the release that is installed in you site.
Joined: 07 Dec 2007 Posts: 2205 Location: San Jose
sashi,
With z/OS DFSORT V1R5 PTF UK51706 or z/OS DFSORT V1R10 PTF UK51707, you can use the Joinkeys function like shown below to get the desired results. Since both files don't have a common key we add a SEQNUM at the end of each file using INREC for each file via JNF1CNTL and JNF2CNTL and use that as a key for matching
Hi,
I have two files A1 and A2.My requirement is to copy only ACCOUNT field form A1 and paste it to ACCOUNT filed in A2,without making any changes to other fileds in A2.In simple terms I want to replace accounts present in A2 with those present in A1.Both files have different formats,A1 is a VSAM file and A2 is a flat file.
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
Gursharan Khalsa,
I'm locking this topic.
Please start a new topic for this new question with more information on what you want to do:
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, indicate if you have the Nov, 2009 DFSORT PTF so I can tell if you can use JOINKEYS or not. To find out if you have the 2009 PTF, follow the instructions at: