C\ Process the data based on key type

 

C\

 

 

 

 

 

C

QUSKRC

CASEQ2ð1

FILNAM

.25/

C

QUSKRC

CASEQ211

PAGES

 

C

QUSKRC

CASEQ216

AGE

 

C

 

CAS

 

ERROR

 

C

 

END

 

 

 

C\

 

 

 

 

 

C\ Adjust X to address next keyed record returned

C\

 

 

 

 

 

C

 

ADD

QUSKRB

X

 

C

 

ENDDO

 

 

 

C\

 

 

 

 

 

C\ Output information

on spooled file

 

C\

 

 

 

 

 

C

 

EXCPTPRTLIN

 

.26/

C\

 

 

 

 

 

C\ Adjust START to address next entry

 

C\

 

 

 

 

 

C

 

ADD

1

COUNT

.27/

C

 

ADD

QUSBPT

START

 

C

 

ENDDO

 

 

 

C

 

ENDIF

 

 

 

C

 

ELSE

 

.15/

 

C

 

EXCPTLSTERR

 

 

C

 

ENDIF

 

 

 

C

 

ELSE

 

.13/

 

C

 

EXCPTHDRERR

 

 

C

 

ENDIF

 

 

 

C

 

MOVE '1'

\INLR

.28/

C

 

RETRN

 

 

 

C\

 

 

 

 

 

C\ Various subroutines

 

 

 

 

C\

 

 

 

 

 

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

C

FILNAM

BEGSR

 

 

 

C\

 

 

 

 

 

C\ Extract spooled file name for report

 

C\

 

 

 

 

 

C

 

MOVE \BLANKS

PRTFIL 1ð

C

QUSKRG

SUBSTRECVR:Y

PRTFIL

 

C

 

ENDSR

 

 

 

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

C

PAGES

BEGSR

 

 

 

C\

 

 

 

 

 

C\ Extract number of pages for report

 

C\

 

 

 

 

 

C

QUSKRG

SUBSTRECVR:Y

PAGESA

 

C

 

ENDSR

 

 

 

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

C

AGE

BEGSR

 

 

 

C\

 

 

 

 

 

C\ Extract age of spooled file for report

 

C\

 

 

 

 

 

C

 

MOVE \BLANKS

OPNDAT

7

C

QUSKRG

SUBSTRECVR:Y

OPNDAT

 

C

 

ENDSR

 

 

 

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

C

ERROR

BEGSR

 

 

 

C\

 

 

 

 

 

C\ If unknown key value, then display the value and end

C\

 

 

 

 

 

C

 

DSPLY

 

QUSKRC

 

C

 

MOVE '1'

\INLR

 

C

 

RETRN

 

 

 

C

 

ENDSR

 

 

 

O\

 

 

 

 

 

OQSYSPRT E

 

PRTLIN

 

 

O

 

PRTFIL

 

O

 

PAGES#

25

 

O

 

OPNDAT

 

OQSYSPRT E

 

LSTERR

 

 

Chapter 3. Common Information across APIs—Basic (OPM) 3-Example27

Page 79
Image 79
IBM Version 4 manual Common Information across APIs-Basic OPM 3-Example27