 IDENTIFICATION DIVISION.
 PROGRAM-ID. OPENSTMT.
 ENVIRONMENT DIVISION.
    INPUT-OUTPUT SECTION.
       FILE-CONTROL.
          SELECT SOMEFILE1 ASSIGN TO 'somefile1.txt'.
          SELECT SOMEFILE2 ASSIGN TO 'somefile2.txt'.
          SELECT SOMEFILE3 ASSIGN TO 'somefile3.txt'.
          SELECT SOMEFILE4 ASSIGN TO 'somefile4.txt'.
          SELECT SOMEFILE5 ASSIGN TO 'somefile5.txt'.
 DATA DIVISION.
    FILE SECTION.
         FD SOMEFILE1.
         FD SOMEFILE2.
         FD SOMEFILE3.
         FD SOMEFILE4.
         FD SOMEFILE5.
 PROCEDURE DIVISION.
    OPEN
       INPUT 
          SOMEFILE1 WITH NO REWIND
          SOMEFILE2 REVERSED
       OUTPUT
          SOMEFILE3 WITH NO REWIND
       I-O
          SOMEFILE4 SOMEFILE5
       EXTEND
          SOMEFILE4 SOMEFILE5.