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.

BSP$-Program File Basic Service Package<br />

Some guidelines concerning the use of BSP$ are the following:<br />

• There are two basic program file formats. The standard program file (PF) has small<br />

variable-length tables. The large program file (LPF) has large fixed-length tables. For<br />

example, the PF has a normal maximum of 2,671 element table entries that can be<br />

expanded to 5,000 entries, while the LPF has a fixed maximum of 26,146 element<br />

table entries.<br />

• PF and LPF elements are limited to a maximum of 262,143 sectors of text for each<br />

element. A new program file type, the large element program file (LEPF) removes<br />

this limitation and allows elements to have over 262,143 sectors of text, if desired.<br />

An LEPF can be initialized with the small variable-length format of a standard<br />

program file (standard LEPF) or with the large fixed-length format of a large program<br />

file (large LEPF).<br />

• If the calling program attempts to create a program file in a file area in which a file<br />

was previously written, the calling program will receive an error return if the first<br />

word encountered is not the program file identifier constant or if sector 0 is not all<br />

zeros.<br />

• For standard PF format, each table on mass storage begins at the system-defined<br />

sector or at a greater sector if a previous table occupies the defined sector. The<br />

element table always starts at the system-defined sector. The system-defined<br />

sectors and starting sector for element text are the six ‘PFxx$' equates in element<br />

SYS$DEF (see Table 2–4).<br />

• For LPF formats, each table on mass storage begins at the system-defined sector.<br />

The system-defined sectors and starting sector for element text are the six 'LPF$xx'<br />

equates in element SYS$DEF (see Table 2–4).<br />

• For standard PF formats, the system default TOC size is 1,792 sectors (28 tracks).<br />

For LPF formats, the system default TOC size is 40,256 sectors (629 tracks).<br />

• The calling program must provide a 43-word data area (for BSP$). This area is<br />

referred to as the file control table (FCT). The calling program must also provide<br />

main storage buffers for each table read.<br />

• The calling program must request to read the FTI before any other BSP$ functions<br />

are called. The FTI must be in the BSP$ FCT until all BSP$ functions are executed.<br />

• The FTI part of the FCT data area is used by BSP$ to contain necessary information<br />

about the file.<br />

• A table must be read into the caller’s buffer (RPFxxT$ calls) before any operations<br />

are performed on the table.<br />

• BSP$ returns an error code if a table cannot hold another item.<br />

• A table must be written back from the caller's buffer (WPFxxT$ calls) before the<br />

buffer can be used to hold another table.<br />

• BSP$ operates most efficiently when the caller’s buffer is large enough to contain<br />

the entire program file table, including the size of entries to be added to the table.<br />

The current length of each program file is available when the FTI is read.<br />

• Each table that has been modified must be written back to the program file table of<br />

contents on mass storage.<br />

5–2 7833 1733–004

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

Saved successfully!

Ooh no, something went wrong!