HP 3000 Manuals

Defining Numeric Constants [ HP ALLBASE/4GL Developer Self-Paced Training Guide ] MPE/iX 5.0 Documentation


HP ALLBASE/4GL Developer Self-Paced Training Guide

Defining Numeric Constants 

Menu Path 

To access the Numeric Constants Screen: 

   1.  From the main menu, select the Dictionary option.

   2.  Select the Storage Items option.

   3.  Choose Numeric Constants.

Description 

A numeric constant is defined as a signed or unsigned number of fixed
value with a fixed number of decimal places.  A numeric constant can be
used to initialize other variables and fields, or it can be used as a
fixed comparative value when you want to test another field.

The value of the numeric constants you create will be different for each
data manager.

If you are creating the KSAM based application or the HP TurboIMAGE/iX
based application, read on below to create the record_not_found constant.

If you are creating the HP ALLBASE/SQL based application, create the
end_of_file variable in "HP ALLBASE/SQL Based Applications".

KSAM Based and HP TurboIMAGE/iX Based Applications 

[]
Numeric Constants Screen To enter the field values: Field Entry Explanation --------------------------------------------------------------------------------------- Numeric Constant Name record_not_found When referred to in the application, a numeric constant name is prefixed with N- . The full reference to this constant is N- record_not_found. Value 19111 The value of this numeric constant is the file error value returned by the data manager when a requested record is not found. In this application, the numeric constant is used to test the file return status value. Table 7-0. (cont.) Field Entry Explanation --------------------------------------------------------------------------------------- Edit Code Accept the default. This is a display only field that shows the edit code of the variable. If the variable value includes a + or a - sign, the display in this field is S. Number of Decimal Accept the default. Display only field that shows the number of Places decimal places in the variable. Numeric variables can have up to 9 decimal places. To create the numeric constant and continue: 1. Press the Commit Data function key. 2. Press the Previous Menu function key to return to the storage item menu. 3. Then turn to the section called "Defining Alphanumeric Constants". HP ALLBASE/SQL Based Applications
[]
Numeric Constants Screen To enter the field values for SQL: Field Entry Explanation --------------------------------------------------------------------------------------- Numeric Constant Name end_of_file When referred to in the application, a numeric constant name is prefixed with N- . The full reference to this constant is N- end_of_file. Value 60110 The value 60110 is the data manager error value returned if a FILE *NEXT command encounters the end or beginning of a file for the active set. In this application, the numeric constant is used to test the file return status value. Edit Code Accept the default. Display only field that shows the edit code of the variable. If the variable value includes a + or a - sign, the display in this field is S. Number of Decimal Accept the default. Display only field that shows the number of Places decimal places in the variable. Numeric variables can have up to 9 decimal places. To create numeric constant and continue: 1. Press the Commit Data function key. 2. Press the Previous Menu function key to return to the storage item menu.


MPE/iX 5.0 Documentation