HP 3000 Manuals

Creating Field Specifications [ HP ALLBASE/4GL Developer Self-Paced Training Guide ] MPE/iX 5.0 Documentation


HP ALLBASE/4GL Developer Self-Paced Training Guide

Creating Field Specifications 

The four data fields you will need for the training application have the
following contents:

Data Field                Contents 

Product Number            6-character identifier

Description               30-character free form product description

Supplier Number           6-digit identifier

Lead Time                 2-digit value

Using the Dictionary Field Specifications Screen 

The dictionary field specifications screen lets you define a field
specification that is then used as a template in the records, screens,
and reports for this application.

It is important to remember that defining a field specification only
defines the essential characteristics of a field; it does not allocate
any storage space for the field.  That part of the development process
takes place later.

To access the field specifications screen: 

   1.  At the main menu screen, press the  Activate Item  function key.

       HP ALLBASE/4GL displays the dictionary menu.  The first option,
       Field Specifications is highlighted.

[]
Dictionary Menu 2. Press the Activate Item function key again to activate the item Field Specifications. You can only activate a highlighted item. If the Field Specification option is not highlighted, use the tab key to move up or down the list until the item is highlighted. The next screen shows the field specifications screen as it will appear when you have entered all the screen details for the first field, the product number field.
[]
Field Specifications Screen The first field specification you are going to define is for the product number field. To do this, * Complete the listed fields on the field specification screen. The entries for each field are listed for you. An explanation of each field is included. * Complete the entry of data into a screen field by pressing Return or Tab. HP ALLBASE/4GL then accepts the current contents of the field, and moves the cursor to the next field. To enter the field values: Field Entry Explanation --------------------------------------------------------------------------------------- Field Spec. Name product_no The name used to refer to the field specification within the application. Secured Press Return to This indicates whether the item is secured accept the default of against modification by unauthorized N. developer. Field Length 6 Maximum number of characters allowed for this field. For character and packed decimal field types, this also specifies the space the field occupies when used in a file record, screen, or report. Repeated Times Accept the default of When a field is one of several fields, as 1. in a single dimensional array, you can specify the number of times the field is repeated. Not allowed in SQL applications. Minimum Entry Length 6 Specifies the minimum number of characters to be entered. Indicates a required field. By entering 6, you are ensuring that only a six character entry is valid. Edit Code Program skips this Indicates type of data field can contain. field. U indicates forced uppercase. All entries will be shifted automatically to uppercase. Storage Type Accept the default. Indicates the way data in the field is physically stored in a file. C indicates character. For a list of storage types, refer to the "Entry Notes" section that follows this one. Justification Accept default. Indicates the direction of justification applied when a value is entered into or displayed in this field. L means left justified, and is the default entry for a character edit code. Table 2-0. (cont.) Field Entry Explanation --------------------------------------------------------------------------------------- Decimal Places Cursor skips this Indicates maximum number of decimal places. field. For an integer, the numer of decimal places is set to zero. Blank When Zero Cursor skips this When the edit code field entry is U, the field. storage type is automatically C for "character," which means the field will be blank. Pad Character Accept default (a Specifies the single character used to fill space). out a field when field contains less than maximum number of characters specified. Range Press Return. Method of validating the value a user enters; done automatically. Table Press Return. Method of validating the value a user enters; done automatically. Help Name Press Return. Not required. An entry here is written into the field definition screen in the screens menu. Name of context-sensitive help screen for this field. Description (Field Accept default. First line defaults to name of item being Name) defined. Description (Author) Enter your name. Defaults to developr. Description Enter a description Contents of description fields are used of the field for when a report is printed. They help keep documentation track of items defined and their purpose in purposes. the application. A suggested entry is displayed on the completed field specifications screen shown earlier. Last Modification No entry Automatically updated to show the time and date of the last modification to any of the fields on the screen. For information on edit codes and storage type codes, refer to the "Entry Notes" at the end of this instructional segment. If You Make a Mistake .... If you make a mistake, use the cursor keys, the Tab key, or the Shift + Tab keys to move to the field containing the error and make your corrections. To move to a previous field, press the Shift key with the Tab key, then press the Return key. To complete and commit the screen: 1. When you have completed the entries on this screen and all fields contain the correct values, press the Commit Data function key to actually create the field specification. HP ALLBASE/4GL creates the field specification that you have just defined, clears the screen, and returns the cursor to the Field Spec. Name field so you can enter a new field specification name. You can now define the rest of the field specifications for the product details. To complete the remaining field specifications: 1. For the three remaining field specifications, enter the values shown on the next page for the fields that require an entry. 2. For all other fields, simply press the Return or Tab key to accept the default. 3. Enter text in the description fields 4. Press the Commit Data function key after entering each field specification. To complete the Description Field entries: Field Entry Explanation --------------------------------------------------------------------------------------- Field Specification description Name used to refer to the field specification within the application. Field Length 30 This is a 30-character field. Edit Code X Indicates an alphanumeric field. Description Enter a description for documentation purposes. To complete the Supplier Number Field entries: Field Entry Explanation --------------------------------------------------------------------------------------- Field Spec. Name supplier_no Field Length 6 Edit Code N Means that the entry must be an unsigned number (0 to 9, a period ., or a comma ,. Storage Type Enter I Means that data will be stored as a two-byte integer. Blank when Zero Y Screen displays blank for numeric value of zero. An N entry would display the zero, which can be distracting on the screen. Description Enter a description for documentation purposes. To complete the Lead Time Field entries: Field Entry Explanation --------------------------------------------------------------------------------------- Field Spec. Name lead_time Field Length 2 This is a 2-character field. Edit Code N Indicates a numeric field. Storage Type I Blank when Zero Y Screen displays blank for numeric value of zero. An N entry would display the zero, which can be distracting on the screen. Description Enter a description for documentation purposes. This completes the entries for the field specifications screen. Entry Notes. Edit Codes The available edit codes for field specifications are shown in the following table: Code Meaning X Any printable character. A Alphabetic characters only (A to z, 0 to 9, extended characters, and underscore). U Forced uppercase. Same as X edit code, but shifts all lowercase alphabetic characters to uppercase. K Alphanumeric characters only (A to z, 0 to 9, extended characters, and underscore). Table 2-0. (cont.) Code Meaning N Unsigned number (0 to 9, an period ".", or a comma ","). S Signed number. Same as N edit code, but may include + or -. Q Question. Y, y, N, or n only. Any characters beyond the first character in the field are ignored. D Date field. Must be eight characters long. The date may be either MM/DD/YY or DD/MM/YY (depending on the system-wide date format) where MM, DD, and YY represent the month, day and year respectively. T Date field, defaulting to the current date. For on-line help about edit codes, press the Help function key. All input fields in the developer have a help screen that you can access while the cursor is on that field. Storage Type Codes The following table lists the available storage type codes and their meanings. Code Meaning C Character. F Four byte, floating point. G Eight byte, floating point (double precision). I Two byte integer. L Four byte integer. P Packed decimal (BCD, or binary coded decimal). This field is only relevant for field specifications with N or S edit codes. This completes the definition of the field specifications that are used in the product file. HP TurboIMAGE/iX Field Specifications. For field specifications that you will use in HP TurboIMAGE/iX data set definitions, you can specify data manager specific attributes for the field specification at this point. If you press the Data Mgr Attribs. function key, the data manager specific field attributes screen is displayed. These attributes have default settings, so you don't need to complete them. Refer to the HP ALLBASE/4GL Developer Reference Manual if you are interested in finding out more about data manager specific field attributes. If you pressed the Data Mgr Attribs. function key, press the Base Fld Specs. function key to return to the field specifications screen.


MPE/iX 5.0 Documentation