Information technology — Information Resource Dictionary System (IRDS) Services Interface — Amendment 2: Ada language binding

Contains a great number of amendments and additions; Information Resource Dictionary System (IRDS) services interface; ADA language binding.

Technologies de l'information — Interface de services du gestionnaire de ressources du système d'informations (IRDS) — Amendement 2: Liant de langage Ada

General Information

Status
Published
Publication Date
13-Nov-1996
Current Stage
6060 - International Standard published
Completion Date
14-Nov-1996
Ref Project

Relations

Buy Standard

Standard
ISO/IEC 10728:1993/Amd 2:1996 - Ada language binding
English language
20 pages
sale 15% off
Preview
sale 15% off
Preview

Standards Content (Sample)

ISO/IEC
INTERNATIONAL
STANDARD
First edition
1993-04-I 5
AMENDMENT 2
1996-l l-l 5
Information technology - Information
Resource Dictionary System (IRDS)
Services Interface
AMENDMENT 2: Ada language binding
Technologies de / ‘information - Interface de services du ges tionnaire de
ressources du sys t&me d ‘informa Cons (IR DS)
AMENDEMENT 2: Liant de langage Ada
Reference number
&O/I EC 10728: 1993/Amd.2: 1996( E)

---------------------- Page: 1 ----------------------
ISO/IEC 10728: 1993/Amd.2: 1996(E)
Foreword
IS0 (the International Organization for Standardization) and IEC (the Inter-
national Electrotechnical Commission) form the specialized system for worldwide
standardization. National bodies that are members of IS0 or IEC participate in the
development of International Standards through technical committees established
by the respective organization to deal with particular fields of technical activity.
IS0 and IEC technical committees collaborate in fields of mutual interest. Other
international organizations, governmental and non-governmental, in liaison with
IS0 and IEC, also take part in the work.
In the field of information technology, IS0 and IEC have established a joint
technical committee, ISO/IEC JTC 1. Draft International Standards adopted by the
joint technical committee are circulated to national bodies for voting. Publication
as an International Standard requires approval by at least 75 % of the national
bodies casting a vote.
Amendment 2 to International Standard ISO/IEC 10728:1993 was prepared by
Joint Technical Committee ISOLIEC JTC 1, Information technology, Sub-
committee SC 21, Open systems interconnection, data management and open
distributed processing.
0 ISO/IEC 1996
All rights reserved. Unless otherwise specified, no part of this publication may be reproduced or
utilized in any form or by any means, electronic or mechanical, including photocopying and micro-
film, without permission in writing from the publisher.
ISO/IEC Copyright Office l Case postale 56 l CH-1211 Geneve 20 l Switzerland
Printed in Switzerland
ii

---------------------- Page: 2 ----------------------
ISO/IEC 10728: 1993/Amd.2: 1996(E)
0 ISO/IEC
Information technology - Information Resource
Dictionary System (IRDS) Services Interface
AMENDMENT 2: Ada language binding
Page v
Add a new entry to the Table of Contents as follows:
“Annex D - Ada language binding”
Page vi
Add a new sentence to the last paragraph in the Foreword as follows:
“Annex D is normative ”.
Page I
Add a new sentence in clause 1 paragraph 2, before the last sentence.
“A language binding for the Ada language (ISO/IEC 8652) is provided in Annex D.”
Add a reference in clause 2, after the reference to IS0 7185, as follows:
“ISO/IEC 8652: 1995, Information technology - Programming languages - Ada.”
Page 5
Add a new sentence in subclause 4.4.
“Data structures for use with the Ada language are defined in Annex D.”
Add a new sentence in subclause 4.5.
“Ada language bindings for the services are provided in Annex D.”
Page 71
Amend the first sentence of the NOTE in subclause 8.1 to read:
specified in this clause, the C
“For the Pascal language binding language binding specified in
Annex C, and the Ada language binding specified in Annex D, enumerated types are . . . .”
Page 75
Add a new sentence at the end of clause 9 to read:
“Alternative service formats for use with the Ada language are specified in Annex D.”
Add a new Annex D after Annex C (as amended by ISO/IEC 10728: 1993/Amd.l: 1995) as
follows:

