C move src_line line_nbr
Cᑍ
Cᑍ Record the status code as data
Cᑍ
C movel status data
Cᑍ
Cᑍ Record where status located in data
Cᑍ
C eval data_off = 1
C eval data_len = 5
C eval data# = 1
Cᑍ
Cᑍ For illustration purposes, dump the program object
Cᑍ
C eval %SUBST(objl:1:3) = pgm_name 1
C eval %SUBST(objl:31:3) = lib_name
C eval %SUBST(objl:61:1) = 'ᑍPGM'
C eval objl# = 1
Cᑍ
Cᑍ Call the Report Software Error API
Cᑍ
C call 'QPDLOGER'
C parm pgm_name
C parm exception msgid 12
C parm msgkey 4
C parm line_nbr
C parm 'Y' joblog 1
C parm data
C parm datapt
C parm data#
C parm objl
C parm objl#
C parm qusec
Cᑍ
Cᑍ If an error on the API call, then indicate a terminal error
Cᑍ
C qusbavl ifgt
C 'Terminal err'dsply
C end
C else
Cᑍ
Cᑍ If error within ᑍPSSR, then indicate ᑍPSSR error
Cᑍ
C 'ᑍPSSR error' dsply
C end
Cᑍ
Cᑍ No matter how the program got to the ᑍPSSR, end the program
Cᑍ
C move '1' ᑍinlr
C return
C endsr
Appendix B. Original Examples in Additional Languages B-121