IBM Version 4 Accessing the Hold Attribute-ILE C Example, Movel Qusei Msgid Call Qcmdexc Parm

Models: Version 4

1 505
Download 505 pages 30.92 Kb
Page 294
Image 294

C\

 

 

C

EVAL

\INLR = '1'

C

RETURN

 

C\

 

 

C\ End of MAINLINE

 

 

C\

 

 

C\ Subroutine to handle errors received on the CALL

C\

C

ERROR

BEGSR

 

 

C\

 

 

 

 

C\ Process errors returned from the API

 

C\

 

 

 

 

C

 

MOVEL

QUSEI

MSG_ID

C

 

CALL

'QCMDEXC'

 

C

 

PARM

 

CMD_STR2

C

 

PARM

 

LENSTR2

C

 

ENDSR

 

 

Accessing the HOLD Attribute—ILE C Example

Refer to “Accessing the HOLD Attribute—OPM RPG Example” on page 3-17 for the original example.

 

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

 

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

 

/\

 

 

\/

 

/\Program Name:

 

JOBDAPI

\/

 

/\

 

 

\/

 

/\Programming Language:

ILE C

\/

 

/\

 

 

\/

 

/\Description:

 

This example shows how to print messages

\/

 

/\

 

to spool files.

\/

 

/\

 

 

\/

 

/\Header Files Included: STDIO - Standard Input/Output

\/

 

/\

 

STRING - String Functions

\/

 

/\

 

QUSEC - Error Code Parameter

\/

 

/\

 

QWDRJOBD - Retrieve Job Description API

\/

 

/\

 

QLIEPT - Entry Point Table

\/

 

/\

 

 

\/

 

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

 

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

 

#include <stdio.h>

 

 

 

#include <string.h>

 

 

 

#include <qusec.h>

/\ Error Code Parameter Include for the APIs \/

 

#include <qwdrjobd.h>

/\ Retrieve Job Description API Include

\/

 

#include <qliept.h>

/\ Entry Point Table Include

\/

 

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

 

/\ Error Code Structure

 

\/

 

/\

 

 

\/

 

/\ This shows how the user can define the variable length po￿rtion of

\/

 

/\ error code for the exception data.

\/

 

/\

 

 

\/

 

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

 

typedef struct {

 

 

 

 

Qus_EC_t

ec_fields;

 

 

char

Exception_Data[1ðð];

 

B-16

System API Programming V4R1

 

 

 

Page 294
Image 294
IBM Version 4 manual Accessing the Hold Attribute-ILE C Example, Movel Qusei Msgid Call Qcmdexc Parm, Parm LENSTR2 Endsr