---------------------- Page: 3 ----------------------
IIEC 10 ’728: 1993Amd.2: 1996(
Annex
(normative)
The IRDS Services Hnterface language binding for the Ada language is presented in the form of an Ada
package specification as provided in D.4 using the general rules as set out in D.2 below. D.3 provides a
package called Hardware Dependencies which isolates hardware, software, and system dependencies in
order to improve portability of the binding.
ln this binding the data names and data structures defined in clause 8 have been adhered to except
where the Ada language provides a preferred alternative construct. The binding defined in the package
specification in D.4 provides an interface to the SQL types through a package that isolates hardware
dependencies for Ada types. Time and date abstractions are obtained from package Calendar It is
expected that the package body will provide the necessary transformations to SQL and IRDS types
procedure names and their parameters defined in clause 9 have been adhered to
in this binding, the
as follows:
except
1. All names have been spelled out for understanding except for IRDS, IRD, and SQL.
L. All names have underscores between logical words for clarity.
All names of data structure types have the explicit word “type” added to the simple name for
3.
clarity. Excluded are Ada predefined types of Boolean, Positive, Character, String, and Time.
Names ending in “type” which were not types have been renamed to avoid confusion.
4. The “Irds” prefix has been removed from all types: objects, and procedure names. The desired
effect is achieved through the use of a package called “IRDS ”. The fully qualified name will
thus include IRDS [e.g., IrdsCreateIRDDefinition becomes HRDS.Create IRE) Definition,
- -
IrdsNameLim becomes IRDS.Name Limit].
-
and parameter names in D.4 below shall have the same meaning as the
5. The subprogram names
mapped names defined in clause 9.
6. The use of the Service Return Code identified in subclause 8.2.5 is not used in preference to
the use of Ada exceptions. A discussion on how exceptions are used is provided in the Ada
binding discussion for subclause 8.2.5 within D.4 below.
7. Strings are passed as an access type (with a pointer) allowing unbounded lengths. A list
structure is used for the Column List Parameters (subclause 8.2.6) again using access types.
Access types end with the suffix “Pointer Type.”
-
Time abstractions are imported from package Calendar to facilitate time operations by Ada
8.
applications.
Use of name User Id vice User as object of type User Id Type to conform with naming
9.
- - -
convention.

