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.

SAR$ WRITE<br />

Initial Condition<br />

The calling program may set the following optional parameter in the WRITE packet to an<br />

appropriate value before calling S$ARCLOSO:<br />

SW$ELTCDT<br />

This parameter is described in 18.2.1.2.<br />

Calling Format<br />

S$ARCLOSO wpkt<br />

error return<br />

normal return<br />

where wpkt is a label identifying the starting address of the WRITE packet and data area.<br />

Returns<br />

If S$ARCLOSO takes the error return, A1 contains the call status code, A2 contains the<br />

I/O status code, and A3 contains the substatus code. These status codes are also<br />

returned in the packet fields SW$CALLST, SW$IOSTAT, and T1 of SW$STATUS,<br />

respectively. See 18.2.4 for an explanation of the status codes.<br />

If S$ARCLOSO takes the normal return, the output is successfully closed.<br />

18.2.4. Status Lists for MASM WRITE Procedures<br />

The WRITE procedure call status codes listed in Table 18–6 may be returned to the<br />

calling program in the SW$CALLST field of the WRITE packet. These call status codes<br />

are for SW$CURVER = 2 or above.<br />

Table 18–6. SAR$: WRITE Procedure SW$CALLST Codes<br />

Octal Code Status<br />

0 Normal return from SAR$.<br />

01 An outdated WRITE packet version is being used.<br />

02 An invalid WRITE packet version is being used.<br />

03 The value for SW$IMGBUF is zero; an address must be given for the output<br />

image buffer.<br />

04 The SW$IMGBUFL is zero; a length must be given for the output image<br />

buffer.<br />

05 The value for SW$FIPADDR is zero; a file information packet must be given<br />

for this output file type.<br />

06 An invalid value is specified for SW$OUTFILT.<br />

07 An invalid value is specified for SW$LNUMFMT.<br />

010 An invalid value is specified for SW$UNTRFLG.<br />

18–32 7833 1733–004

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

Saved successfully!

Ooh no, something went wrong!