Cᑍ
C CALL 'QUSLOBJ'
C PARM USERSP
C PARM FORMAT
C PARM OBJECT
C PARM OBJTYP
C PARM QUSBN
Cᑍ See if any errors were returned in the error code parameter.
C EXSR ERRCOD
Cᑍ
Cᑍ Look at the generic header. This contains information
Cᑍ about the list data section that is needed when processing
Cᑍ the entries.
Cᑍ
C CALL 'QUSRTVUS'
C PARM USERSP
C PARM STRPOS
C PARM LENDTA
C PARM QUSBP
C PARM QUSBN
Cᑍ See if any errors were returned in the error code parameter.
C EXSR ERRCOD
Cᑍ
Cᑍ
Cᑍ Check the information status field, QUSBPJ, to see if the
Cᑍ API was able to return all the information. Possible values
Cᑍ are: C -- Complete and accurate
Cᑍ P -- Partial but accurate
Cᑍ I -- Incomplete.
Cᑍ
C QUSBPJ IFEQ 'C'
C QUSBPJ OREQ 'P'
Cᑍ
Cᑍ Check to see if any entries were put into the user space.
Cᑍ
C QUSBPS IFGT
C Z-ADD1 COUNT
Cᑍ Because RPG is Base 1, the offset must be increased by one.
Cᑍ
C QUSBPQ ADD 1 STRPOS 19
C Z-ADD3 LENDTA
Cᑍ Walk through all the entries in the user space.
C COUNT DOWLEQUSBPS
C CALL 'QUSRTVUS'
C PARM USERSP
C PARM STRPOS
C PARM LENDTA
C PARM QUSDM
C PARM QUSBN
Cᑍ See if any errors were returned in the error code parameter.
C EXSR ERRCOD
Cᑍ
Cᑍ
Cᑍ Process the objects.
Cᑍ
C ADD 1 COUNT
C ADD QUSBPT STRPOS
C ENDDO
9-34 System API Programming V4R1