/\ so we need to evaluate argc-1.\/ /\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\/

if (((argc - 1) < 2) ((argc - 1 > 2))) /\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\/

/\

We did not receive all of the required parameters so exit￿ the

\/

/\

program.

\/

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

{

exit(1);

}

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

/\ Move the two parameter passed in into qual_job_desc.\/ /\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\/ memcpy(qual_job_ptr, argv[1], 1ð);

qual_job_ptr += 1ð;

memcpy(qual_job_ptr, argv[2], 1ð);

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

/\ Set the error code parameter to 16.\/ /\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\/ error_code.ec_fields.Bytes_Provided = 16; .15/

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

/\ Call the QWDRJOBD API.\/ /\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\/

QWDRJOBD(rec_var,

/\ Receiver

Variable

\/

39ð,

/\ Receiver

Length

\/

"JOBDð1ðð",

/\ Format Name

\/

qual_job_desc,

/\

Qualified Job Description

\/

&error_code);

/\

Error Code

\/

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

/\ If an error was returned, send an error message.\/ /\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\/ if(error_code.ec_fields.Bytes_Available > ð) .13/

{

memcpy(message_id, error_code.ec_fields.Exception_Id, 7); sprintf(message_string,

"SNDMSG MSG('Program failed with message ID %.7s') TOUSR(QPGM￿R)", message_id);

system(message_string);

}

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

/\ Let's tell everyone what the hold value was for this job. \/ /\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\/ else

{

memcpy(hold_value, ((Qwd_JOBDð1ðð_t \)rec_var)->Hold_Job_Queue, 1￿ð); sprintf(command_string,

"SNDMSG MSG('HOLD value is %.1ðs') TOUSR(QPGMR)", hold_value);

system(command_string);

}

} /\ main \/

Appendix B. Original Examples in Additional BLanguages-11

Page 289
Image 289
IBM Version 4 manual Appendix B. Original Examples in Additional BLanguages-11