IBM Version 4 manual To a User Space-ILE RPG Example

Models: Version 4

1 505
Download 505 pages 30.92 Kb
Page 433
Image 433

DISPLAY EXCEPTION-ID OF QUS-EC. PERFORM PROGRAM-DONE.

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

PROGRAM-DONE.

\

\Exit the program

STOP RUN.

Retrieving a File Description

to a User Space—ILE RPG Example

Refer to

“Retrieving a File Description to a User Space—ILE C Exampl

page A-11

for the original example.

D\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

D\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

D\

 

 

D\

Program:

RTVFD

D\

 

 

D\

Language:

ILE RPG

D\

 

 

D\

Description:

This program retrieves a file definition

D\

 

template to a user space.

D\

 

 

D\

APIs Used:

QDBRTVFD - Retrieve File Description

D\

 

QUSCRTUS - Create User Space

D\

 

QUSCUSAT - Change User Space Attributes

D\

 

QUSPTRUS - Retrieve a pointer to a User Space

D\

 

 

D\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

D\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

D\

D\ Error Code parameter include

D\

D/COPY QSYSINC/QRPGLESRC,QUSEC

D\

D\ Not shown due to its size, this program also includes QDB￿RTVFD

D\ and defines all of the data structures in QDBRTVFD as be￿ing

D\ BASED(SPCPTR). For illustrative purposes, this sample shows

D\ only the first significant data structure.

D\

D\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

D\

D\File Definition Template (FDT) Header

D\

D\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

D\This section is always located at the beginning of the

D\returned data.

D\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

DQDBQ25

DS

BASED(SPCPTR)

D\

 

Header information - The

D\

 

FDT starts here

D QDBFYRET

1

4B ð

D\

 

Bytes returned - The length

D\

 

of the data returned

D QDBFYAVL

5

8B ð

D\

 

Bytes available - The number

D\

 

of bytes provided for the

 

Appendix

B. Original Examples in Additional BLanguages-155

Page 433
Image 433
IBM Version 4 manual To a User Space-ILE RPG Example