HP 3000 Manuals

Native Mode [ HP System Dictionary XL Intrinsics ] MPE/iX 5.0 Documentation


HP System Dictionary XL Intrinsics

Native Mode 

Migrating the Database 

While the dictionary database on MPE V systems can be either an IMAGE or
a TurboIMAGE database, MPE XL requires that the database be in TurboIMAGE
format.  Therefore, a SYSDIC database in IMAGE format must be converted
to TurboIMAGE format to run under MPE XL. The data in the SYSDIC database
does not need any further conversion to be accessed in the native mode.
A SYSDIC database in TurboIMAGE format can be stored on MPE V and
restored on MPE XL.

Specific information on migrating databases and applications can be found
in the following manuals.  A list of manuals which may also be helpful is
located in the preface of this manual, under the heading "Resources" .

  Manual                                      Part Number 
  Migration Overview                          30367-90001

  General User's Skills Migration             30367-90002

  System Administrators Migration Guide       30367-90003

  Migrating Your Data Center                  30367-90004

  Application Migration Guide                 30367-90006

Migrating Programs 

Programs written for use on HP 3000 systems using MPE V may require some
code changes to run on systems using MPE XL. It is then necessary to
recompile the code with a Native Mode compiler under MPE XL.

A programmer using the System Dictionary Intrinsics has two choices for
running programs on MPE XL. Programs can be run in compatibility mode, or
be recompiled and run in native mode.  In either case, the programs can
access the same dictionary.  The data in the dictionary is independent of
the mode of the program that created it.

Specific information on migrating programs written in Pascal, FORTRAN 77,
and COBOL II can be found in the following manuals.  A list of manuals
which may also be helpful is located in the preface of this manual, under
the heading "Resources" .

  Manual                                      Part Number 
  Programmers Skills Migration Guide          30367-90005

  Application Migration Guide                 30367-90006

  Pascal Migration Guide                      31502-90004

  FORTRAN '77 Migration Guide                 31501-90003

  COBOL Migration Guide                       31500-90004

  Native Language Support                     32650-90022

Floating Point Considerations 

The hardware supported floating point data format on MPE XL is different
than the format on MPE V. From a native mode program, the System
Dictionary intrinsics expect floating point data (including both
attribute values and attribute edit ranges) to be in the MPE XL format.
However, there are several ways for a native mode program to produce
floating point data in the MPE V format for input to System Dictionary.
For example, a native mode program may be reading the data from an
external source (e.g.  a file), where the data is in MPE V format, or a
native mode program may have been compiled with a special directive that
indicates data should be processed in MPE V format.  System Dictionary
accommodates these special requirements by allowing a native mode program
to indicate that it desires floating point data to be input and output in
MPE V format.  Refer to the following paragraphs for more information on
data format and to the description of the SDSetControl intrinsic in
Chapter 4 for information on how to indicate what data format is desired.

Attribute Value Alignment 

System Dictionary aligns the attribute values in the attribute buffer
much like a compiler would align a record structure to take advantage of
a specific computer architecture.  For this reason, the rules of
attribute value alignment are slightly different for a native mode
program than for a compatibility mode program.

Native Mode Format.  For a native mode program the alignment of attribute
values in the attribute buffer conforms to the following rule:

     Attribute values of data types Alias Name, Boolean, and Character 
     may start on any one byte boundary, while a value of data type
     Floating Point or Integer must start on a byte boundary equal to its
     byte length.

The following table illustrates this rule.

-------------------------------------------------------------
|                   |                   |                   |
|  Attribute Type   | Attribute Length  |     Boundary      |
|                   |                   |                   |
-------------------------------------------------------------
|                   |                   |                   |
| Alias             | 32                | 1                 |
|                   |                   |                   |
-------------------------------------------------------------
|                   |                   |                   |
| Boolean           | 1                 | 1                 |
|                   |                   |                   |
-------------------------------------------------------------
|                   |                   |                   |
| Character         | 1-255             | 1                 |
|                   |                   |                   |
-------------------------------------------------------------
|                   |                   |                   |
| Floating Point    | 4                 | 4                 |
|                   |                   |                   |
|                   | 8                 | 8                 |
|                   |                   |                   |
-------------------------------------------------------------
|                   |                   |                   |
| Integer           | 2                 | 2                 |
|                   |                   |                   |
|                   | 4                 | 4                 |
|                   |                   |                   |
-------------------------------------------------------------

For example, an attribute of type integer has a value of length 4.  In
native mode data format, the value must start on a 4-byte boundary in the
attribute value buffer, e.g.  byte 1, 5, 9, 13, etc.  If you were to
retrieve the attribute values of two attributes, the first being of type
character with a length of 5, and the second of type integer with a
length of 4, they would be returned in the buffer as follows:

           5 bytes            3 bytes       4 bytes
             char             unused        integer
     |------------------|--------------|-------------------|
     1                  6              9                13

Note that in native mode format, the value for the attribute of type
integer is located at byte 9, while it is located at byte 7 in the
example for compatibility mode format below.  In a native mode program,
you can request the System Dictionary intrinsics to input and output data
in compatibility mode format by calling the SDSetControl intrinsic, which
is described in Chapter 4 of this manual.

Compatibility Mode format.  For a compatibility mode program, the
floating point data will be input and output in the HP 3000 format and
the alignment of attribute values in the attribute buffer conforms to the
following rule:

     Attribute values of data types Alias Name, Boolean, and Character 
     may start on any one byte boundary, while values of data types
     Floating Point and Integer must start on a two byte boundary.

The following table illustrates this rule.

-------------------------------------------------------------
|                   |                   |                   |
|  Attribute Type   | Attribute Length  |     Boundary      |
|                   |                   |                   |
-------------------------------------------------------------
|                   |                   |                   |
| Alias             | 32                | 1                 |
|                   |                   |                   |
-------------------------------------------------------------
|                   |                   |                   |
| Boolean           | 1                 | 1                 |
|                   |                   |                   |
-------------------------------------------------------------
|                   |                   |                   |
| Character         | 1-255             | 1                 |
|                   |                   |                   |
-------------------------------------------------------------
|                   |                   |                   |
| Floating Point    | 4,8               | 2                 |
|                   |                   |                   |
-------------------------------------------------------------
|                   |                   |                   |
| Integer           | 2,4               | 2                 |
|                   |                   |                   |
-------------------------------------------------------------

For example, an attribute of type integer has a value of length 4.  In
compatibility mode data format, the value may start on any 2-byte
boundary in the attribute value buffer, e.g.  byte 1, 3, 5, 7, etc.  If
you were to retrieve the attribute values of two attributes, the first
being of type character with a length of 5, and the second of type
integer with a length of 4, they would be returned in the buffer as
follows:

             5 bytes       1 byte      4 bytes
             char         unused      integer
     |------------------|--------|----------------|
     1                  6        7                11

Note that in compatibility mode format, the value for the attribute of
type integer is located at byte 7, while it is located at byte 9


MPE/iX 5.0 Documentation