IBM Version 4 manual Move 2 to NBR-RECORDS, Move 3 to CONTROL-KEY of QUS-VLEN-REC-4

Models: Version 4

1 505
Download 505 pages 30.92 Kb
Page 327
Image 327

\the API using a variable length record. Each record must

\start on a 4-byte boundary.

\

\Set the total number of controls that are being specified￿ on

\the call. This program lets the API take the default for the

\controls that are not specified.

\

MOVE 2 TO NBR-RECORDS.

\

\Set the values for the two controls that are specified:

\Maximum number of exit programs = 1ð

\Exit point description = 'EXIT POINT EXAMPLE'

\

MOVE 3 TO CONTROL-KEY OF QUS-VLEN-REC-4.

MOVE 4 TO LENGTH-DATA OF QUS-VLEN-REC-4. MOVE 1ð TO BINARY-NUMBER.

MOVE BINARY-CHAR TO VAR-RECORDS((VAR-OFFSET + 12):4).

PERFORM CALCULATE-NEXT-OFFSET.

MOVE 8 TO CONTROL-KEY OF QUS-VLEN-REC-4.

MOVE 5ð TO LENGTH-DATA OF QUS-VLEN-REC-4.

MOVE "EXIT POINT EXAMPLE"

TO VAR-RECORDS((VAR-OFFSET + 12):5ð).

PERFORM CALCULATE-NEXT-OFFSET.

C\

C\ Call the API to add the exit point. C\

CALL "QUSRGPT" USING EXIT-POINT-NAME OF MISC, FORMAT-NAME OF MISC, VARREC, QUS-EC.

C\

C\ If an exception occurs, the API returns the exception in￿ the C\ error code parameter. The bytes available field is set to C\ zero if no exception occurs and greater than zero if an

C\ exception does occur. C\

IF BYTES-AVAILABLE OF QUS-EC > ð

OPEN OUTPUT LISTING,

MOVE EXCEPTION-ID OF QUS-EC

TO EXCEPTION-ID OF BAD-REG, WRITE LIST-LINE FROM BAD-REG, STOP RUN.

\

\If the call to register an exit point is successful, add

\an exit program to the exit point.

\

\Set the total number of exit program attributes that are ￿being

\specified on the call. This program lets the API take the

\default for the attributes that are not specified. Each

\attribute record must be 4-byte aligned.

\

MOVE 2 TO NBR-RECORDS. MOVE 1 TO VAR-OFFSET.

\

 

 

 

\ Set the values

for the

two attributes that are being spec￿ified:

\

Replace exit

program

= 1

\Exit program data CCSID = 37

MOVE 4 TO CONTROL-KEY OF QUS-VLEN-REC-4.

Appendix B. Original Examples in Additional BLanguages-49

Page 327
Image 327
IBM Version 4 manual Move 2 to NBR-RECORDS, Move 3 to CONTROL-KEY of QUS-VLEN-REC-4, Move Exit Point Example