CALL "A$LIST_USERS" USING opCode parameters GIVING returnCode |
opCode | ||
Open the list. | ||
Retrieve the next item in the list. | ||
Close a previously open list. | ||
parameters | Parameters depend on the opcode. |
working-storage section. copy "iscobol.def". 77 usrlist handle. 77 usr-id pic x(3). 77 usr-name pic x(32). 77 usr-addr pic x(32). 77 usr-pcname pic x(32). 77 usr-tid pic x(32). 77 usr-prog pic x(32). 77 usr-type pic 9. 77 usr-login pic x(16). 77 usr-count pic 9(5). ... procedure division. ... get-users-list. call "a$list-users" using listusr-open giving usrlist if usrlist < 1 display message "Error on User Count!" exit paragraph end-if move 0 to usr-count perform until 1 = 2 call "a$list-users" using listusr-next usrlist usr-id usr-name usr-addr usr-pcname usr-tid usr-prog usr-type usr-login if return-code = 0 exit perform end-if display "User ID: " usr-id " User Name: " usr-name add 1 to usr-count end-perform call "a$list-users" using listusr-close usrlist display message "Number of users connected : " usr-count . |