PARA2.
PERFORM UNTILL FILE-STAT1 NOT =10 OR FILE-STAT2 NOT=10
IF NUM1=NUM2
MOVE NUM1 TO NUM3
WRITE NUM3
END IF.
IF NUM1>NUM2
PERFORM UNTIL FILE-STAT2 NOT = 10
READ FILE2
IF NUM1 = NUM2
WRITE NUM3 FROM NUM1
GOTO PARA2
END IF.
END PERFORM
END IF
IF NUM1<NUM2
PERFORM UNTIL FILE-STAT1 NOT =10
READ FILE1
IF NUM1 = NUM2
WRITE NUM3 FROM NUM1
GOTO PARA2
END IF.
END PERFORM.
END IF.
END PERFORM.
I have attempted to "indent" you code.
There are many things wrong. This code will not compile. There are also mistakes which will not cause compile errors but which would make you program probably not work and certainly be difficult to understand.
When posting code here, we need to see the actual code you have attempted, unless you tell us it is "pseudo code".
You are missing hyphens in all your "end" constructs. Your fist UNTILL is not spelled correctly.
You are using full-stops/periods after your "end" constructs. It is best to leave them off.
You are using GO TO to leave your inline PERFORMs to restart from the top. This is a bad idea. If the code just naturally reaches the END-PERFORM, it will start at the top again all on its own with no extra code from you.
Study the program in the "sticky". As your mentor/trainer for some simple working programs to look at, to get an idea how code is used. Spend time thinking and writing out how you think something will work. Then go through it, on the paper, with test data. Have some columns for "variables" and note down the new values they have as you "go through" the code.
If you work out how to get the "simple" things going. then you'll have a technique to apply to more complex things. At some point, you won't need to write it out on paper, but you'll have trained yourself to "think" how it is working. You'll "think" as you are writing the code. You'll think "what will this loop do with the minimum value it can have? What will it do with the maxiumum value? What will it do with an "invalid" value?" and you'll code for all of those (even go back to the spec-writer, if they haven't covered something).
We can't train you here, but there is a lot of material for you to look at, and if you get stuck with something there'll be someone around.