Compatibility Mode [ HP System Dictionary XL Intrinsics ] MPE/iX 5.0 Documentation
HP System Dictionary XL Intrinsics
Compatibility Mode
Most programs which were written for HP 3000 series 37 through 70 will
run without any changes on the 900 Series HP 3000 in Compatibility Mode.
Programs written in Pascal, FORTRAN 77, and COBOL can be converted to run
in Native Mode. SPL, however, cannot be converted to run in Native Mode,
and is therefore covered separately here.
This subchapter contains a description of the parameter types used with
System Dictionary intrinsics in SPL terms, and a program example using
the same set of intrinsics as the examples found in Appendix D.
Parameter Descriptions--SPL
In this subchapter, the System Dictionary parameter types are defined in
SPL terms. The data declarations that would be used for these parameters
in a SPL program would be put in either the global declaration section or
in a procedure local declaration section.
AttributeDescription This parameter type is an array of 2 double
integers, whose first element identifies an
attribute's data type, and whose second element
describes the attribute's data length. Where
the data length is either fixed or zero, the
second element can be set to zero.
Example :
double array AttributeParm(0:1);
AttributeListType This parameter type describes a list of
attributes. The format may be in either name
or internal number format.
If the parameter is in name format :
Each name in the list must either be 32
characters long or be separated from the next
name in the list by at least one blank.
Separation by blanks is optional if the names
are 32 characters long. The length of the list
may be up to 8646 characters, and must be
terminated with a semicolon.
Note : The word address of the array must be
passed to the intrinsic being called.
Example :
<<variable containing 10 attribute names>>
logical array AttributeList(0:159);
byte array ByteAttributeList(*) = AttributeList;
If the parameter is in internal number format :
This parameter is an array of up to 263 double
integers. The first element of this array
contains a number N (1 to 262), which is
followed by N internal numbers. The length of
the array is determined by the number of
integers being passed. The internal numbers
are the attributes' internal numbers.
Example :
double array AttributeList(0:262);
AttributeValuesType This parameter type is an array in which the
values of attributes specified in an attribute
list are stored.
Note : The starting position of each attribute
value in the record must be correctly located.
The locations are described in Appendix C of
this manual, under the heading "Attribute Value
Alignment" .
Note : The word address of the array must be
passed to the intrinsic being called.
DateType This parameter is an array of 16 characters,
containing a date generated by a System
Dictionary intrinsic. The date has the
following format:
YYYYMMDDhhmmsstt
where
YYYY is the year
MM is the month
DD is the day
hh is the hour
mm is the minute
ss is the second
tt is the tenths of the
second
Example :
byte array Date(0:15);
DcbType This parameter type describes an array of 30
double integers, and is used to pass control
information to System Dictionary intrinsics.
Example :
double array Dcb(0:29);
DictionaryName This parameter type is an array of 86
characters containing the name of a System
Dictionary. The name should be left justified
in the array. If the name is less than 86
characters, the last character in the name must
be a blank.
Example :
byte array Dictionary(0:85);
EntityListType This parameter type describes a list of entity
names whose format may be in either name or
internal number format.
If the parameter is in name format :
Each name in the list must either be 32
characters long or be separated from the next
name in the list by at least one blank.
Separation by blanks is optional if the names
are 32 characters long. The length of the list
may be up to 198 characters, and must be
terminated with a semicolon.
Note : The word address of the array must be
passed to the intrinsic being called.
Example :
<<entity list containing 4 names>>
logical array EntityList(0:63);
byte array ByteEntityList(*) = EntityList;
If the parameter is in internal number format :
This parameter is an array of up to 7 double
integers. The first element of this array
contains a number N (1 to 6), which is followed
by N entity internal numbers. The length of
the array is determined by the number of
integers being passed. The internal numbers
are the entities' internal numbers.
Example :
double array EntityList(0:6);
EntityListOutType This parameter type is an array containing up
to six entity names. Each name will occupy 32
bytes of the array, is defined by parameter
type NameType, and must be left justified and
right blank filled. The list will be
terminated by a semicolon. The number of
elements in the list is determined by the user,
but no more than six names will ever be
returned by an intrinsic.
Example :
byte array EntityListOut(0:193);
ItemValueType This parameter type is user defined. It is any
data type whose fields match the data type and
length for the corresponding specified item.
MessageType This parameter type is an array of 72 bytes
which is used to pass error messages.
Example :
byte array Message(0:71);
NameType This parameter type is an array of 32 bytes,
and may be used as either an input parameter or
an output parameter.
If it is used as an input parameter, the name
should be left justified, and right blank
filled. All lower case letters will be
upshifted. All alphanumeric and special
characters may be used in a name EXCEPT those
in the following list:
, ; : . ( ) " = > < ^ !
In addition, embedded blanks are not allowed.
If the name is an output parameter, it will be
returned left justified and right blank filled.
Example :
byte array Entity(0:31);
NameOrNumberType This parameter type can pass information in
either name format or internal number format.
If the parameter is in name format :
The parameter is an array of 32 bytes, and
contains a name which is left justified and
right blank filled. All lower case letters
used in the name will be upshifted. All
alphanumeric and special characters may be used
in a name EXCEPT those in the following list:
, ; : . ( ) " = > < ^ !
In addition, embedded blanks are not allowed.
Note : The word address should be passed as
the parameter.
Example :
logical array Entity(0:15);
byte array ByteEntity(*) = Entity;
If the parameter is in internal number format :
The parameter is an array of 2 double integers.
The first element of the array should be set to
the value of 1. The second element of the
array is the internal number.
Example :
double array Entity(0:1);
Note :
If the parameter is: the internal number
should be:
an attribute the attribute's internal
number
a domain the domain's internal
number
an entity the entity's internal
number
an entity type the entity type's
internal number
a relationship class the relationship class'
internal number
a scope the scope's internal
number
a version the version's internal
number
NewEntityListType This parameter type specifies a list of
entities, either in name format or internal
number format.
If this parameter is in name format :
This parameter is an array of bytes containing
the names of entities. Each name in the list
must either be 32 characters long or be
separated from the next name by at least one
blank. Separation by blanks is optional if the
names are 32 characters long. The length of
the list may be up to 198 bytes, and must be
terminated with a semicolon.
Note : The word address of the array should be
passed.
Example :
logical array NewEntityList(0:98);
byte array ByteNewEntityList(*) = NewEntityList;
If the parameter is in internal number format :
This parameter is an array of up to 7 double
integers. The first element of the array
contains a number N, which is followed by N
internal numbers. The length of the array is
determined by the number of integers being
passed.
Example :
double NewEntityList(0:6);
NewNameType This parameter type is an array of 64 bytes,
which contains one or two names as defined by
the parameter type NameType. The first name is
an internal name, and is required. If an
external name for the definition is desired, a
second name may be included in the array. The
external name fills elements 32 through 63 of
the array. Each name should be left justified,
and right blank filled to 32 bytes. If a
second name is not desired, the name space
(bytes 33-64) must be filled with blanks.
Example :
byte array NewName(0:63);
NewRelationshipTypeList This parameter type specifies a list of entity
types in either name format or internal number
format.
If this parameter is in name format :
This parameter is an array of bytes which
contains the entity type names of the
relationship type.
Each name in the list must either be 32
characters long or be separated from the next
name in the list by at least one blank.
Separation by blanks is optional if the names
are 32 characters long. The length of the list
may be up to 198 characters, and must be
terminated with a semicolon.
Note : The word address of the array should be
passed to the called intrinsic.
Example :
<< declaration of a variable to contain four names >>
logical array NewRelationshipType(0:63);
byte array ByteNewRelType(*) = NewRelationshipType;
If the parameter is in internal number format :
This parameter is an array of up to 7 double
integers. The first element of the array
contains a number N, specifying the number of
internal numbers in the array. The internal
numbers are those of the entity types composing
the relationship type.
Example :
double array NewRelationshipType(0:6);
RelationshipTypeList This parameter type specifies a list of entity
types composing the relationship type in either
name format or in internal number format.
If the parameter is in name format :
Each name in the list must either be 32
characters long or be separated from the next
name in the list by at least one blank.
Separation by blanks is optional if the names
are 32 characters long. The length of the list
may be up to 198 characters, and must be
terminated with a semicolon.
Note : The word address of the array must be
passed to the intrinsic being called.
Example :
logical array RelationshipType(0:98);
byte array ByteRelType(*) = RelationshipType;
If this parameter is in internal number format
:
This parameter is an array of up to 7 double
integers. The first element of the array
contains a number N, which is followed by N
entity type internal numbers. The length of
the array is determined by the number of
integers being passed. If N is equal to 1,
then the relationship type's internal number is
being passed.
Example :
double array RelationshipType(0:6);
RelationshipTypeOutList This parameter type specifies an array of bytes
containing up to six entity type names, which
compose the relationship type. Each name in
the array is defined by the parameter type
NameType. Each name occupies 32 bytes of the
array, and will be left justified and right
blank filled within that 32 byte field. The
last name in the list will be followed by a
semicolon as the first character of the next
name field. If the list contains six names,
the semicolon will be at the end of the 32
characters for the last name. The length is
determined by the user, but no more than six
entity type names will be returned in the
array.
Example :
byte array RelationshipType(0:193);
RetrievalIDType This parameter type specifies an array of 20
double integers. It contains information
identifying what is to be retrieved, and passes
control information to the calling intrinsic.
The first double integer of this parameter must
be initialized to a binary zero before the
intrinsic is called. During the first call,
the intrinsic changes the value of this
parameter to a new value which is determined by
the intrinsic being called. This new value
should never be changed, and must be passed
back to the intrinsic at each successive call.
Example :
double array RetrievalID(0:19);
ScopeAccessType This parameter type specifies a double integer.
A parameter of this type specifies the access a
scope has to an entity or relationship. The
legal values are:
1 = Read access
2 = Read and Modify access
3 = Create, Delete, Read, and Modify access
ScopePasswordType This parameter type specifies an array of bytes
containing a scope password of up to 32
characters, which must be right blank filled.
These characters may include any alphanumeric
characters, special characters, or embedded
blanks. The password may also be all blanks
(no password).
ScopeRightsType This parameter type specifies an array of up to
7 double integers. The first element of the
array contains a number N, which is followed by
N scope right numbers. The length of the array
is determined by the user. Scope right numbers
are assigned as follows:
1 = Secure capability
2 = Extend capability
3 = Create capability
4 = Read capability
5 = Domain capability
6 = Version capability
Example :
double array ScopeRights(0:6);
StatusType This parameter type is a 28 byte array (7
double integers) containing information
indicating the success or failure of an
intrinsic call. Every intrinsic returns this
information. The first 16 bytes are the same
for each intrinsic, as shown below.
Table C-1. STATUS CONTENTS (SPL)
-------------------------------------------------------------------
| | |
| Bytes | Contain |
| | |
-------------------------------------------------------------------
| | |
| 1 - 4 | The System Dictionary condition code (error |
| | message number) |
| | |
-------------------------------------------------------------------
| 5 - 8 | |
| | The subsystem code number: |
| | |
| | 0 = No Subsystem Error |
| | 1 = MPE |
| | 2 = IMAGE |
| | 3 = SORT |
-------------------------------------------------------------------
| | |
| 9 - 12 | The subsystem error code. (e.g. the IMAGE |
| | error code) |
| | |
-------------------------------------------------------------------
| | |
| 13 - 16 | The intrinsic number |
| | |
-------------------------------------------------------------------
The contents of the remaining bytes (17 - 28)
depend on the intrinsic being called. The
description of each intrinsic which uses these
bytes contains a continuation of this table,
which shows how they are used in that
particular intrinsic.
Example :
double array Status(0:6);
______________________________________________
NOTE Every System Dictionary intrinsic which
is used to retrieve a list of items (e.g.
SDFindRelList, SDGetDomainList,
SDGetRelVarAttr) will return System
Dictionary error number 24 to the first
four bytes of the Status parameter after
the last item in the list has been
retrieved. This number, however, is not
really an intrinsic "error" , but a value
which may be used for program control
(e.g. testing within a loop). Because
the value does not change until after the
last item in the list is retrieved, the
intrinsic is actually called one more
time than the number of items in the
list.
For example, if the intrinsic
SDGetDomainList is used in a dictionary
which has four domains, the first four
bytes of the Status parameter will be 0
during the first four calls (assuming no
dictionary errors) . On the fifth call,
however, there are no more domains to
retrieve, and the value 24 will be
returned, indicating "end-of-list" .
______________________________________________
ValueLine This output parameter type specifies an array
of 80 bytes, which is used to pass value text
from a variable length attribute. The data in
the array will be left justified and right
blank filled.
Example :
byte array Value(0:79);
ValueText This input parameter type specifies an array of
bytes, which is used to assign a value to a
variable length attribute. The length of the
array is determined by the user.
Example :
byte array Value(0:n-1);
where n is the length of the byte array being
passed.
VersionStatusType This parameter type specifies a double integer,
which contains the status of a version. Valid
values are:
1 = Test status
2 = Production status
3 = Archival status
MPE/iX 5.0 Documentation