*>>SOURCE FORMAT IS FIXED *> *************************************************************** *> Author: *> Date: *> Purpose: expect controlled test *> Tectonics: cobc *> *************************************************************** identification division. program-id. expcob. environment division. configuration section. input-output section. file-control. select stdin assign to keyboard organization is line sequential . select stdout assign to display organization is line sequential . data division. file section. fd stdin. 01 expin pic x(80). fd stdout. 01 expout pic x(80). working-storage section. 01 outfield pic x(32). local-storage section. linkage section. screen section. *> ************************************************************** procedure division. 001-MAIN-PROCEDURE. OPEN INPUT stdin. OPEN OUTPUT stdout. call "C$SLEEP" using "2" end-call. move "Hello world" to expout write expout end-write call "C$SLEEP" using "3" end-call. *> DISPLAY "Hello world". read stdin. *> ACCEPT OUTFIELD. DISPLAY expin. call "C$SLEEP" using "3" end-call. *> WRITE OUTREC. move "exit" to expout write expout end-write *> DISPLAY "exit". *> CLOSE OUTFILE. STOP RUN. goback. end program expcob.