char

Exception_Data[1ðð];

}

error_code_t;

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

/\ Global Variables\/ /\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\/

char

api_name[1ð];

char

cont_hdl[2ð];

char

ext_attr[1ð];

char

list_status;

char

mbr_list[8];

char

obj_type[1ð];

char

rcvvar[8];

char

rjobd_fmt[8];

char

space_auth[1ð];

char

space_dmn[1ð];

char

space_init;

char

space_name[2ð];

char

space_rep[1ð];

char

space_text[5ð];

char

space_type[1ð];

char

usr_prf[1ð];

char

\usrspc_ptr, \usrspc_base;

int

rcvlen = 8;

int

size_entry;

int

space_size = 1;

error_code_t error_code;

FILE

\record;

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

/\ Function:

done

\/

/\

 

\/

/\ Description:

This function prints the end of listing print line

\/

/\

and returns to the caller.

\/

/\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\/ void done()

{

char command_string[32];

fwrite("\\\ End of List",1, 15, record); fclose(record);

exit();

} /\ done \/

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

/\ Function:

apierr

\/

/\

 

\/

/\ Description:

This function prints the API name, and exception

\/

/\

identifier of an error that occurred.

\/

/\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\/ void apierr()

{

printf("API: %.1ðs\n", api_name);

printf("Failed with exception: %.7s\n", error_code.ec_fields.Exception_Id);

done();

Appendix B. Original Examples in Additional BLanguages-95

Page 373
Image 373
IBM Version 4 manual Appendix B. Original Examples in Additional BLanguages-95