If you remove the period after the file name on our definition statement it should work without compiler errors.
Code:
FD INFILE1
BLOCK CONTAINS 0 RECORDS
RECORDING MODE IS F
LABEL RECORDS ARE STANDARD.
01 INF-LINE1.
05 STATE-1 PIC X(02).
05 KEY-1 PIC X(10).
05 TRANSID1 PIC X(10).
05 FILLER PIC X(58).
FD INFILE2
BLOCK CONTAINS 0 RECORDS
RECORDING MODE IS F
LABEL RECORDS ARE STANDARD.
01 INF-LINE2.
05 KEY-2 PIC X(10).
05 TRANSID2 PIC X(10).
05 FILLER PIC X(60).
This is a common mistake that happens when you look at a green screen all day long. I would recompile this and see if the other errors go away. It is always a good idea to recompile a program and then start fresh. Do you print the compile listing to scan through every-now-and-then. I would I think. The compile listing gives you all of the memory locations and the size of each record. It is very handy.
Code:
30 IGYGR1216-I A "RECORDING MODE" of "F" was assumed for file "INFILE2".
I am not certain on this error but I bet that you have the F a V for fixed block files. I would check this and if that is the case fix it. Do you start from scratch on programs or do you take a working program and then gut out what you do not need and then start working from that perspective. If this is the case you want to make certain that you have the recording mode set correctly for fixed block and variable block files.
321 IGYPS2121-S "STUB4" was not defined as a data-name. The statement was discarded.
The above error is simple that there is no working storage or variable named STUB4.
Hope this helps.