39ð,

/\ Receiver Length

\/

"JOBDð1ðð",

/\ Format Name

\/

qual_job_desc,

/\

Qualified Job Description

\/

&error_code);

/\

Error Code

\/

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

/\

If an

error

was returned, print the error message to the QP￿RINT

\/

/\

spool

file.

 

\/

/\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\/ if(error_code.ec_fields.Bytes_Available > ð)

{

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

"Failed. Error ID - %.7s", message_id);

fprintf(stream, message_string);

}

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

/\

Let's tell

everyone what the hold

value was for this

job.

\/

/\

The result

will be printed in the

QPRINT spool file.

 

\/

/\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\/ else

{

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

"HOLD value - %.1ðs", hold_value);

fprintf(stream, command_string);

}

fclose(stream); } /\ main \/

Accessing the

HOLD Attribute—ILE

COBOL

Example

 

 

Refer

to “Accessing

the

HOLD Attribute—OPM RPG Example” on page 3-17 for

 

 

the original

example. The following example also works for OPM COBOL.

 

 

 

IDENTIFICATION DIVISION.

 

 

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

 

 

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

 

 

\

 

 

 

 

 

 

\Program Name:

 

JOBDAPI

 

 

\

 

 

 

 

 

 

\Programming Language:

COBOL

 

 

\

 

 

 

 

 

 

\Description:

 

This example shows how to print messages

 

 

\

 

 

 

to spool files.

 

 

\

 

 

 

 

 

 

\Header Files Included: QUSEC - Error Code Parameter

 

 

\

 

 

 

QWDRJOBD - Retrieve Job Description API

 

 

\

 

 

 

 

 

 

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

 

 

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

 

 

\

PROGRAM-ID. JOBDAPI.

 

 

 

\

 

 

 

 

 

 

 

B-18

System API

Programming

V4R1

 

 

 

Page 296
Image 296
IBM Version 4 manual Hold Attribute-ILE, PROGRAM-ID. Jobdapi