IBM Version 4 manual Proces Begsr, Move Qusis, Lststatus Doueq, Qusis Ifeq Oreq, Qusnbrle Ifgt

Models: Version 4

1 505
Download 505 pages 30.92 Kb
Page 246
Image 246

C\ Start of subroutines

 

 

 

 

C\

 

 

 

 

 

 

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

 

C

PROCES

BEGSR

 

 

 

 

C\

 

 

 

 

 

 

C\ This subroutine processes each entry returned by QSYLO￿BJP

 

C\

 

 

 

 

 

 

C\

 

 

 

 

 

 

C\ Do until the list is complete

 

 

 

C\

 

 

 

 

 

 

C

 

MOVE

QUSIS

LST_STATUS

1

 

C

LST_STATUS

DOUEQ

'C'

 

 

 

C\

 

 

 

 

 

 

C\ If valid information was returned

 

 

 

C\

 

 

 

 

 

 

C

QUSIS

IFEQ

'C'

 

 

 

C

QUSIS

OREQ

'P'

 

 

 

C\

 

 

 

 

 

 

C\ and list entries

were found

 

 

 

 

C\

 

 

 

 

 

 

C

QUSNBRLE

IFGT

ð

 

 

 

C\

 

 

 

 

 

 

C\ set LSTPTR to the first byte of the user space

 

 

C\

 

 

 

 

 

 

C

 

EVAL

LSTPTR = SPCPTR

 

 

C\

 

 

 

 

 

 

C\ increment LSTPTR

to the first list entry

 

 

 

C\

 

 

 

 

 

 

C

 

EVAL

LSTPTR = %ADDR(ARR(QUSOLD + 1))

 

C\

 

 

 

 

 

 

C\ and process all of the entries

 

 

 

C\

 

 

 

 

 

 

C

 

DO

QUSNBRLE

 

 

 

C

QSYOBJT12

IFEQ

'\SQLPKG'

 

 

 

C\

 

 

 

 

 

 

C\ Process \SQLPKG type

 

 

 

 

C\

 

 

 

 

 

 

C

 

ELSE

 

 

 

.2ð/

C\

 

 

 

 

 

C\ This 'ELSE' logic is the potential bug in this program. In

C\ releases prior to V2R3 only \SQLPKGs and \PGMs could adop￿t

C\ owner authority,

and this program is assuming that if th￿e

C\ object type is not \SQLPKG then it must be a \PGM.

In V2R3

C\ a new type of object (the \SRVPGM) was introduced.

As this

C\ program is written, all \SRVPGMs that adopt the owner pro￿file

C\ will be processed as if they were \PGMs -- this erroneous

C\ processing could

definitely cause problems.

 

C\

 

 

 

 

 

C

QSYNAMEð5

DSPLY

 

 

 

C

 

END

 

 

 

C\

 

 

 

 

 

 

C\ after each entry, increment LSTPTR to the next entry

 

 

C\

 

 

 

 

 

 

C

 

EVAL

LSTPTR = %ADDR(ARR(QUSSEE + 1))

 

C

 

END

 

 

 

 

C

 

END

 

 

 

 

C\

 

 

 

 

 

 

C\ When all entries

in this user space have been processed,￿ check

 

9-40System API Programming V4R1

Page 246
Image 246
IBM Version 4 Proces Begsr, Move Qusis, Lststatus Doueq, Qusis Ifeq Oreq, Qusnbrle Ifgt, Eval Lstptr = Spcptr, Dsply END