18.08.2013 Views

(SYSLIB) Programming Reference Manual - Public Support Login ...

(SYSLIB) Programming Reference Manual - Public Support Login ...

(SYSLIB) Programming Reference Manual - Public Support Login ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Calling Format<br />

PROCEDURE SAR_COM(COM_PACKET_ADDRESS: WORD MACHINE POINTER)<br />

IMPORTED (‘SAR$COM$PG’);<br />

SAR$ COM<br />

Returns<br />

SAR_COM returns the calling status in the COM packet field CALL_STATUS. If the<br />

status is S'Normal', then the call was successful. The following information is returned<br />

by SAR$ to the calling program:<br />

• Character text<br />

If operator input was solicited, the address of the character text and the length in<br />

9-bit bytes (characters) are returned in the fields INPUT_TEXT_BUFFER_ADDRESS<br />

and BYTE_LENGTH_OF_INPUT_TEXT, respectively. The character set type of the<br />

image read is the same as the output image character set type.<br />

• Attributes<br />

If operator input was solicited, the address of the input attribute table and the<br />

number of entries are returned in the fields INPUT_ATTRIBUTE_TABLE_ADDRESS<br />

and NUMBER_OF_INPUT ATTRIBUTES, respectively.<br />

If the status returned from SAR_COM is not S'Normal' or S'End_of_file', then an error<br />

has occurred and CALL_STATUS contains the status code. See 20.1.4 for a list of COM<br />

function status codes.<br />

20.1.4. Status Lists for PLUS COM Procedure<br />

The COM procedure call status codes listed in Table 20–3 may be returned to the calling<br />

program in the CALL_STATUS field of the COM packet. These CALL_STATUS codes are<br />

for SAR_COM_PACKET_CURRENT_VERSION = 1 and above. A list of all call status<br />

codes is available as COM_CALL_STATUS_LIST, an 18-bit status data entity defined in<br />

the element SAR$COMPKTD.<br />

Table 20–3. SAR$: COM Procedure CALL_STATUS Codes<br />

Octal Code Status<br />

0 Normal return from the SAR$ COM procedure.<br />

01 An outdated SAR$ COM packet version is being used.<br />

02 An invalid SAR$ COM packet version is being used.<br />

03 The value for IMAGE_BUFFER_ADDRESS is NULL; an address must be<br />

given for the input image buffer.<br />

04 The IMAGE_BUFFER_WORD_LENGTH is zero; a length must be given for<br />

the input image buffer.<br />

05 An invalid value is specified for the INPUT_REQUEST_TYPE field.<br />

7833 1733–004 20–9

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!