\ DISPLAY THE INFORMATION RETURNED

 

 

C

MOVELQUSDD

RECVR

52

C

DSPLY

 

RECVR

 

C

ADD

52

START

.1ð/

C

ADD

1

X

 

C

END

 

 

 

 

\

 

 

 

 

\ DELETE THE SPACE THAT HELD THE DATA

 

C

CALL 'QUSDLTUS'

 

 

C

PARM

 

SPCNAM

 

C

PARM

 

QUSBN

 

 

\

 

 

 

C

SETON

 

 

LR

Defining List Entry

Format Lengths—Example

of

Correct

Coding

 

 

 

 

 

The following program correctly uses

the

list entry length

that

is

defi

space

header

for the

QUSRTVUS

API

to

advance from

one

entry to

the

is shown .at11/ on page 9-17. If you

use this value in your program,

yo

always

have the correct

list entry

length regardless

of

the

version o

the

API.

 

 

 

 

 

 

 

 

 

 

\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

 

 

 

 

\

 

 

 

 

 

 

 

 

 

 

 

 

\Program Name: PGM2

 

 

 

 

 

 

 

 

 

 

\

 

 

 

 

 

 

 

 

 

 

 

 

\Program Language:

RPG

 

 

 

 

 

 

 

 

 

\

 

 

 

 

 

 

 

 

 

 

 

 

\Description: This sample program illustrates the correc￿t

\way of using list entry length formats.

\Header Files Included: QUSEC - Error Code Parameter

\

QUSLJOB - List

Job API

\

QUSGEN

- User

Space Format for Generic Header

\

 

 

 

\APIs Used: QUSCRTUS - Create

User Space

\QUSLJOB - List Job

\QUSRTVUS - Retrieve User Space

\QUSDLTUS - Delete User Space

\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

\THIS PROGRAM WILL CREATE THE NECESSARY SPACE AND THEN CA￿LL

\THE QUSLJOB API TO GET A LIST OF ALL ACTIVE JOBS ON THE SYS￿TEM.

I/COPY QSYSINC/QRPGSRC,QUSGEN

 

 

I/COPY QSYSINC/QRPGSRC,QUSLJOB

 

 

I/COPY QSYSINC/QRPGSRC,QUSEC

 

 

\

 

 

 

 

 

\\

JOB NAME STRUCTURE FOR CALLING QUSLJOB

 

IJOBNAM

DS

 

 

 

I I

 

'\ALL

'

1

1ð JOB

I I

 

'\ALL

'

11

2ð USER

I I

 

'\ALL'

 

21

26 JOBNUM

\

 

 

 

 

 

\\

DATA STRUCTURE TO HOLD SPACE NAME

 

 

ISPCNAM

DS

 

 

 

I I

 

'SPCNAME

'

1

1ð SPC

I I

 

'QTEMP

'

11

2ð LIB

\\

OTHER ASSORTED VARIABLES

 

 

I

 

DS

 

 

 

I I

 

2ððð

B

1

4ðSIZ

I

 

 

B

5

8ðSTART

I

 

 

B

9

12ðLENDTA

I I

 

X'ðð'

 

13

13 INTVAL

\

 

 

 

 

 

9-16System API Programming

V4R1

 

 

 

Page 222
Image 222
IBM Version 4 manual Coding, Movelqusdd Recvr, Recvr ADD Start END \ Delete the Space That Held the Data, Qusrtvus API