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 parame￿ter.

C

EXSR ERRCOD

C\

 

C\ Look at the generic header. This contains information

C\ about the list data section that is needed when processi￿ng

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 parame￿ter.

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 val￿ues

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 parame￿ter.

C

EXSR

ERRCOD

 

C\

 

 

 

C\

 

 

 

C\ Process the objects.

 

 

C\

 

 

 

C

ADD

1

COUNT

C

ADD

QUSBPT

STRPOS

C

ENDDO

 

 

9-34System API Programming V4R1

Page 240
Image 240
IBM Version 4 manual Oreq, Qusbpq ADD Strpos