-- $Source: /commtar/monoBANK/SQL_INTF/dc_types.dat,v $ -- $Revision: 1.10 $ $Date: 88/07/15 18:54:05 $ $Author: kam $ with Host_Character_Pkg; package Datacom_Data_Types is -- this package contains the common data type declarations that are -- visible to the users of the Datacom_Interface package and the -- Datacom Dictionary package. Note that these type declarations -- are totally Datacom/DB-specific. package HC renames Host_Character_Pkg; ---------------------------------------------------------------- subtype Table_Code_Type is HC.Host_String (1..3); -- Datacom/DB 3-char code defined in DataDictionary -- FILE entity-occurrence attribute Datacom-NAME -- to identify the logical table to be accessed Null_Table_Code : constant Table_Code_Type := (others => HC.' '); ---------------------------------------------------------------- subtype Key_Code_Type is HC.Host_String (1..5); -- Datacom/DB 5-char alphanumeric name of key. -- defined in DataDictionary KEY entity-occurrence -- field of Datacom-NAME Null_Key_Code : constant Key_Code_Type := (others => HC.' '); ---------------------------------------------------------------- subtype Key_Value_Type is HC.Host_String (1..180); -- Datacom/DB key_value field. -- for reads, specify full key to do a specific search, -- high order digits to do a generic search for beginning -- of a set of records, or high values to read the record -- with the highest or last value for the specified key. Null_Key_Value : constant Key_Value_Type := (others => HC.' '); ---------------------------------------------------------------- subtype Element_Code_Type is HC.Host_String (1..6); -- An element consists of the Datacom/DB 5-char -- alphanumeric element name corresponding to the -- element to be retrieved or processed by Datacom that -- is paired with a 1-byte security code associated with -- the element name. The element name must have been -- defined in the DataDictionary. Null_Element_Code : constant Element_Code_Type := (others => HC.' '); ---------------------------------------------------------------- type Element_List_Block is array (Positive range <>) of Element_Code_Type; -- The Element_List_Block is an optional part of record- -- and set-at-a-time control blocks. This is the list of -- data elements which are to be retrieved, updated, or added -- by Datacom. -- The Element_List consists of some number of Element_Code's -- followed by a trailer of five blanks, indicating the end -- of the list (in this implementation, six blanks-- who'll -- know the difference :-) ---------------------------------------------------------------- subtype Database_ID_Range is Integer range 0..16#FFFF#; -- defines the range of the database id -- Note: the database id must be provided by the user if -- table synonyms are used. ------------------------------------------------------------------ subtype Dec_Pos_Range is Integer range 0..15; -- the position of decimal point from the right. -------------------------------------------------------------------- subtype Field_Offset_Type is HC.Host_String (1..4); -- defines the range of the offset of a given field -- within the element, in zoned-decimal form subtype Data_Length_Type is HC.Host_String (1..4); -- defines the range of the length of a given field -- within the element, or the length of the entire -- element, in zoned decimal form Entire_Element_Offset : constant Field_Offset_Type := (others => HC.' '); Entire_Element_Length : constant Data_Length_Type := (others => HC.' '); -- constant indicating reference to an entire element ---------------------------------------------------------------- type Sign_Type is ( -- This type is used to indicate whether the element is -- signed, unsigned or positive-signed for ordering purposes. Signed, Unsigned, Positive_Signed); ---------------------------------------------------------------- type Field_Data_Type is ( -- the possible data types for the fields of a Datacom element. Char_Type, Packed_Decimal, Binary_Type, Zoned_Decimal, Single_Prec_Float, Double_Prec_Float, String_Type); ---------------------------------------------------------------- ---------------------------------------------------------------- subtype Return_Code_Enum is Integer range 0..93; -- the possible return codes from issuing a Datacom/DB -- command; defined as constants Successful_Command : constant HC.Host_String(1..2):= (others => HC.' '); Successful : constant Return_Code_Enum := 0; Invalid_Request_Command : constant Return_Code_Enum := 1; Invalid_Table : constant Return_Code_Enum := 2; Invalid_Key_Name : constant Return_Code_Enum := 3; Invalid_Record_ID : constant Return_Code_Enum := 4; Table_Not_Open : constant Return_Code_Enum := 5; Table_Not_Open_For_Update : constant Return_Code_Enum := 6; Data_Area_Full : constant Return_Code_Enum := 7; System_Area_Full : constant Return_Code_Enum := 8; Prerequisite_Command_Error : constant Return_Code_Enum := 9; Duplicate_Master_Key_Not_Allowed : constant Return_Code_Enum := 10; Master_Key_Modified_Update_Rejected : constant Return_Code_Enum := 11; Special_Deleted_Record : constant Return_Code_Enum := 12; Internal_Error : constant Return_Code_Enum := 13; No_Record_Found : constant Return_Code_Enum := 14; Security_Violation : constant Return_Code_Enum := 15; Exclusive_Control_Interlock : constant Return_Code_Enum := 16; Input_Output_Error : constant Return_Code_Enum := 17; Exclusive_Control_Duplicate : constant Return_Code_Enum := 18; End_Of_Table_For_Get : constant Return_Code_Enum := 19; Directory_Key_Element_Buffer_Too_Small : constant Return_Code_Enum := 20; Compression_Error : constant Return_Code_Enum := 21; Element_Name_Not_Found : constant Return_Code_Enum := 22; Element_Security_Code_Violation : constant Return_Code_Enum := 23; Exclusive_Control_Events_Exceeded : constant Return_Code_Enum := 24; Invalid_Data_Base_ID : constant Return_Code_Enum := 25; Insufficient_Directory_Buffer_Space : constant Return_Code_Enum := 26; Getit_Block_Size_Too_Small : constant Return_Code_Enum := 27; Log_Area_Block_Size_Too_small : constant Return_Code_Enum := 28; EOF_During_Loglb : constant Return_Code_Enum := 29; Table_Not_Open_For_This_Command : constant Return_Code_Enum := 30; Key_Length_Inconsistency : constant Return_Code_Enum := 31; Invalid_Address : constant Return_Code_Enum := 37; Previous_Logging_Error : constant Return_Code_Enum := 38; Cannot_Process_Old_Request : constant Return_Code_Enum := 39; Task_Save_Area_Ext_Too_Small : constant Return_Code_Enum := 40; Not_Enough_Extra_Buffers_In_Master_List : constant Return_Code_Enum := 41; Not_Enough_Seq_Ext_In_Master_List : constant Return_Code_Enum := 42; No_Valid_Index : constant Return_Code_Enum := 43; Security_Env_Error : constant Return_Code_Enum := 44; Operator_Request_Error : constant Return_Code_Enum := 45; Table_Already_Open_For_Update : constant Return_Code_Enum := 46; Invalid_Directory_Data_Set : constant Return_Code_Enum := 47; Replicated_Or_Partitioned_DB_Open_Error : constant Return_Code_Enum := 48; Invalid_Mix_Of_Jobs : constant Return_Code_Enum := 51; Recovery_File_Failure : constant Return_Code_Enum := 52; Insufficient_Open_Table_Buffer_Space : constant Return_Code_Enum:=54; Bad_User_Rqts_Table : constant Return_Code_Enum := 55; Bad_Master_List : constant Return_Code_Enum := 56; Bad_RWTSA_Address : constant Return_Code_Enum := 57; Table_Not_Loaded : constant Return_Code_Enum := 58; Security_Validation_Failure : constant Return_Code_Enum := 59; DB_Cannot_Open_Log_Area : constant Return_Code_Enum := 60; Exclusive_Control_Wait_Exceeded : constant Return_Code_Enum := 61; Bad_Device_Type : constant Return_Code_Enum := 63; Compression_Not_Generated : constant Return_Code_Enum := 64; DD_Statement_Missing : constant Return_Code_Enum := 65; Multi_Volume_Open_Failure : constant Return_Code_Enum := 66; CXX_Interlock : constant Return_Code_Enum := 67; Multiuser_Facility_Not_Up : constant Return_Code_Enum := 68; Table_Has_No_Current_Index : constant Return_Code_Enum := 69; Buffer_Too_Small : constant Return_Code_Enum := 70; Invalid_Data_Area_Control_Block : constant Return_Code_Enum := 72; OS_Open_Allocation_Error : constant Return_Code_Enum := 74; Directory_Maintenance_Error : constant Return_Code_Enum := 75; Open_Error : constant Return_Code_Enum := 76; Security_Maint_Request_Not_Completed : constant Return_Code_Enum:=77; FBA_Disk_Error : constant Return_Code_Enum := 78; CXX_Wrong_Release : constant Return_Code_Enum := 79; DB_SVC_Program_PSW_Key_Error : constant Return_Code_Enum := 82; SVC_Integrity_Error : constant Return_Code_Enum := 83; Multitasking_Error : constant Return_Code_Enum := 84; Insufficient_Tasks : constant Return_Code_Enum := 85; Multiuser_Facility_Abended : constant Return_Code_Enum := 86; Security_Violation_During_Open : constant Return_Code_Enum := 87; Data_Base_Is_Disabled : constant Return_Code_Enum := 88; DOS_Problem_Using_CDLoad : constant Return_Code_Enum := 89; Compound_Boolean_Selection_Error : constant Return_Code_Enum := 91; Set_Selection_Interrupt : constant Return_Code_Enum := 92; Attempt_To_Position_Past_End_Of_Set : constant Return_Code_Enum := 93; end Datacom_Data_Types; -- $Cprt start$ -- -- Copyright (C) 1988 by Intermetrics, Inc. -- -- This material may be used duplicated or disclosed by or for the -- U.S. Government pursuant to the copyright license under DAR clause -- 7-104.9(a) (May 1981). -- -- This project was sponsored by the STARS Foundation -- Naval Research Laboratory, Washington DC -- -- $Cprt end$