IBM Version 4 manual 96System API Programming V4R1

Models: Version 4

1 505
Download 505 pages 30.92 Kb
Page 374
Image 374

} /\ apierr \/

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

/\ Function:

getlst

\/

/\

 

\/

/\ Description:

This function calls QSYLOBJP to build a list.

\/

/\

 

\/

/\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\/ void getlst()

{

memcpy(mbr_list, "OBJPð2ðð", 8); /\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\/

/\

Call QSYLOBJP

API to

generate a list. The continuation handle

\/

/\

is set by the

caller

of this function.

\/

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

QSYLOBJP(space_name,

/\ User space and library

\/

mbr_list,

/\ Member list

\/

usr_prf,

/\ User profile

\/

obj_type,

/\ Object type

\/

cont_hdl,

/\ Continuation handle .3/

\/

&error_code);

/\ Error code

\/

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

/\ Check for errors on QSYLOBJP.\/ /\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\/ if(error_code.ec_fields.Bytes_Available > ð)

{

memcpy(api_name, "QSYLOBJP ", 1ð); apierr();

}

} /\ getlst \/ /\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\/

/\ Function:

init

\/

/\

 

\/

/\ Description:

This function does all the necessary initialization \/

/\

for this program.

\/

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

void init()

 

 

{

 

 

memcpy(space_name, "ADOPTS

QTEMP

", 2ð);

space_init = ðxðð;

 

 

memcpy(mbr_list, "OBJPð2ðð", 8);

 

memcpy(rjobd_fmt, "OBJDð1ðð", 8);

 

memcpy(space_type, "\USRSPC

", 1ð);

 

memcpy(ext_attr, "QSYLOBJP

", 1ð);

 

memcpy(space_auth, "\ALL

", 1ð);

 

memcpy(space_rep, "\YES

", 1ð);

 

memcpy(space_dmn, "\USER

", 1ð);

 

/\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\/ /\ Open QPRINT file so that data can be written to it. If the file \/

/\ cannot be opened, print a message and exit.\/ /\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\/ if((record = fopen("QPRINT", "wb, lrecl=132, type=record")) == NUL￿L)

B-96System API Programming V4R1

Page 374
Image 374
IBM Version 4 manual 96System API Programming V4R1