IBM Version 4 manual Data Queue-Examples, Data Queue-ILE Cobol Example

Models: Version 4

1 505
Download 505 pages 30.92 Kb
Page 443
Image 443

C\ QDBRTVFD to use the User Space.

 

 

C\

 

 

 

 

 

C

 

CALL

'QDBRTVFD'

 

 

C

 

PARM

 

QDBQ25

 

C

 

PARM

167767ð4

SPC_SIZE

 

C

 

PARM

 

FILE_USED

 

C

 

PARM

'FILDð1ðð'

FORMAT

 

C

 

PARM

 

FILE_NAME

 

C

 

PARM

 

FMT_NAME

 

C

 

PARM

 

OVERRIDES

 

C

 

PARM

 

SYSTEM

 

C

 

PARM

 

FORMAT_1

 

C

 

PARM

 

QUSEC

 

C\

 

 

 

 

 

C\ Check for errors on QDBRTVFD

 

 

C\

 

 

 

 

 

C

QUSBAVL

IFGT

ð

 

 

C

 

MOVEL

'QDBRTVFD'

APINAM

C

 

EXSR

APIERR

 

 

C

 

END

 

 

 

C

 

ENDSR

 

 

 

C\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

C

APIERR

BEGSR

 

 

 

C\

 

 

 

 

 

C\ Log any error encountered, and exit the program

 

C\

 

 

 

 

 

C

APINAM

DSPLY

 

 

 

C

QUSEI

DSPLY

 

 

 

C

 

EXSR

DONE

 

 

C

 

ENDSR

 

 

 

C\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

C

DONE

BEGSR

 

 

 

C\

 

 

 

 

 

C\ Exit the program

 

 

 

 

C\

 

 

 

 

 

C

 

EVAL

\INLR = '1'

 

 

C

 

RETURN

 

 

 

C

 

ENDSR

 

 

 

Data Queue—Examples

This section includes the examples in “Using Data Queues versus User page A-15.

Data Queue—ILE COBOL Example

Refer to “Data Queue—ILE C Example” on page A-16 for the original ex The following program also works with OPM COBOL.

IDENTIFICATION DIVISION.

\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

\

\Program Name: DQUEUEX

\Programming Language: COBOL

\Description: This program illustrates how to use APIs to

Appendix B. Original Examples in Additional BLanguages-165

Page 443
Image 443
IBM Version 4 manual Data Queue-Examples, Data Queue-ILE Cobol Example