ð5

FORMAT-NAME-1

PIC

X(ð8).

 

 

ð5

OVERRIDES

PIC

X(ð1) VALUE

"ð".

 

ð5

SYSTEM

PIC

X(1ð) VALUE

"\LCL".

 

ð5

FORMAT-1

PIC

X(1ð) VALUE

"\INT".

 

ð5

EXT-ATTR

PIC

X(1ð).

 

 

ð5

SPACE-AUT

PIC

X(1ð) VALUE

"\CHANGE".

 

ð5

SPACE-TEXT

PIC

X(5ð) VALUE

"QDBRTVFD".

 

ð5

SPACE-REPLACE

PIC

X(1ð) VALUE

"\YES".

 

ð5

SPACE-DOMAIN

PIC

X(1ð) VALUE

"\USER".

 

ð5

API-NAME

PIC

X(1ð).

 

ð1 CHG-US-ATTR.

 

 

 

 

ð5

NBR-OF-ATTR

PIC S9(ð9) VALUE

1 BINARY.

 

ð5

ATTR-KEY

PIC S9(ð9) VALUE

3 BINARY.

 

ð5

DATA-SIZE

PIC S9(ð9) VALUE

1 BINARY.

\

ð5

ATTR-DATA

PIC

X(ð1) VALUE

"1".

 

 

 

 

 

LINKAGE

SECTION.

 

 

 

ð1

SPACE-NAME

PIC

X(2ð).

 

ð1

FILE-NAME

PIC

X(2ð).

 

ð1

FORMAT-NAME-PARM

PIC

X(1ð).

 

\

 

 

 

 

 

\Retrieve File Description API include.

COPY QDBRTVFD OF QSYSINC-QLBLSRC.

\Beginning of mainline

\

PROCEDURE DIVISION USING SPACE-NAME, FILE-NAME, FORMAT-NAME-PARM.

MAIN-LINE.

\

PERFORM INITIALIZE-SPACE. PERFORM PROCESS-SPACE. PERFORM PROGRAM-DONE.

\

\Start of subroutines

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

PROCESS-SPACE.

\The template returned from QDBRTVFD is now addressable b￿y way

\of SPACE-POINTER; as an example the program will now displ￿ay

\the access method for the file:

\

DISPLAY QDBFPACT OF QDB-QDBFH.

\

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

\

INITIALIZE-SPACE.

\

\One time initialization code for this program

\Set Error Code structure to not use exceptions

MOVE 16 TO BYTES-PROVIDED OF QUS-EC.

\Create a User Space for QDBRTVFD

\

Appendix B. Original Examples in Additional BLanguages-153

Page 431
Image 431
IBM Version 4 manual Overrides PIC, System PIC, FORMAT-1 PIC, Ext-Attr Pic, Space-Aut Pic, Space-Text Pic, Space-Domain Pic