Cᑍ Process the data based on key type
Cᑍ
C QUSKRC CASEQ21 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 1
O PAGES# 25
O OPNDAT 4
OQSYSPRT E LSTERR
Chapter 3. Common Information across APIs—Basic (OPM) Example
3-27