I am novice in DFSORT(coz I use DFSORT rarely) and trying to understand easy concepts but this one I am not able to think of. Can you please help me here.
I have Master record in second file. I want to compare this master record(which starts with M) with M record in first file and then copy this M record including the group(records following that M record, the first char could be N or F for such records but not M) records under it to third file. All non matching records should be discarded.
First file
===========
Code:
MSEAE40118315282X0080002SUMMER LEISURE PROMO 20120708+0000025000002000000000+00000.0000000000U000.00000002500+0000000000.00000XXX000250{AE4CAD200002572
FSEXXX0118315282X0080002AY11AA2012062820120703YVR YUL P +000000572XXX 112 AE4CAD300002572
FSEXRN0118315282X0080002QY11AA2012062920120703YUL YBG E +000000063XRN8682 AE4CAD300002572
MSEAE40118315282X0080002SUMMER LEISURE PROMO 20120708+0000025000002000000000+00000.0000000000U000.00000002500+0000000000.00000XRN000250{AE4CAD200002572
FSEXXX0118315282X0080002AY11AA2012062820120703YVR YUL P +000000572XXX 112 AE4CAD300002572
FSEXRN0118315282X0080002QY11AA2012062920120703YUL YBG E +000000063XRN8682 AE4CAD300002572
MSEAE40165361809X0080002SUMMER LEISURE PROMO 20120708+0000025000002000000000+00000.0000000000U000.00000002500+0000000000.00000XXX000250{AE4CAD200002572
FSEXXX0165361809X0080002AY10AA2012062920120703YUL LGA W +000000324XXX 744 AE4CAD300002572
FSEXXX0165361809X0080002AY10AA2012070220120705LGA YUL W +000000324XXX 753 AE4CAD300002572
MSEAE40175252238X0080002SUMMER LEISURE PROMO 20120708+0000025000002000000000+00000.0000000000U000.00000002500+0000000000.00000XXX000250{AE4CAD200002572
FSEXXX0175252238X0080002AY11AA2012070520120708YYZ YHZ P +000000200XXX 606 AE4CAD300002572
FSEXXX0175252238X0080002AY11AA2012062820120703YHZ YYZ P +000000200XXX1131 AE4CAD300002572
MSEAE40197387194X0080002SUMMER LEISURE PROMO 20120708+0000025000002000000000+00000.0000000000U000.00000002500+0000000000.00000XXX000250{AE4CAD200002572
FSEXXX0197387194X0080002AY10AA2012070420120707YYC YYZ V +000001670XXX 110 AE4CAD300002572
Joined: 07 Dec 2007 Posts: 2205 Location: San Jose
skgupta81,
1. What is the LRECL and RECFM of file1 and file2
2. What is the position and format of the key to be compared in both files.
3. Run the following JCL and show me the complete sysout , which helps us to determine the level of DFSORT.
Question 1: What is the LRECL and RECFM of file1 and file2
Both files have
RECFM=FB,
LRECL=165
2. What is the position and format of the key to be compared in both files.
The whole record in second file is the key. so the format is alphanumeric.
Above the long record(165) is seen in two lines but its actually a single line.
Please do let me know if you need more information.
I have 2 files, both of LRECL = 133 & RECFM = FB.
File 1 has key from position 22 to position 29.
File 2 has key from position 1 to position 8.
I need a ICETOOL condition when the key(1-8) from file 2 matches key(22-29) on file 1, write the complete record of the key match from file 1 to Out record data set(Output).
NOTE: File 2 has unique key records and File 1 has multiple keys and for each key they have multiple records/rows(I need the key record and the associated records/rows for that key.
Example:
File 1 Record Layout: Please find attachment for clear File 1 layout
When Key from File 2 matches key on File 1(even in multiple cases) write the complete record of file 1 into output
Example from above layout:
Key 12345678 from file 2 matches 2 times in file 1 with different record count like first occurrence in file 1 with key 12345678 has 8 records(including the Key record), I want all the 8 records into output (Matched records). Second occurrence with same key: 12345678 has 3 records which i want to put them in output 1(matched records) as well.