HP 3000 Manuals

Record Layout Details Screen [ HP ALLBASE/4GL Developer Reference Manual Vol. 1 ] MPE/iX 5.0 Documentation


HP ALLBASE/4GL Developer Reference Manual Vol. 1

Record Layout Details Screen 

This screen allows you to name the fields in a record layout and define
their position in the record layout.  The screen also allows you to
define the key fields in a record layout.

Screen Image 

[]
Field Descriptions Record Enter the name of a record that you have defined on the record layout header screen. Secured Display-only field indicating the status of the secured field on the record layout header screen. Field Number For new fields, HP ALLBASE/4GL supplies this number automatically. Otherwise, enter the number of an existing field. Action Enter the code of the action to be performed on the specified field number. It can be one of the following: Code Action A Add new field. C Change field name or key number. I Insert a field before this field. D Delete field from layout. Field Spec. Name Enter the name of a dictionary field specification. This field must already be defined. If you intend to use the record layout to define the columns of an HP ALLBASE/SQL table, the field specification cannot allow multiple occurrences of the field. HP ALLBASE/4GL uses the field specification names to define the column names for the HP ALLBASE/SQL table. HP ALLBASE/SQL converts all column names to uppercase, and does not allow extended (eight-bit) characters in column names. Key Number This field is optional. If the field is to be used as a key for reading the file, you must specify the key number. Key number 1 is the primary key. If you use the record layout to define an HP ALLBASE/SQL table, HP ALLBASE/4GL uses the key fields to define the SQL indexes for the table. The index created for key field number 1 is created as a clustering index. The KSAM data file creation facility uses the key numbers on the default record layout to build the file index when it is building a file from the HP ALLBASE/4GL specifications. The key number defines the number of the file index that you must use to locate a record on the file using this key. If you intend to use the record layout as the KSAM data file's default record layout, you must define at least one field on the record layout as a key field. Key numbers are also used to define the number of the file index used to locate a record on an HP TurboIMAGE/iX data set. For detail data sets, these keys are called search items. The keys defined for a record that is used to define an existing physical HP TurboIMAGE/iX data set should match the search items already existing in the data set. Refer to Additional Information for some restrictions placed on record keys for HP TurboIMAGE/iX data sets. Duplicate Keys Enter Y if duplicate key values are permitted. Enter N if duplicate key values are not permitted (that is, only unique key values are permitted). Function Keys f1 Field Specs. Cancels the current screen and displays the field specifications screen. f2 Record Header Cancels the current screen and displays the record layout header screen. f3 File Defn. Cancels the current screen and displays the file/SQL table definition screen. f4 Generate Record Generates the record layout. Additional Information You must generate a record layout before the application can use it. There are certain rules about record layout keys that you need to follow within HP ALLBASE/4GL. The KSAM file manager requires at least one key to a record so it can maintain an index of the records in a data file. The record layout for an HP ALLBASE/SQL table does not need to have any fields defined as key fields. If you do define a field on the record layout as a key field, HP ALLBASE/4GL uses the field to create an index for the table. You cannot use a field specification with multiple occurrences as a key. Like HP ALLBASE/SQL, HP TurboIMAGE/iX data sets cannot use record layouts with a key field specification with multiple occurrences. There are other rules for record layouts that are used in HP TurboIMAGE/iX data set definitions: * Record layouts for master data sets cannot contain keys that allow duplicate entries. * Record layouts for automatic master data sets must contain one key field, and no other fields. * Record layouts for manual master data sets must contain one key field, and may contain other non-key fields. * Record layouts for detail data sets do not need to contain any key fields, but may contain up to 16 keys.


MPE/iX 5.0 Documentation