ISO/IEC 10728:1993/Amd 1:1995
(Amendment)Information technology — Information Resource Dictionary System (IRDS) Services Interface — Amendment 1: C language binding
Information technology — Information Resource Dictionary System (IRDS) Services Interface — Amendment 1: C language binding
Contains some amendments and adds the annex C - C language binding.
Technologies de l'information — Interface de services du gestionnaire de ressources du système d'informations (IRDS) — Amendement 1: Liant de langage C
General Information
Relations
Standards Content (Sample)
INTERNATIONAL ISO/IEC
STANDARD 10728
First edition
1993-04-15
AMENDMENT 1
1995-12-15
Information technology - Information
Resource Dictionary System (IRDS)
Services Interface
AMENDMENT 1: C language binding
Interface de servkes du gestionnaire de
Technologies de I’information -
ressources du Systeme d ’informations (IRDS)
AMENDEMENT 7: Liant de langage C
Reference number
ISO/lEC 10728:1993/Amd.l :1995(E)
---------------------- Page: 1 ----------------------
ISO/IEC 10728:1993/Amd 1:1995(E)
Foreword
ISO (the International Organization for Standardization) and IEC (the International Electrotechnical
Commission) form the specialized System for worldwide standardization. National bodies that are mem-
bers of ISO or IEC participate in the development of International Standards through technical com-
mittees established by the respective organization to deal with particular fields of technical activity. ISO
and IEC technical committees collaborate in fields of mutual interest. Other international organizations,
govemmental and non-govemmental, in liaison with ISO and IEC, also take part in the work.
In the field of information technology, ISO 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 1 to International Standard ISO/IEC 10728:1993 was prepared by Joint Technical Com-
mittee ISO/IEC JTC 1, Information technology, Subcommittee SC 21, Open Systems interconnection, .
data management and open distributed processing.
0 ISO/IEC 1995
All rights reserved. Unless otherwise specified, no part of this publication may be repro-
duced or utilized in any form or by any means, electronie or mechanical, including photo-
copying and microfilm, without Permission in writing from the publisher.
ISO/IEC Copyright Office l Case Postale 56 l CH- 1211 Geneve 20 l Switzerland
Printed in S wi tzerland
---------------------- Page: 2 ----------------------
ISO/IEC 10728:1993/Amd 1:1995(E)
0 ISO/IEC
Information technology - Information Resource Dictionary System
(IRDS) Service Interface
AMENDMENT 1: C language binding
Page v
Contents
Add a new entry to the Table of Contents as follows:
“Annex C - C language binding”
Page 1
Clause 1
Add a new sentence in clause 1 Paragraph 2, before the last sentence.
“A language binding for the C language is provided in annex C.”
Page 5
Subclause 4.4
Add a new sentence in subclause 4.4.
“Data structures for use with the C language are defined in annex C.”
Page 5
Subclause 4.5
Add a new sentence in subclause 4.5.
“C language bindings for the Services are provided in annex C.”
Page 71
Subclause 8.1
Amend the first sentence of the NOTE in subclause 8.1 to read:
“For the Pascal language binding specified in this clause and the C language binding specified in annex
C, enumerated types are . . .”
Page 75
Clause 9
Amend the first sentence of the second Paragraph of Clause 9 to read:
“The Service formats are specified in this clause using ISO Standard Pascal. Alternative Service formats
for use with the C language are specified in annex C.”
Page 105
Add a new annex C as follows:
---------------------- Page: 3 ----------------------
ISO/IEC 10728:1993/Amd 1:1995(E) 0 ISO/IEC
Annex C
(normative)
C language binding
The IRDS Services Interface language bindings for the C language are presented in the form of
a C .h file as set out in clause C.3 below.
C.1 Strategy for the Language Binding
In this binding the data names and data structures defined in clause 8 have been adhered to
except where the C language does not provide an appropriate construct.
In this binding the procedure names and their Parameters defined in clause 8 have been adhered
to except where the C language does not provide an appropriate construct.
Standard C
Macros have been used for various limits instead of const-qualified variables.
requires that the length of an array be a compile-time constant integer expression and a const-
qualified variable does not have this property.
Use of this language binding requires the use of a C implementation that conforms to ISO/IEC
9899: 1990.
C.2 General Rules
1 . Those data names in C.2 below that also appear in Clause 8 shall have the same meaning
as is defined in Clause 8. The Same rules for the use of separators as defined in Clause 8
shall apply.
The function and Parameter names in C.2 below shall have the Same meaning as is
2 .
defined in Clause 9.
The Service Return Codes returned shall be those defined by Clause 9 and Annex A and
3 .
they shall have the Same meaning.
4 . The following mappings from SQL data types to C data types have been used:
C DATA TYPE
SQL DATA TYPE
pIrdsText /* See 8.2.1 */
CHARACTER
pIrdsText /* See 8.2.1 */
CHARAm VARYING
/* See 8.2.1 */
JWTIONAL,CHARA!! pIrdsText
pIrdsText /* See 8.2.1 */
NATIONALCHARACT!ERvARyIT ‘JG
float
double
DXJBLE PRlzcIsIaN
float
F'LOAT
mm
short
sb4AILm
NUMERK lang
DEUMALl
1oKl
/* See 8.2.1 */
mm IrdsIBte
IrdsTime /* See 8.2.1 */
---------------------- Page: 4 ----------------------
ISO/IEC 10728:1993/Amd 1:1995(E)
0 ISO/IEC
TIMEST= IrdsTimeStamp /* See 8.2.1 */
IrdsInterval /* See 8.2.1 */
lIINlxRw
Every function returns an int which is to be set to the value of the NumStates field of the
5 .
RetCode returned by the function.
C.3 Notes for Implernentors
1 . To ensure uniqueness all extemally visible names Start with the characters Irds.
2 For readability and because of the above requirement, many names are not unique within
the first six characters of the name. Those implernentors whose implernentations do not
support long names are to add suitable #define Statements to ensure that all names are
distinguished by their implementation. For example,
#define IrdsOpen 1 0
-
#define IrdsOpenCursor 1 OC
-
C.4 C language .h file
*
This file is called irds.h
/
*
*
This version of this header conforms to:
*
ISO/IEC 10728:1993 (E)
*
IRDS Services Interface
3;
*
0 Cowright ISO 1995
*
/
/* Protect against multiple inclusion of the header file */
#ifndef IRDS H
#define IRDS-H
-
Allow use 3cqr C++ Compilers */
/*
#ifdef cplusplus
extern "C" {
#endif
#include
/* to ensure that NULL is defined */
*
Lmplementor defined length limits */
/
/* Clause 8.1.1 */
tl is to be replaced by an
#define IrdsNameLim tl /*
-lernentor defined
value */
---------------------- Page: 5 ----------------------
ISO/IEC 10728:1993/Amd 1:1995(E)
0 ISO/IEC
/* IrdsNameLim is used in 8.2.2 below */
*
#define IrdsVarLim t2 / t2 is to be replaced by an
impkrentor defined
value */
*
/* IrdsVarLim is used in 8.2.2 below
/
/* Clause 8.1.2 */
#define IrdsTextLim t3 /* t3 is to be replaced by an
impk-nentor defined
value */
*
Note that although no use is made of IrdsTextLim in this
/
language
binding, it is included so that a program may refer to the
value
to test the length of a string. */
- these definitions are used in 8.2.3 below */
/* Clause 8.1.3
*
The numeric values nl, n2, n3, n4 in this clause are to be
/
replaced by irrrplmentor defined values. */
#define IrdsSessIdLim nl
*
/* IrdsSessIdLim used in 8.2.3 below
/
#define IrdsCurIdLim ri2
/* IrdsCmIdLim used in 8.2.3 below */
#define IrdsIrqDicNameLen n3
/* IrdsliqDicNamXen used in 8.2.3 below */
#define IrdsKeyLen n4
*/
/* 1rdsKqLe.n used in 8.2.1 below
---------------------- Page: 6 ----------------------
ISO/IEC 10728:1993/Amd 1:1995(E)
0 ISO/IEC
*/
/* Clause 8.1.4 Data ?Lpes
typedefenum
IrdsDataTypeChar, /"SQLcHARAcTER */
IrdsDatarupeCharvar,
*
/* SQL CHARACm VARYIX /
IrdsData~atChar,
/* SQLNATICNALCHARACTER */
IrdsIBtaTupeNatCharvar,
*/
/* SQL NATIONAL CHARACTER VARYING
*
IrdsData?LpeReal, /* SQL REAL /
IrdsI%taTypeIBuble,
/* SQL DOUBLE PRECISIa */
*
/* SQL FLQAT
IrdsData?LpeFloat, /
*
/* SQL INTEGER
IrdsData?LpeInteger, /
IrdsDataType3rdlint,
/* SQLSMZGLINT */
*
/* SQLNUMERIC
IrdsData?LpeNumeric, /
*
/* SQLDEXIIMAL
IrdsData?LpeDecimal, /
*
/* SQL DATE
IrdsDataTypeDate, /
*
/* SQLTIMJZ
IrdsData?LpeTime, /
IrdsData?LpeTimestamp,
*
/* SQLTIMESTAMP /
*/
IrdsData?LpeInterval, /* SQL INT!ERVAL
*
/* SQL IRDSKEY
IrdsIXta?LpeIrdsKey /
} IrdsData~;
*/
* Clause 8.1.5 IRD Content Status Classes
/
typdefmum
*
IrdsIXsClsUcntl, /* Uncontrolled /
*
/* Controlled /
IrdslXsClsChtl,
*
/* Archived /
IrdsDcsClsArch
} IrdsDcsCls;
---------------------- Page: 7 ----------------------
ISO/IEC 10728:1993/Amd 1:1995(E)
0 ISO/IEC
*
Clause 8.1.6 Close Type parameter */
/
typedefenum
RquestIrdsCmnit,
/* COMMTT
RequestIrdsRollback /* ROLLBACK
} IrdsCloseQpe;
*
Clause 8.2.1 Column data types */
/
typedef char * p1rdsTex-t;
*
Note that in this language binding a pointer to a text
/
string is used instead of an array of char as specified
in the Pascal binding in Clause 8. This removes the
lengthlimitontext.
*
/
typedef struct
i
char Year[4] ;
char Sepl;
char Month[2];
char Sep2;
char mml;
} IrdslXte;
typedef struct
{
char Eou.r[2] ;
char Sepl;
char Minute[2];
char Sep2;
char Second[2];
char Sep3;
char F'raction[3];
1rd.sTi.rr-e;
>
typedef struct
-t
IrdsDate Date;
ChX
Sepr[7;
IrdsTime Time;
IrdsTimestamp;
>
---------------------- Page: 8 ----------------------
ISO/IEC 10728:1993/Amd 1:1995(E)
0 ISO/IEC
typedef struct
ChELK- ~YSru ;
SepI;
ChX
IrdsTime Tirw;
IrdsInterval;
typedef char IrdsKey[IrdsKeyLen];
/* IrdsKeyLen is defined in 8.1.3 above */
/* Clause 8.2.2 O
...
Questions, Comments and Discussion
Ask us and Technical Secretary will try to provide an answer. You can facilitate discussion about the standard in here.