\ DELETE THE SPACE THAT HELD THE DATA

C

CALL 'QUSDLTUS'

 

C

PARM

SPCNAM

C

PARM

QUSBN

 

\

 

C

SETON

LR

Defining Receiver Variables—Example

of

Correct

Coding

The

following

example program defines a larger receiver variable: 60 byt

is

shown at

position.9/ on

page 9-13. This increase in the receiver variable

up to 60 bytes of data to be received.

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

\

 

 

 

 

\Program Name: PGM2

 

 

\

 

 

 

 

\Program Language:

RPG

 

\

 

 

 

 

\Description: This sample program

illustrates the correc￿t

\

way of defining receiver

variables.

\

 

 

 

 

\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

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

\BRING IN THE ERROR STRUCTURE FROM QSYSINC

I/COPY QSYSINC/QRPGSRC,QUSEC

\BRING IN THE GENERIC USER SPACE HEADER FROM QSYSINC I/COPY QSYSINC/QRPGSRC,QUSGEN

\\ JOBLð1ðð FORMAT RETURNED FROM QUSLJOB API I/COPY QSYSINC/QRPGSRC,QUSLJOB

\\ 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

ISPCNAM

DS

 

 

 

I I

'SPCNAME

'

1

1ð SPC

I I

'QTEMP

'

11

2ð LIB

\\ OTHER ASSORTED VARIABLES

IDS

I I

2ððð

B

1

4ðSIZ

I

 

B

5

8ðSTART

I

 

B

9

12ðLENDTA

I I

X'ðð'

 

13

13 INTVAL

 

\

 

 

\ SET UP TO ACCEPT EXCEPTIONS

 

C

Z-ADD\ZEROS

QUSBNB

 

\

 

9-12System API Programming V4R1

Page 218
Image 218
IBM Version 4 manual Qusgen, JOB Name Structure for Calling Qusljob Ijobnam \ALL