HLI Procedures Overview

The procedures in the HLI can be categorized into these classes:

Initialization which specify the language being used and initialize the HLI environment.

ACCINI Initialize the HLI environment.

ACCCOB, ACCFOR, or ACCMAC are language dependent procedures that initialize the HLI environment.  They have been made obsolete with ACCINI.

ACCEND Terminate the HLI.

File Specification which specify a Data Base Library, and the objects from the DBL to access
(Data Sets and Data Indexes).

ACCDBL Specify the DBL to be used.
ACCOPN Open a Data Set, Data Index, or DBL.
ACCCLS Close a Data Set, Data Index, or DBL.

Record Handling which transfer records stored in ACCENT R DB-MACH2 Data Set objects to and from the host program.

ACCGET Get a record from a Data Set or DBL.
ACCPUT Put a record back in a Data Set.
ACCDEL Delete a record from a Data Set.
ACCRDY Prepare to create a new record in a Data Set.
ACCCRE Create a new record in a Data Set.
ACCFRE Free Data Set records for access by other users.
ACCLOK Prevent other users from accessing Data Set records.

Field Specification which relate ACCENT R field names to host program variables.

ACCLOA Load a value from an ACCENT R field into a host program variable.
ACCSTO Store a value into an ACCENT R field from a host program variable.

Information and Utility which store and retrieve status information, and perform utility functions.

ACCCMD Execute any ACCENT R command or transfer the user to ACCENT R command level.
ACCKWD Initialize KEYWORD variables.
ACCVER Print HLI version information.

Each procedure is described in detail later.

Program Logic

The paragraphs below show how the HLI procedures are used in a program.

Initialization:  Procedures

The first HLI call in a program initializes the HLI environment and must be ACCINIACCINI makes the language dependent procedures (ACCCOB, ACCFOR, and ACCMAC) obsolete.

Before leaving the host program, ACCEND must be called to terminate the HLI.

.File Specification:  Procedures

ACCDBL, ACCOPN, and ACCCLS are required in most uses of the HLI.  While ACCCLS is not used to specify a file, it is grouped with ACCDBL and ACCOPN because of its relationship to ACCOPN.

ACCDBL specifies the ACCENT R Data Base Library (DBL) that will be used.

ACCOPN opens a Data Set object or Data Index object that is defined in the current DBL, or opens a DBL as a Data Set object.  After a Data Set or Data Index has been opened, other HLI procedures can be called to retrieve, create, and/or manipulate the information in that set.  DBL objects are available for read-only access.

ACCCLS closes a Data Set or DBL object that has been opened with ACCOPNACCCLS can close a single Data Set or DBL, or it can close all open objects.

Record Handling:  Procedures

ACCGET retrieves information from a Data Set or DBL object.  It requires that  the Data Set or DBL be open (see ACCOPN).  It reads a single record into a  record buffer.  ACCLOA can then be used to move field values from the record  buffer to variables in the host program.

ACCCRE, ACCPUT, and ACCDEL create, store, and delete information in a Data Set object.  Each procedure requires that the Data Set be open (see ACCOPN).  Each of these routines affects a single Data Set record.  These routines cannot be used on DBL's since the DBL object is available to the HLI for read-only.

ACCPUT changes an existing record.  Before calling ACCPUT, the record must have been retrieved with ACCGET and then one or more fields can be changed with ACCSTO.

ACCDEL deletes an existing record.  Before calling ACCDEL, the record to be deleted must have been retrieved with ACCGET.

ACCRDY clears or initializes a record area before creating it with ACCCREACCCRE creates a new record in a Data Set.  Prior to the call to ACCCRE, values can be assigned to the fields in the new record with ACCSTO.

ACCLOK temporarily prevents other users from accessing Data Set records while they are being changed during simultaneous update.

ACCFRE makes Data Set records available again after they have been temporarily locked with ACCLOK.

Field Specification:  Procedures

ACCLOA moves field values from a Data Set or DBL record to host program variables after a call to ACCGET, or retrieves a value from an ACCENT R System Field.

ACCSTO moves the values in host program variables to a Data Set record prior to a call to ACCPUT or ACCCRE, or stores a value into an ACCENT R System Field.

Information and Utility Procedures

The information and utility procedures execute ACCENT R commands, print HLI version information, set HLI flags, and perform other utility functions.