Input pipes

The CSA uses input pipes to read rows of data retrieved from a database or LAN-based service. This COBOL II example shows a CSA opening, reading from, and closing a pipe:

MOVE 'INPUT' TO SPMODE
 MOVE 'DB2' TO SPFORMAT.
 CALL OPENPIPE USING SPAREA.
 CALL GETPIPE USING SPAREA.
 CALL CLOSPIPE USING SPAREA.
 CALL GETMSG USING SPAREA.

– defines an input pipe – defines input pipe as DB2 format – opens the pipe – reads from the pipe – closes the pipe – gets messages from the local platform