HP 3000 Manuals

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


HP ALLBASE/4GL Developer Reference Manual Vol. 1

Variables Screen 

This screen allows you to name a variable and declare its attributes.

Screen Image 

	       Click here to view figure.
            

Field Descriptions 

Variable Name   Enter the name of the variable (up to 16 characters).

Length   Enter the maximum number of characters that the variable may
contain.

Edit Code   Enter a code defining the type of data that the variable will
contain.

The following table lists the available edit codes and their meanings.

  Code   Meaning 

   X     Any printable character.

   A     Alphabetic characters only (A to z, extended characters, or
         space).

   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).

   N     Unsigned number (0 to 9, a 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.

Number of Decimal Places   Enter the maximum number of decimal places for
the contents of the variable if the variable is numeric (edit code is N
or S). This field defines the accuracy of numeric data.

Pad Character   Enter a single character to be used to initialize the
variable.  HP ALLBASE/4GL sets every character of the variable to the
value of the pad character before the variable value is assigned.

After the variable value has been assigned, the pad character replaces
leading spaces in numeric variables (edit code N or S) and replaces
trailing spaces in other variable types.

Function Keys 

f1       Work Areas  Cancels the current screen and displays the work
        areas screen.

f2       Calc.  Items  Cancels the current screen and displays the
        calculated items screen.

f3       Numeric Constant  Cancels the current screen and displays the
        numeric constants screen.

f4       AlphaNum Constant  Cancels the current screen and then displays
        the alphanumeric constants screen.

Additional Information 

HP ALLBASE/4GL allocates memory space for all variables when the
application starts.  As a result, using variables for one-off storage of
data (for example, counting records in one report only) results in
inefficient use of the system memory.  Use scratch-pad fields for storing
transient data.



MPE/iX 5.0 Documentation