Good Morning
I have two files.
FILE1
-------
FIELD1 PIC x(1) --> 1 POSITIONS (One letter: 'F' or 'J')
FIELD2 PIC S9(9) COMP3 --> 5 POSITIONS hexadecimal
FIELD3 PIC X(4) --> 4 POSITIONS (not important)
FIELD4 PIC S9(15) COMP3 --> 8 POSITIONS (import field. It's not important)
FILE2
-------
FIELD1 PIC x(5) --> 5 POSITIONS (numeric)
FIELD2 PIC x(1) --> 1 POSITIONS (One letter: 'F' or 'J')
FIELD3 PIC S9(9) COMP3 --> 5 POSITIONS hexadecimal
FIELD4 PIC x(2) --> 2 POSITIONS (not important)
FIELD5 PIC S9(5) COMP3 --> 3 POSITIONS (not important)
The Key of FILE1 is FIELD1 and FIELD2. They have ordered by both fields and have not duplicates
The Key of FILE2 is FIELD2 and FIELD3. They have ordered by both fields and have not duplicates
I need create two output files:
- The first, with the same structure that input FILE1 + FIELD2, FIELD4 and FILE5 of FILE2. In this OUTPUT FILE1 write records that found at two files
- The second with the same structure that input FILE1 + '00000'. In this OUTPUT FILE2 write records that I have not found at file2
FILE1
F00001aaaabbbbbbbb
F00002aaaabbbbbbbb
F00005aaaabbbbbbbb
F00006aaaabbbbbbbb
J00001aaaabbbbbbbb
J00004aaaabbbbbbbb
J00005aaaabbbbbbbb
FILE2
22222F0000102AAA
11111F0000501BBB
22222F0000601CCC
55555J0000502CCC
OUTPUT FILE1 (28 positions)
F00001aaaabbbbbbbb2222202AAA
F00005aaaabbbbbbbb1111101BBB
F00006aaaabbbbbbbb2222201CCC
J00005aaaabbbbbbbb5555502CCC
OUTPUT FILE1 (23 positions)
F00002aaaabbbbbbbb00000
J00001aaaabbbbbbbb00000
J00004aaaabbbbbbbb00000
I use ICE201I G sort.
Thank you very much
(FI.- I want to be what it's the manual that I have read for this example because I have more similar example to do)