IDENTIFICATION DIVISION. PROGRAM-ID. TEMPFILE. INPUT-OUTPUT SECTION. FILE-CONTROL. SELECT temp ASSIGN TO ADDRESS temp-area ORGANIZATION LINE SEQUENTIAL. FILE SECTION. FD temp. 01 temp-rec. 03 curr-time PIC 9(8). 03 some-data PIC X(32). WORKING-STORAGE SECTION. 77 temp-area PIC X ANY LENGTH. PROCEDURE DIVISION. MAIN. *create the memory file OPEN OUTPUT temp. *write something into it PERFORM 1000 TIMES |this is a useless statement |here you'll use the logic to get the record data, instead ACCEPT temp-rec FROM TIME |----- WRITE temp-rec END-PERFORM. CLOSE temp. *read the file content from memoryh OPEN INPUT temp. PERFORM UNTIL EXIT READ temp NEXT AT END EXIT PERFORM NOT AT END |this statement is here for debug purposes |here you will manage the record read DISPLAY temp-rec | END-READ END-PERFORM. CLOSE temp. *delete the file to free memory DELETE FILE temp. *end of test GOBACK.