---------------------- Page: 4 ----------------------
ISO/IEC 10728: 1993/Amd.2: 1996(E)
0 ISO/IEC
10. The following mappings for SQL data types to Ada data types have been used:
Ada Data Type
SOL Data Type
CHARACTER Character Type [Note l]
Text Pointer Type mote 21
CHARACTER VARYING
National Character Type [Note 11
NATIONAL CHARACTER
National-Text Pointer Type [Note 21
NATIONAL CHARACTER VARYING
-
Real Type [Note 11
REAL
DOUBLE PRECISION Long Float Type [Note l]
Float-Type-mote l]
FLOAT
Integer Type [Note l]
INTEGER
Short Integer Type [Note l]
SMALL INTEGER
Fixed-Type [Note I]
NUMERIC
Decimal Type [Note I]
DECIMAL
CalendiTime [Note 31
DATE
CalendarTime [Note 31
TIME
CalendarTime Note 31
TIME STAMP
Interval Type mote 41
INTERVAL
-
Notes 1. These types are imported from a separate package
Hardware Dependencies used to insulate the IRDS binding from
hardware differences, thus improving portability of the
application code. This package is provided in subclause D.3.
2. Text Pointer Type is defined in subclause 8.2.1 as an access type
of St&g-Type. String-Type is an array of Character Type.
National Text Pointer Type is defined in subclause%2.1 as an
access tyie ofNational%ring Type. National String Type is an
- -
array of National Character Type.
- -
3. Time abstractions are imported from the Ada package Calendar.
The type CalendarTime includes abstractions for year, month,
day, and seconds. It is also useful as a date-time stamp.
4. This is a newly defined record; See Ada binding for subclause
8.2.1.
Use of this language binding requires the use of an Ada compiler that conforms to ISO/IEC 8652:1995.
All validated Ada compilers that conform to ISO/IEC 8652:1995 meet this conformance requirement.
A validated Ada compiler that conforms to IS0 8652:1987 only meets the requirement if it has the
appropriate packages to support enhanced character sets.

---------------------- Page: 5 ----------------------
HSO/IEC 10728: 1993/Amd.2: 1996(E)
8 ISCVIEC
D.2 General Rules
1. Those data names in D.4 below that map to data names in clause 8 shall have the same
meanings as is defined in clause 8. Equivalent Ada Types are used to build data structures. It
is expected that the package body of the IRDS interface will perform the necessary
transformations to convert objects of Ada types to objects of SQL types and vice versa.
2. Several IRDS sessions can proceed in parallel using Ada tasking. Subclause 9.4 defines the
sequence of permitted service invocations within a Current Session Id. The IRDS interface
must be capable of serializing concurrent calls to its Application Program Interface (API).
IRDS implementations should support the use of the language-defined library package
Ada.Exceptions. This would provide IRDS applications with the capability to obtain auxiliarv
d
information regarding distinct exceptions when an error occurs.
An implementation shall provide a package Hardware Dependencies to isolate the IRDS
3.
binding from hardware implementations of all Ada types except Boolean, Positive, Character,
String, and Time. This approach provides a means to improve portability between IRDS
implementations.

---------------------- Page: 6 ----------------------
0 ISO/IEC ISOLEC 10728: 1993/Amd.2: 1996(E)
D.3 IRDS Ada Binding Hardware Dependencies
-
-------------------------------------------------------------------------------
--
Package Hardware Dependencies
-
--
--
This version supports the Ada IRDS binding conforming to:
--
ISOA EC 10728: 1993(E)
--
IRDS Services Interface
--
--
Copyright IS0 1996
---------------------------‘-------- ----------------------------------------------
-------------------------------- -----------------------------------------------
package Hardware Dependencies is
-
--
Implementations are insulated from hardware dependencies by defining
WV
objects and types which might vary from implementation to implementation in
--
the package Hardware Dependencies. All known implementation dependent
-
--
interfaces are isolated herein.
-- This package contains:
-- 1. Values for constants set in clauses 8.1 .I , 8.1.2, and 8.1.3.
--
2. Specification of dependent types used in the IRDS Ada Binding.
--------------------- ----------------------------------------------------------
--
1. Values for constants set in clauses 8.1.1, 8.1.2, and 8.1.3.
-------------------------------------------------------------------------------
--cy------------------ ------------------------------------------------------
-- Subclause 8.1 .I Name Length Limits
Name Limit : constant := implementation defined;
Variation Limit : constant := implementation defined;
-
-------------------- -------------------------------------------------------
-- Subclause 8.1.2 Attribute Length Limits
Text Limit : constant := implementation defined;
-
-- Note that as access types are used, Text Limit is not needed in
--
this language binding. Knowledge of this constant may be useful.
5

---------------------- Page: 7 ----------------------
0 ISO/IE@
-- h),,,,,-.-------- ---------------------------------------------------------
-- Subclause 8.13 Contrail Identifier Length Limits
Session Id Limit : constant := implementation defined;
Cursor iii Emit : constant := implementation defined?=
- 7
Implementation Dictionary Name Length
-
: : constant := implementation defined;
Key-Length
-- N-,---------------~--------I-------- --------------------------------------------
WV
2. Specification of dependent types used in the IRDS Ada
------_------------------------------------
-- N,-,,-----------------------------
-- The Ada binding should not result in a loss of precision. Implementations
--
have flexibility in choosing hardware representation based on requirements”
--
Interfaces to SQL databases using IRDS should consider use of the Ada
mm
Package SQL Standard defined in lSO/lEC 90751992.
-- The data typesspecified in this package represent the contract between the
-- types supported by IRDS and the types supported by the application program.
-- These types might vary based on hardware, system, or application
--
requirements. Ranges of these types should be explicitly declared based on
--
an understanding of the ranges supported by the chosen implementation of
-- IRDS.
----m
-- ry,,,,,,,,,,,,,,,,,,,,,-------------------------------------------------
--
IRDS character Types
-- ry,,,,,,------------------------------------------------------------------
-- The SQL standard supports an implementation-defined selection of a
--
character type rather than simply mapping to Ada ’s character type.
-- The definition of Character Type is insulated in this package. This
-- permits implementations t&use Latin-l (IS0 8859/l), Unicode (IS0
--
10646), or other character set.
type Character Type is implementation defined;
type National Character Type is implementation defined;
Type;
type String-Tjpe is array (implementation defined) of Character
-
type National String Type is
Type;
array (%p/emktation defined) of National Character
- -
6

---------------------- Page: 8 ----------------------
0 ISO/IEC ISO/IEC 10728:1993/Amd.2:1996(E)
-- The SQL standard supports 2 implementation defined integer types:
type Integer Type is implementation defined;
-- Integer Type must support range 0 . . 9999999. See subclause 8.2.1.
-
type Short Integer Type is implementation defined;
- -
-- The SQL standard supports 3 implementation defined float types.
type Float Type is implementation defined;
type Long--Float Type is implementafion defined;
type Real --Type% implementation defined;
-
-- The SQL standard supports 2 implementation defined fixed types:
type Fixed Type is implemenfafion defined;
type Decimal Type is implementation defined;
-

---------------------- Page: 9 ----------------------
---‘-------------------------- -------I--------y--I____________I_____y_----------
--
P ackage RDS
--
--
This ve rsion con fo rms to :
--
ISOAEC 1072 & I 993 (E)
--
IW DS Se rvices In te rface
--
--
Copy righIt S 0 1996
------------------ ---------------Io ---________________ I___ ------------~ -------~
wi th Calenda r;
wi th Ha rdwa re -Dependenciesuse ; Ha rdwa re -Dependencies ;
package RDS is
-- This package con tains :
Da ta S truc tu res -- F rom BSOAEC 10728Clause , 8
-- I. Se rvice
Fo rma ts and Desc rip tions -- F rom lSO /lEC 10728Clause , 9
-- 2 . Se rvice
-- I D Se rwice Da ta S truc tu res -- F rom ISO /% EC 10728Clause ,
--N ----------------------------------------------------------------------------
--N-----------------_______^____________-----------------------------------
-- S ubclause 8 .1 .I Name Leng th Limi ts
-- Name Limi t and Va ria tion Limi t a re in package Ha rdwa re Dependencies .
- - -
---------------------------------------------------------------------------
-- S ubclause 8 .1 .2 A ttribu te Leng th Limi ts
-- Tex t Limi t is in package Ha rdwa re Dependencies .
- -
-- No te tha t as access types a re used Tex, t Limi t is no t needed in
-- this language bindingK. nowledge o f this cons tan may t be use ful .
-------------------------------------I-------------------------------------
-- S ubclause 8 .13 Con troll Iden ti fie r Leng th Limi ts
-- S ession Id Limi t, Cu rso r Id Limi t,
-- lmpleme &a & Dic tiona ry Name Leng th and , K ey Leng th a re in
-
-- package Ha rdwa re Dependencies .
-

---------------------- Page: 10 ----------------------
0 ISO/IEC ISO/IEC 10728: 1993/Amd.2: 1996(E)
-- Subclause 8.1.4 Data Types
-- See subclau
...

Questions, Comments and Discussion

Ask us and Technical Secretary will try to provide an answer. You can facilitate discussion about the standard in here.