DISK I/O Instructions


 

Through disk input/output instructions, information or data is stored and retrieved as logical records within files on the disk. Though PL/B files default to 256-byte sectors, the sector size may be modified by using the BUFFER or FIX{ED} parameters when they are declared in the User Data Area (UDA). PL/B records may span more than one sector and a sector may contain more than one record. Refer to the File Definition section for more information on declaring an appropriate sector size through usage of the BUFFER or FIX{ED} parameters.

 

The Sunbelt runtimes support 64 bit file I/O. This allows processing of files larger than 4GB by the PL/B disk I/O language statements within the operating system limits. Windows 98/ME only supports files of 2GB or smaller.

 

The following topics relate to Disk I/O:

 

File Structures

Overview of disk file structures.

File Access Methods

Overview of disk file record structures.

File Accessing Modes

Overview of disk file accessing methods.

File and Record Locking

An explanation of the file and record locking techniques.

Character String Variables

Discussion of character string handling in Disk I/O instructions.

Numeric Variables

Discussion of numeric variable handling in Disk I/O instructions.

Partial I/O

Overview of Partial I/O in Disk I/O instructions.

End of File and End of Record Marks

Definition of the End of File and End of Record marks.

List Controls

Explanation of List Controls used in Disk I/O.

RMSRAS Support

An explanation of the RMS Remote Access Server support.

Managed File Support

An explanation of the Data Manager and Managed File support.

Simplified File IO

An description of Sunbelt's simplified disk IO support.

Transactions

An description of Sunbelt's transaction support.

Version 8.7 File Format Support

An description of version 8.7 file format support.

IO using SQLite

A guide to name-based IO.

SQLITE Date/Time Tips

Tips to using the SQLITE Date and Time functions in your program.

Windows Drive Substitution

An explanation of the drive letter substition mechanism.

IO READ Cancellation

An explanation of the READ cancellation mechanism.

 

 

BTRIEVE

Execute a BTRIEVE function.

CLOSE

Close a disk file.

COUNTKEYS

Retrieve the number of keys in an ISAM file between a starting and ending value inclusively.

DELETE

Delete a record from a disk file.

DELETED

Delete a duplicate record from an ISAM disk file.

DELETEDK

Delete a duplicate ISAM key.

DELETEK

Delete an ISAM key.

ERASE

Delete a file from disk.

FILEIO

Perform file I/O functions on a file.

FILEPI

Lock specified files.

FILTER

Filter records.

FINDDIR

Retrieves file and directory names.

FINDFILE

Locates and retrieves statistical data about a file.

FLUSH

Force directory information to disk.

FLUSHEOF

Compatibility instruction - no action performed.

FPOSIT

Retrieve the current position of the file pointer.

FPOSITA

Retrieve the current position of the AAM file index.

FPOSITB

Retrieve the beginning position of the current record.

FPOSITC

Retrieve the record position following the last byte accessed.

GETFILE

Retrieve information from a file definition variable.

GETFNAME

Invoke the standard file open or prep dialog.

INSERT

Insert a key into an AAM or ISAM file.

OPEN

Initialize a disk file for access.

POSITEOF

Position the file pointer to the end of file.

PREPARE

Create or open a disk file.

PREPDEFAULT

Setup default strings for a standard file prep dialog.

READ, READTAB, READLK

Retrieve information from disk into variables.

READKEY

Return the key associated with the last indexed record accessed.

READKG, READKGTB, READKGLK

Retrieve subsequent key matching records from an AAM file.

READKGP, READKGPLK

Re-read AAM file records in reverse order.

READKP, READKPTB, READKPLK

Read ISAM files in descending (reverse) key sequence order.

READKS, READKSTB, READKSLK

Read ISAM file in ascending (forward) key sequence order.

READLAST, READLASTLK

Read the last matching record of an AAM file.

RENAME

Change the name of a disk file.

REPOSIT

Reposition the file pointer to a specified value.

SCHEMA

Execute operations specialized to the runtime schema support.

SETFILE

Updates information in a file definition variable.

STREAM

Input or output data using file redirection.

TRANSACTION

Group file IO operations.

UNLOCK

Unlock all specified files.

UPDATE, UPDATAB

Partially or completely update an ISAM or AAM record.

WEOF

Establish the end of file at the position indicated.

WRITAB

Write data to a specific location in a sector.

WRITE

Transfer variables to a disk file.

 

 



PL/B Language Reference File Structures