Good morning.
First of all excuse if I do not write English well. I need your help
I have a file of 130 positions with three fields:
1.-CAMPO1 of 9 positions
2.-CAMPO2 of 119 positions
3.-CAMPO3 of 2 positions
The key is the CAMPO1. Has not duplicated. Always it has a letter and 8 numbers. The CAMPO2 is not important (comes informed but the information is not useful). The CAMPO3 is not important either. It has the values 01, 02 and 03 but they are not used
This file has 189 records
---------------------
I want to maching with another file of 332 positions. Has the following fields:
1.-CAMPO1 of 6 positions (hexadecimal format)
2.-CAMPO2 of 1 position. It is not important
3.-CAMPO3 of 9 positions. (coincides with the CAMPO1 of the previous file)
4.-CAMPO4 of 310 positions. It is not important
5.-CAMPO5 of 4 positions (the field has the values '0049' or other values
6.-CAMPO6 of 2 positions. It is not important
The file is arranged by the CAMPO3.
This file has 1.482.230 records
--------------------
I need to do a maching generating THREE FILES
If the CAMPO5 (the second file) is 0049 and the CAMPO1 (the first file) coincides with the CAMPO3 (the second file) I will write a file of 136 positions with the following structure:
1.-CAMPO1 of 9 positions (of the first file)
2.-CAMPO2 of 119 positions (of the first file)
3.-CAMPO3 of 2 positions (of the first file)
4.-CAMPO4 of 6 positions in hexadecimal (CAMPO1 of the second file)
If the CAMPO1 (the first file) coincides with the CAMPO3 (the second file) but the CAMPO5 (the second file) is not 0049 I will write a file of 139 positions with the following structure
1.-CAMPO1 of 9 positions (of the first file)
2.-CAMPO2 of 119 positions (of the first file)
3.-CAMPO3 of 2 positions (of the first file)
4.-CAMPO4 of 5 positions (with the literal ERROR)
5.-CAMPO5 of 4 positions (with the correct value of the CAMPO5 of the second file) (example: 0065, 0154, 167)
If he(she) was not finding the CAMPO1 (the first file) in the second file (CAMPO3) I will write a third file of 143 positions with the following structure
1.-CAMPO1 of 9 positions (of the first file)
2.-CAMPO2 of 119 positions (of the first file)
3.-CAMPO3 of 2 positions (of the first file)
4.-CAMPO4 of 5 positions (with the literal ERROR)
5.-CAMPO5 of 9 positions (With the literal NOT FOUND)
Thank's for your help
(I think that I have ICE201I F or G DFSORT function level. Tomorrow I verified DFSORT function level)