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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

SAR$ READ<br />

17.1.3.2. SAR_READ Procedure Call<br />

The SAR_READ procedure obtains one image from the input and returns the character<br />

text and attributes of the image to the calling program.<br />

Initial Conditions<br />

The calling program sets the following parameters in the READ packet to appropriate<br />

values before calling SAR_READ:<br />

• Required parameters (described in 17.1.1.1)<br />

TEXT_BUFFER_ADDRESS<br />

TEXT_BUFFER_BYTE_LENGTH<br />

ATTRIBUTE_TABLE_ADDRESS<br />

ATTRIBUTE_TABLE_WORD_LENGTH<br />

• Optional parameters (described in 17.1.1.2)<br />

SELECT_LIST_ADDRESS<br />

SELECT_LIST_BYTE_LENGTH<br />

READ_ADDRESS_SECTOR<br />

READ_ADDRESS_WORD_OFFSET<br />

Calling Format<br />

PROCEDURE SAR_READ<br />

(READ_PACKET_ADDRESS: WORD MACHINE POINTER)<br />

IMPORTED ('SAR$READ$PG');<br />

Returns<br />

Each call to SAR_READ reads one image from the input and returns the character text in<br />

the text buffer, the attributes in the attribute table, and other information in the READ<br />

packet. SAR_READ does not space-fill the text buffer if the text length is shorter than<br />

the text buffer length. If the character text is longer than the text buffer, SAR_READ<br />

truncates the text to the length of the text buffer and returns an error status in<br />

CALL_STATUS.<br />

SAR_READ returns the calling status in the READ packet field CALL_STATUS. If the<br />

status is S'Normal', then the read was successful.<br />

The following fields contain information returned by SAR$ to the caller:<br />

• Character text<br />

SAR_READ returns the character text of the image read in the text buffer and the<br />

character text length in TEXT_LENGTH_IN_BYTES. The length is in 9-bit bytes<br />

(characters).<br />

• Character type<br />

The character set type of the image read is returned in the field CHARACTER_TYPE.<br />

The octal code of the character set type is returned in the field CHARACTER_CODE.<br />

17–14 7833 1733–004

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

Saved successfully!

Ooh no, something went wrong!