PAL CARD CATALOG ENTRY

SHORT DESCRIPTION

Files of keyed data


MOVEMENT WITHIN THE PAL CARD CATALOG
Move to top-level taxonomy
Move to keyword list

ASSET PROFILE

UNIT NAME
Keyed_File_Io_Package
VERSION
1
REVIEW CODE
C1 1.0 A
INET ADDRESS
sun1.disacim.osd.mil (134.152.9.140)
AUTHOR
U.S. Army Information System Engineering Command
Ft. Belvoir, VA 22060-5456
RIGHTS
Approved for Public Release; Distribution Unlimited
COPYRIGHT
None -- Public Domain.
DATE CREATED
April 11, 1988
DATE RELEASED
January 17, 1994
DATE LAST UPDATED
January 17, 1994
LOCATION
DSRS Library
PAL
ENVIRONMENT
DEC VAX/VMS using the Ada Compilation System (ACS).
LIMITATIONS
Not documented in PAL database
CERTIFICATION
Ada System Certifier_1 1.0
Date/Time of Processing: Wednesday 25 May       1994 02:21:58Pm
Overall Assessment of System: OK
Classification of System: A
Basis of Classification --
Syntax Errors                               PASS
Completeness                                PASS
Independence from External Libraries        PASS
Independence from a Specific Ada Compiler   PASS

Number of ...
Files               1
Library Units       2
Lines            1793
Statements        280
Comments         1074

FILE LISTING

Directory Display


languages/ada/swcomps/dsrs/keyfile:
  File Name                 Size
  ---------                 ----
  keyfile.zip             45,301


Totals
  ==============  ==============
    1 Files               45,301

ABSTRACT

                             Keyed_File_Io_Package
                                   01D001OS.1
                               (Old ID: RIA0010A)
PURPOSE/INTENDED USE:
Keyed_File_Io_Package is a generic Ada package that provides subprograms
for creating and maintaining files of keyed data.  The subprograms of
this package  support any data format, key for access, and file name the
user needs in their  application. 

EXAMPLE APPLICATIONS:
Reuse of this package would be valuable when keyed storage of data is
desired  and the overhead of a Database Management System (DBMS) is too
great, a DBMS  is unavailable, or a database is small and only one key
is needed. 

CERTIFICATION LEVEL:
Keyed_File_Io_Package is certified at Level 4.  This means that the
Defense  Information Systems Agency/Center for Information Management
Software Reuse  Program (SRP) management office has successfully
compiled the code of this  Reusable Software Asset (RSA) and measured
maintainability, portability,  reliability and reusability.  In
addition, this RSA includes a test suite and a  Reuser's Manual, which
will be provided when the asset is extracted. 
 
IMPLEMENTATION ISSUES:
Keyed_File_Io_Package body provides subprograms to create and maintain
the data  storage/retrieval structure.  This structure consists of two
direct files,  Data_File and Index_File.  The sizes of both files are
system dependent and the name of both files can only be specified at
instantiation time.

Keyed_File_Io_Package depends on (withs) Direct_Io.

Keyed_File_Io_Package raises the exceptions Data_File_Error,
Data_File_Does_Not_Exist, Data_File_End_Error, Data_File_Read_Error,
Data_File_Is_Not_Open, Index_File_Error, Index_File_Does_Not_Exist,
Index_File_End_Error, Index_File_Read_Error, Index_File_Is_Not_Open,
Data_Already_Exists, and Data_Does_Not_Exist.

HARDWARE/ENVIRONMENT CONSTRAINTS AND LIMITATIONS:
This package was compiled, linked, and tested on a DEC VAX/VMS machine
using the Ada Compilation System (ACS).

SUBUNITS:
Keyed_File_Io_Package has the following visible subunits, which are
grouped according to their functionality:

  Create_File       Creates a Data_File and an Index_File.
  Open_File         Opens a Data_File and an Index_File.
  Close_File        Closes the active Data_File and the corresponding active
                    Index_File.
  File_Exists       Determines if a Data_File and an Index_File exist.

Data-related operations provided by Keyed_File_Io_Package:

  Add_Data          Adds Data_Records with unique input Key_Values or
                    duplicate Key_Values in which previous record is
                    non-active. 
  Delete_Data       Deletes the Data_Record associated with the
                    input Key_Value.
  Rewrite_Data      Rewrites the Data_Record associated with the input
                    Key_Value.
  Read_Data         Reads the Data_Record associated with the input
                    Key_Value.
  Read_Data_Le      Reads the Data_Record having a key asset less than or
                    equal to input Key_Value.
  Read_Data_Ge      Reads the Data_Record having a key asset greater than
                    or equal to input Key_Value.
  Read_Next_Data    Reads the next active Data_Record indicated by the
                    current Index_Record.
  Data_Exists       Determines if a Data_Record exists with the input
                    Key_Value.

DSRS CLASSIFICATION:
algorithm:  indexed_io
availability:  extractable
certification level:  level_4
component type:  implementation
data representation:  user_defined
environment:  mvii/vms/vaxada
function:  access
function:  close
function:  create
function:  get
function:  open
function:  put
language:  ada
object:  file
originator:  rapid
unit type:  generic_package

LEGAL RESTRICTIONS:
This RSA contains public domain data with unlimited rights for all
users.   Extraction is permitted to all authorized library users. This
software and its documentation are provided "as is" and without any
expressed or implied warranties whatsoever.  No warranties as to
performance, merchantability, or fitness for a particular purpose exist.

The user is advised to test the software thoroughly before relying on
it.  The user must assume the entire risk and liability of using this
software.  In no event shall any person or organization of people be
held responsible for any direct, indirect, consequential or
inconsequential damages or lost profits. 

MISCELLANEOUS:
The standard for Level 4 certification has recently been upgraded. This
asset is currently undergoing modification to meet the new Level 4
requirements.


REVISION HISTORY

January 17, 1994 Version 1 Original submission to PAL


RELEASE NOTICE

This prologue must be included in all copies of this software.
Restrictions on use or distribution:  NONE

LEGAL RESTRICTIONS:
This RSA contains public domain data with unlimited rights for all
users.   Extraction is permitted to all authorized library users. This
software and its documentation are provided "as is" and without any
expressed or implied warranties whatsoever.  No warranties as to
performance, merchantability, or fitness for a particular purpose exist.


DISCLAIMER

 This software and its documentation are provided "AS IS" and
without any expressed or implied warranties whatsoever.  No warranties
as to performance, merchantability, or fitness for a particular
purpose exist.
 The user is advised to test the software thoroughly before
relying on it.  The user must assume the entire risk and liability of
using this software.  In no event shall any person or organization of
people be held responsible for any direct, indirect, consequential or
inconsequential damages or lost profits.