/\ Initialize the attributes to change structure.\/ /\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\/

attrib_info.attrib_count = 1;

/\ Number

of

attributes

\/

attrib_info.keyinfo.Key = 3;

/\ Key of

attribute to change

\/

attrib_info.keyinfo.Length_Vlen_Record = 1;

 

 

 

 

/\

Length

of

data

\/

attrib_info.key_value='1';

/\

Autoextend space

\/

/\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\/

/\ Change the user space to be automatically extendable. \/ /\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\/

QUSCUSAT(return_lib,

/\ Return library

\/

user_space,

/\ User space

name and library \/

&attrib_info,

/\

Attributes

to change

\/

&error_code);

/\

Error code

 

\/

if (error_flag) { exit(1);

}

/\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\/

/\ Retrieve a pointer to the user space object.\/ /\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\/ QUSPTRUS(user_space,&space_ptr);

if (error_flag) { exit(1);

}

/\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\/ /\ Retrieve the file description information to the user sp￿ace. \/ /\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\/

QDBRTVFD(space_ptr,

 

/\ Receiver variable

 

\/

 

167767ð4,

 

/\ Return up to 16MB minus 512 \/

 

 

 

/\ bytes of data

 

\/

 

ret_file_lib,

/\ Returned file and library

\/

 

"FILDð1ðð",

 

/\ File definition template

\/

 

file_and_lib,

/\ File and library name

 

\/

 

record_fmt,

 

/\ Record format name

 

\/

 

"ð",

 

/\ No override processing

 

\/

 

"\LCL

",

/\ Local system

 

\/

 

"\INT

",

/\ Internal formats .1/

 

\/

 

&error_code);

/\ Error code

 

\/

if (error_flag) {

 

 

 

 

exit(1);

 

 

 

 

}

 

 

 

 

 

}

 

 

 

 

 

The

example program uses the value.1/). *INTAdescription(

and

examples of

the

internal (*INT)

and

external (*EXT) formats are provided in the “Ret

base

File Description

(QDBRTVFD) API”Systemin APIthe Referencebook.

A-14System API Programming V4R1

Page 270
Image 270
IBM Version 4 manual Lcl, Int