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.

Section 21<br />

SDFI, SDFO–System Data Format I/O<br />

Routines<br />

The System Data Format Input (SDFI) routine and the System Data Format Output<br />

(SDFO) routine are two independent routines that process files or elements that are in<br />

system data format (SDF).<br />

The SDFI routine reads SDF images from the input file or element and returns the<br />

images one at a time to the calling program. The SDFO routine takes SDF images one at<br />

a time from the calling program and writes the images to the output file or element.<br />

The SDFI and SDFO routines each require the following data structures:<br />

• A packet or file control table (FCT)<br />

• An image buffer<br />

• One or two I/O buffers<br />

An 11-word packet is used to pass information to and from SDFI and SDFO. The packet<br />

format for SDFI is described in 21.1.1. The packet format for SDFO is described in<br />

21.2.1.<br />

The image buffer is either the data area that SDFI reads the next image into or the data<br />

area containing the image that SDFO writes out.<br />

The I/O buffers are used by SDFI and SDFO to access the file or element. The I/O buffer<br />

length must be a multiple of 28 words (one sector). If there are two I/O buffers, they<br />

must be of equal length. Because the physical record size on disks is most frequently<br />

four sectors (112 words), SDFI and SDFO execute most efficiently when their buffer<br />

lengths are a multiple of 112 words. If the buffer length is larger than but not a multiple<br />

of 112 words, the excess length (28, 56, or 84 words) is not used in I/O operations<br />

unless the I/O device is a tape drive.<br />

If the file accessed by SDFI or SDFO is on tape, the buffer length should be the length of<br />

the tape block. The standard tape block length is 224 words. SDFI and SDFO can<br />

handle multireel tape files correctly. SDFI and SDFO send a message to the print device<br />

each time an input or output tape reel is swapped.<br />

SDFI and SDFO assume that the file being accessed is assigned to the run before SDFI<br />

and SDFO are called.<br />

7833 1733–004 21–1

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

Saved successfully!

Ooh no, something went wrong!