The vocabulary used to describe forms in TUXEDO System/T is embodied in the UFORM statements. UFORM statements can be produced in three ways:
by using any UNIX editor to create a file of UFORM statements.
by using an editor to draw a picture of a form, and then processing the picture with pic_uform(1). The output of pic_uform can then be edited to produce the finished specification.
by using vuform(1).
Note: A vuform session produces an executable object file for the
form.
The UFORM statements can be viewed by running the object
file through the formerly-supported mcdis(1).
UFORM has five statement types
Figure 1 shows some examples of UFORM statements.
One
#SERVICE
statement per form is required.
It may be preceded only by comment statements.
The syntax is:
In vuform,
Service name:
is a field on the
Attribute Mode pop-up for
Form-Wide Parameters.
This pop-up appears when a cF is entered in Layout
Mode.
If no service name is specified, vuform uses the file
name of the form (with no suffix).
Figure 2 shows the pop-up for Form-Wide Parameters.
The Form-Wide pop-up has fields for both
#SERVICE
and
#FORM
statements.
The
#FORM
statement is optional.
If present, there can be only one per form.
It can be preceded only by comment statements and the
#SERVICE
statement.
In vuform,
#FORM
parameters are specified via the
vuform(1)
Form-Wide Parameters pop-up (see Figure 2).
This pop-up appears when a cF is entered in Layout
Mode.
To fit the page
we have shown the
#FORM
statement on five lines, however,
there is no syntax for line continuation for UFORM
statements except the extended descriptor statements.
To type in a
#FORM
statement that exceeds the width of your
terminal screen, let the line wrap when you reach the right edge of
the screen.
Do not press
In the vuform Form-Wide Parameter pop-up (see Figure 2),
all the fields between the literal
Field Defaults
and the literal
Validation Routines
are the same as those specified for individual
fields.
Possible values for these fields are described in the
The
#PAGE
statement has a dual purpose.
First it introduces a new page in the form.
Second, it sets page parameters.
If the form has only a single page, the
#PAGE
statement is optional.
If present,
FLAGS
and
STATUSLINE
settings override,
for one page, those on the
#FORM
statement.
In vuform, a
#PAGE
statement is generated when an
A or an I is entered in Layout Mode.
#PAGE
parameters are specified via the
Page-Wide Parameters pop-up (see Figure 3 below).
This pop-up appears when a cp is entered in Layout
Mode.
The keywords have the same meaning they have on the
#FORM
statement.
In a file of UFORM statements,
if one or more basic descriptor statements precede
the first
#PAGE
statement, then the
#PAGE
statement starts a
new page.
However, if a
#PAGE
statement precedes the
first basic descriptor statement,
that
#PAGE
statement introduces the first page of the form.
In the vuform Page-Wide Parameter pop-up (see Figure 3)
all the fields below the literal
Field Defaults
are the same as those specified for individual
fields.
Possible values for these fields are described in the
A basic descriptor statement is required for each field on a page.
The statement consists of
seven positionally-significant parameters separated by
white-space.
Following are examples of basic descriptor statements
(two statements are shown, preceded by two comment statements):
In vuform, basic descriptor parameters are either:
captured from the placement of literal and variable fields
in Layout Mode, or
specified through the pop-ups for literal fields or variable
fields.
The pop-ups are called in from Layout Mode
by moving the cursor to the field in question
and entering a cf.
UFORM Statement Types
Fig. 1: Examples of UFORM Statements
#SERVICE NAME=EMPSVC (Note 1)
#FORM STATUSLINE=20 LASTVAL=crosschk() (Note 2)
*ROW COL MIN LINES WIDTH FLAGS VALUE
3 12 - 1 - L "EMPLOYEE TRANSACTION" (Note 3)
5 10 - 1 - L "EMPLOYEE ID:" (Note 4)
- 29 7 1 7 IUu ID (Note 4)
VAL=RE:[0-9]{7} (Note 5)
HELP="ENTER EMPLOYEE ID" (Note 5)
ERR="EMPLOYEE ID MUST BE 7 NUMERICS" (Note 5)
Notes on Figure 1
The #SERVICE Statement
#SERVICE NAME=service
where service is the name of an application service
function offered
by a server.
The data entered in the form is passed to service for
processing.
Fig. 2: The vuform Form-Wide Pop-up
TUXEDO VUFORM/V2
Form-Wide Parameters
Service name:_____________________ Status line number:______
Field Defaults
Protected field? (y/n): __
Case (u/l/m): __
Display flags: __ (press ESC 0 for detail)
Restricted field? (y/n): __
Validate when leaving? (y/n): __
Validation Routines
Firstval Routine: _____________ Argument: _______________
Lastval Routine: _____________ Argument: _______________
Run in transaction mode? (y/n): __
Transaction timeout:__
>>> Press CTRL-v to save, or CTRL-d to return.
The #FORM Statement
#FORM Statement Syntax
#FORM STATUSLINE=num FLAGS=flags
TRANMODE={TRAN|NOTRAN}
TRANTIME=integer
FIRSTVAL=firstval(usrarg) LASTVAL=lastval (usrarg)
#FORM Statement Keywords
The #PAGE Statement
Fig. 3: The vuform Page-Wide Pop-up
TUXEDO VUFORM/V2
Page-Wide Parameters
Status line number: ___
Field Defaults
Protected field? (y/n): __
Case (u/l/m): __
Display flags: _____ (Press ESC 0 for detail)
Restricted field? (y/n): __
Validate when leaving? (y/n): __
>>> Press CTRL-v to save, or CTRL-d to return.
#PAGE Statement Syntax
#PAGE STATUSLINE=num FLAGS=flags
The Basic Descriptor Statement
* ROW COL MIN LINES WIDTH FLAGS VALUE
* --- --- --- ----- ----- ----- -----
3 5 - - - L3 "FORM 773"
+2 - 10 4 15 U3 MSGFLD
The first of these basic descriptor statements
specifies a literal field with a value of
FORM 773
beginning at row 3, column 5.
The literal is highlighted (this is indicated by the 3
in the flags field).
The second statement specifies an unprotected field
with the FML name MSGFLD
beginning at row 5, column 5.
(The field location is expressed with notation
relative to the previously defined field.)
The field occupies a rectangular area 4 lines by 15 characters.
The area is unprotected (U) and highlighted (3), and requires a minimum
of 10 input characters
If there are other detailed requirements of the
input for this field,
they are specified with extended descriptor statements.
The vuform field parameter pop-ups are shown in Figures 6
through 9 at the end of this section.
Within the section there is information about how each
parameter is specified in vuform.
In UFORM statements,
the VALUE
for a literal field
is a string of characters.
The string must be enclosed in quotes.
In vuform, VALUE is the character string that was entered
in Layout Mode.
For a protected or unprotected variable field,
VALUE
must be the name of
an FML field defined in a field table accessible to the
form handler, mio.
In vuform, the FML name of the field is entered on Page 1 of
the Variable Field Parameter pop-up.
Protected or unprotected fields can be subscripted (indexed).
See
NOTE: * The default if nothing is specified.
More than one attribute
flag can be specified for a
field, although some are obviously mutually exclusive.
If global attribute values have been set
on the
#PAGE
or
#FORM
statements,
a dash can be entered in the
FLAGS
element in place of attributes.
One
TYPE
flag is required for each field; flags of all
other classes are optional and have default values if nothing is
specified.
In the vuform Variable Field Parameter pop-up,
TYPE
is specified via a field labelled
Protected Field? (y/n):;
the default is n (Unprotected).
Attributes can appear in any order.
For example:
P3
and
3P
are equivalent.
If no INITIAL field is specified,
the cursor is initially placed in the first
unprotected area on a page.
DISPLAY FEATURE
attributes are based on those supplied
in the
terminfo(4) database.
Those shown in Figure 4
with dashes in the EXPLANATION column,
should not be used unless the terminfo
database is altered.
In parentheses, next to the explanation of
DISPLAY
attributes 0-9
is the
curses(3)
equivalent.
You can
redefine these curses attributes
in the terminfo database
to take advantage of special features of a terminal.
Changing the terminfo database automatically redefines
the UFORM attribute flags.
For example, if the terminfo definition of
A_INVIS
is changed to be
the color red, then flag 6 defines a red field.
DISPLAY FEATURE
flag S denotes a secret field.
As data is entered into a secret field, character echo is suppressed.
When the form is used to display data, a secret field is not
displayed.
This does not imply that the data is stored in encrypted form.
Flag R denotes unprotected fields with restricted values.
The user can move the cursor to a restricted field, but
no data is accepted from the keyboard.
The user can toggle through the range of permissible choices with the
display default function key, CTRL-w, leaving the field when
the desired choice is displayed.
The range of choices is specified with an extended descriptor
DFLT
statement.
Flag V
causes mio to look for a
VAL
specification
as the cursor leaves the field.
The alternative is to postpone validation until the user
leaves the form.
If no
VAL
specification
accompanies the field, then the field is not validated
regardless of what is specified here.
In vuform, the equivalent is the field labelled
Validate when leaving (y/n):
on Page 1 of
the Variable Field Parameter pop-up.
A field name can be subscripted (or indexed).
The subscript ties the field to a previous appearance of
the same field; that is, one having the same FML field name
or fieldname[subscript].
Fields thus tied together have identical value on display.
On data entry, putting a value in one instance of a subscripted
field puts the same value in all instances having the same
subscript.
If the same field name appears in another basic
descriptor statement without a subscript,
it creates an additional occurrence of the field in the fielded buffer.
For example:
In this example, there are 8 instances of a field named
MSGFLD.
The first, second, fifth and eighth instances of
MSGFLD
are not subscripted.
Hence they represent occurrences 0, 1, 2 and 3 of
MSGFLD
in the FML
buffer.
The third and sixth instance of
MSGFLD
are subscripted with a zero,
so they are tied to the first instance (occurrence 0)
of
MSGFLD.
Any data entered in any one of these fields (No. 1, No. 3, or No. 6) is displayed
in all three.
Similarly, the fourth and seventh instance
of
MSGFLD
are tied to the second instance of
MSGFLD,
(occurrence 1).
Any data entered in any one of these fields (No. 2, No. 4, or No. 7) is displayed
in all three.
Fields should only be subscripted across pages of a form.
That is, only one instance of a fieldname[subscript] combination should
appear on a single page.
In the example,
the fifth instance of
MSGFLD
is not subscripted, hence it results in an
additional occurrence of
MSGFLD
in the buffer (occurrence 2).
Similarly, the eighth instance of msgfld is not subscripted, hence it
results in another additional occurrence of
MSGFLD
in the buffer
(occurrence 3).
In vuform subscripting is done through the field
labelled
FML Field Occurrence:
on Page 1
of the Variable Field Parameters pop-up.
Leaving
FML Field Occurrence:
blank, where
FML Field Name:
repeats a previously
specified field name, creates
a new and different occurrence of the field.
When the form is used, the content of this occurrence can
legitimately be different from the earlier occurrence.
Extended descriptor statements are optional for protected or
unprotected fields.
They may not be used with literal fields.
If used for a protected or unprotected field,
they occur directly after
the basic descriptor statement for the field to which they apply,
and should be indented.
Extended descriptor statements that exceed a single line may
be continued by escaping the
In vuform, extended descriptor information is specified through
Pages 2 and 3 of the Variable Field Parameters pop-up.
Extended descriptor statements have the format:
and specification is data appropriate to that keyword.
Up to five extended descriptor statements
can follow a basic descriptor statement.
(No more than one statement of each kind;
a field can not have both a
MENU
statement and a
FORMEXIT
statement.)
A statement can be continued to another line by
ending the first line with a backslash.
The maximum length of a single statement is 1024 characters.
Any unprotected field can have a help message associated with it.
The help message for a field is specified by the HELP
extended descriptor statement.
The syntax is
In vuform, the text of the help message is entered on Page 2 of the
Variable Field Parameters pop-up.
(See Figure 8.)
The
HELP
keyword is not used.
This type of extended descriptor statement
lets you specify an
error message to be printed when a field fails validation.
Error message specifications have the following syntax:
In vuform, the text of the error message is entered on Page 2 of the
Variable Field Parameters pop-up.
(See Figure 8.)
The
ERR
keyword is not used.
DFLT
is used to assign a default value to
a field.
If a default value is specified for a field,
each time a new blank form is requested by a user,
the field is displayed with its default value.
More than a single default value can be specified.
If more than one value is specified, the first value in the
set is displayed; other values in the set are displayed
by using the display-default key (CTRL-w in mio).
In vuform, the type of default is entered in the field
labelled
Default type:
on Page 2 of the Variable Field
Parameters pop-up.
(See Figure 8.)
The argument is specified on the lines that follow.
The
DFLT
keyword is not used.
Default value specifications have the following syntax:
The
LIT
type of default value specifies a literal
string as the default value of a field.
Double quotes are required if there are embedded
white-space characters in the string.
Double quotes and backslashes may
appear within
a quoted string if preceded by a backslash (\\).
To illustrate a
LIT
type of
DFLT
statement:
DFLT=LIT:3
causes
3
to appear in the associated field whenever the form is
displayed.
The
STRING
type of default value lets you
specify a character string to be
the default value for a protected or unprotected field.
It differs from
DFLT=LIT
in that the argument string
can contain field descriptors that are expanded by the
operating system when the field is displayed.
argument
is a string of
ASCII
characters
that can contain field descriptors.
A field descriptor is one or more characters
preceded by either a % or a $.
Descriptors preceded by a %
are shown below in Figure 10.
A descriptor preceded by a $
is assumed to be an environment variable whose value is to be
displayed on output.
If it has
more than one character
(for example,
${LOGNAME})
it must be enclosed in braces.
If there are white-space characters in the argument string,
the entire string must be enclosed in double quotes.
If there are
double quotes or backslashes in the argument string,
they must be preceded by a backslash (\\).
If argument is omitted,
the default value for the field is
the current date, displayed as mm/dd/yy.
The following are example of
DFLT=STRING
specifications, and the
output they might produce:
The
FUNC
type of default value specification
indicates that a C function of your creation
is called (by mio)
to provide a default value for the associated field.
In this type of specification,
argument
is the name of the function to be called, and may include
a single usrarg string (eleven characters maximum)
to be passed to that function.
The syntax is
More than one value may be specified
with a single
DFLT
extended descriptor statement.
The first value listed is the one that the
field is set to when the form is displayed.
The user can cycle through the other values
with the display-default function key (CTRL-w in mio).
An example of a
DFLT
specification with multiple values appears below.
Extended descriptor statements of the
VAL
type
contain validation option specifications.
Validation options describe
how mio is to determine valid
input for an unprotected field.
If the user tries to enter input
that does not pass the specified validation test,
it is rejected with an error message.
In vuform, the type of validation is entered in the field
labelled
Validation type:
on Page 3 of the Variable Field
Parameters pop-up.
(See Figure 9.)
The argument is specified on the lines that follow.
The
VAL
keyword is not used.
Validation option specifications have the following syntax:
The five validation option types
that require an argument are explained in
the paragraphs below.
In this type of validation option,
argument
is a list of strings separated by white-space characters.
Strings containing embedded white space characters must be surrounded by double
quotes. Double quotes and backslashes may
appear within quoted strings if preceded
by a backslash (\\).
Data matching any of the strings is considered valid.
For example:
The regular expression in argument
can be any regular expression acceptable
to
recomp(3c).
For example:
Note: In a series of regular expressions,
if one is a superset of others,
the superset must be stated first.
This type of validation option
constrains the field to have an integer value that
falls within any range specified by argument.
argument may be a white-space separated
list of the following format:
For example:
The argument of this type of validation option is
a list of numeric ranges.
The value entered into the field is considered valid if it is numeric
and falls within any of the specified ranges.
argument can be a white-space separated list
of the following format:
Following are examples of valid numeric ranges:
The last example matches numbers that are
either
in the 3-6 range
or
in the 9-12 range.
The numeric range list is taken to be all characters on the line following the
NR:.
argument
is a the name of a function of your creation,
followed by a set of parentheses that
enclose an argument (usrarg) to be
passed to that function.
The function is called by mio to validate the data entered by
a user.
No blanks should appear
from the first character of the function name through the closing parenthesis,
unless they are in a usrarg enclosed in quotes.
A sample extended descriptor statement with the
FUNC
validation option might be:
The
MENU
statement identifies the associated field
as one where the selection from a menu list is expected.
The extended descriptor statement described the actions to be taken
depending on the value entered by the user.
In vuform, a
MENU
statement is entered on Page 3 of the
Variable Field Parameters pop-up.
(See Figure 9.)
In the field labelled
Menu type:
the keyword
MENU
is
entered.
The argument is entered on the lines that follow.
The
MENU
statement has the following format:
You can specify
as many value=option:suboption entries as the menu requires.
Entries are separated by commas.
If more than one line is needed, use the backslash
to escape the newline character.
Other general rules about the format of a
MENU
statement are:
A space, a tab or an equal sign determines
the end of a value string.
If a space, tab or equal sign is intended as part of the
value, it must be preceded by a backslash for an escape.
Except as noted in Rule 1,
spaces and tabs are ignored.
A single asterisk (*) as a value indicates
a match for any input not already matched by a previous
value.
The asterisk is useful for specifying a default action.
If an asterisk is to be treated literally, it must be escaped with a
backslash.
The end of a suboption is determined by finding a comma
or an unescaped newline.
If a comma is intended as part of the suboption, it must be
preceded by a backslash for an escape.
option characters (A, C, F, or S) can be entered
in either upper or lower case.
These same rules apply to the
FORMEXIT
statement.
In vuform, the statements are entered in the same way except
that the keyword
MENU
or
FORMEXIT
is entered
in the field labelled
Menu type:,
and the remainder of the
specification is entered on the lines following the label
Argument:.
Option A indicates an action is to be taken that affects
the terminal screen.
Valid suboption values are:
Option C causes the command specified in suboption to
be passed to the shell.
suboption can be a program name with or without arguments, or
several programs connected by pipes.
All output is printed on the terminal unless redirected in
suboption.
When the command completes, or the user hits break, the prompt
The S option causes the current form to be sent to the
service named in suboption.
All fields in the current form are validated.
If some validations fail, fields in error are highlighted and the
cursor is positioned at the first one.
If all fields are valid but lastval fails,
the cursor is positioned at the field specified by lastval.
The application service may request that the same form be
redisplayed, or that another form replace the current one.
The S option has three variations.
All three take servicename as a suboption.
For C, F and S options, any appearance of the
at sign (@) in suboption is expanded to the value of
the menu field.
For example, if a
MENU
line has:
All options can be mixed on a single
MENU
statement.
In addition, other unprotected fields can appear on the form so that
values can be passed to a service or a subsequent form.
As the user leaves a menu form, the value of the menu field is
compared against the list specified in the
MENU
extended descriptor
statement.
The first time a match is found, the associated
option is acted on.
If no match is found, the cursor is positioned at the beginning of
the menu field and an error message is displayed.
A definition of * causes the associated operation to be done
regardless of what is entered in the field.
An example of the UFORM statements needed to define
a menu are shown in the following Figure.
In the example, the first five lines define literal fields that list
the menu choices.
The choices in this example are worded to suggest the action that
is specified by the
MENU
statement option, but this is by no means a
requirement.
The sixth line is a literal that prompts the user to enter a menu
selection.
The seventh line specifies the field in which the user
is expected to enter a selection.
This is an unprotected field,
and in the example it is the home and initial field as
well.
The field name is
MENUFLD.
The first seven lines are all basic descriptor statements.
The eighth line is a
MENU
extended descriptor statement that contains
the
MENU
specifications.
FORMEXIT
extended descriptor statements are used to
implement ring menu systems, but can also be used with any other
field from which the user can leave the form.
In vuform, a
FORMEXIT
statement is entered on Page 3 of the
Variable Field Parameters pop-up.
(See Figure 9.)
In the field labelled
Menu type:
the keyword
FORMEXIT
is
entered.
The remainder of the specification is entered on the
lines that follow the label
Argument:.
FORMEXIT
statements specify actions that depend on the mio
leave key used to exit the form.
The
FORMEXIT
statement has the following format:
A
FORMEXIT
statement defines a list of all possible leave keys
the user can enter when leaving the form from the associated field.
They behave much the same as MENU fields, except that
the value is a leave key rather than a menu selection.
If no match is found in the
FORMEXIT
statement for what the user
enters,
mio
treats it as a request for the service named in the
#SERVICE
statement.
Leaving a form from a field that does not have a
FORMEXIT
statement is treated according to the mio default for the
leave key entered.
Blank lines, or lines beginning with
an asterisk are considered comments.
They are good for internal documentation but have no bearing on the
way the form works.
Users of vuform
can insert comments into a form by disassembling
the .M file produced by vuform.
mcdis is used to disassemble the form.
mcdis sends its output to stdout.
If the output is redirected,
the resulting file can be edited with any
UNIX
editor.
Elements of a Basic Descriptor Statement
-
row is same as in previous descriptor line.
+n
row is n below the row in previous descriptor.
-n
row is n above the row in previous descriptor.
n
place field on row n.
-
field starts in same column as previous field.
+n
field starts n columns to the right of previous start.
n+
field starts n columns to the right of end of previous field.
-n
field starts n columns to the left of previous start.
n
field starts in column n.
C
field is centered.
Fig. 4: UFORM Attribute Flag Values
ATTRIBUTE
FLAG
EXPLANATION
TYPE
L
literal field
U
unprotected field
P
protected field
CASE
u
all data converted to upper case
l
all data converted to lower case
m*
data not converted (mixed case)
DISPLAY FEATURES
S
secret field, never displayed
N*
display field.
0*
normal mode (A_NORMAL)
1
standout mode (A_STANDOUT)
2
inverse video (A_REVERSE)
3
bold (A_BOLD)
4
dim (A_DIM)
5
blink (A_BLINK)
6
--------- (A_INVIS)
7
underline (A_UNDERLINE)
8
--------- (A_PROTECT)
9
--------- (A_ALTCHARSET)
INITIAL
I
initial cursor position
HOME
H
the home field. The mio
home field function key, CTRL-t,
moves the cursor to this field.
RESTRICTED
R
The cursor can be moved to this field,
but keyboard input is not accepted.
The field may be modified only with the
display default function key. This option
has no effect on a protected field.
r or
unspecified*
If unprotected, the field is unrestricted. All
keyboard input is accepted. This option has no
effect on a protected field.
FIELD-BY-FIELD
VALIDATION
V
If a validation function is specified,
the field is validated as the cursor leaves the field.
Applies only to an unprotected field.
v or
unspecified*
Validation, if specified, is performed at exit from the form.
Applies only to an unprotected field.
Notes on Attribute Flags
Subscripted or Indexed Fields
Fig. 5: Specifying Subscripted Fields
* ROW COL MIN LINES WIDTH FLAGS VALUE
* --- --- --- ----- ----- ----- -----
+2 - 10 4 15 U3 MSGFLD
+2 - 10 4 15 U3 MSGFLD
#PAGE
+2 - 10 4 15 U3 MSGFLD[0]
+2 - 10 4 15 U3 MSGFLD[1]
+2 - 10 4 15 U3 MSGFLD
#PAGE
+2 - 10 4 15 U3 MSGFLD[0]
+2 - 10 4 15 U3 MSGFLD[1]
+2 - 10 4 15 U3 MSGFLD
Fig. 6: vuform Literal Field Parameters Pop-up
TUXEDO VUFORM/V2
Literal Field Parameters
Display Flags:________ (Press ESC 0 for help)
>>> Press CTRL-v to save, or CTRL-d to return.
Fig. 7: vuform Variable Field Parameters, Page 1
TUXEDO VUFORM/V2
Variable Field Parameters Page 1 of 3
FML Field Name: ______________________ FML Field Occurrence:_____
Display flags:________ (Press ESC 0 for detail)
Minimum number of characters: __
Protected field? (y/n): __
Home field? (y/n): __
Initial field? (y/n): __
Restricted field? (y/n): __
Secret field? (y/n): __
Case (u/l/m): __
Validate when leaving? (y/n): __
Page 2: Help and error messages, default specification
Page 3: Validation and menu specifications
>>> Press CTRL-v to save, CTRL-f to continue, or CTRL-d to return.
Fig. 8: vuform Variable Field Parameters, Pages 2 and 3
TUXEDO VUFORM/V2
Variable Field Parameters Page 2 of 3
Help message:
___________________________________________________________________
Error message:
___________________________________________________________________
Default type:__________ (Detail on default type and argument: ESC 0)
Argument:
___________________________________________________________________
___________________________________________________________________
___________________________________________________________________
___________________________________________________________________
___________________________________________________________________
>>> Press CTRL-v to save, CTRL-f to continue, or CTRL-d to return.
TUXEDO VUFORM/V2
Variable Field Parameters Page 3 of 3
Validation type:___________ (Detail on validation type and argument: ESC 0)
Argument:
___________________________________________________________________
___________________________________________________________________
___________________________________________________________________
___________________________________________________________________
___________________________________________________________________
Menu type: (Detail on menu type and argument: ESC 0)
Argument:
___________________________________________________________________
___________________________________________________________________
___________________________________________________________________
___________________________________________________________________
___________________________________________________________________
>>> Press CTRL-v to save, or CTRL-d to return.
Extended Descriptor Statements
Format of Extended Descriptor Statement
KEYWORD=specification
where
KEYWORD
is a reserved word from the group
KEYWORD
STATEMENT TYPE
HELP
Help message
ERR
Error message
DFLT
Default values
VAL
Validation options
MENU
Menu choice
FORMEXIT
Exit options
Specifications for HELP Statements
HELP=helpmsg
where helpmsg
is a quoted string.
For example:
HELP="Integer number expected"
The help message for the
current field
is displayed on the status line
whenever the help key (CTRL-a in mio) is depressed.
If no help message is available, the message:
NO HELP FOR THIS FIELD
is displayed.
Specifications for ERR Statements
ERR=errmsg
where
errmsg
is a quoted string.
At runtime a
%s
within the string is replaced by the data entered in the field
by the user.
If the validation for the field fails then
errmsg
is displayed on the status line of the user\'s terminal.
If no error message is given for a field, the default message
FIELD IN ERROR
is displayed
when the validation fails.
For example if the error message specification is:
ERR="%s is invalid"
and if the invalid data is
33
then the error message displayed is:
33 is invalid
Specifications for DFLT Statement
DFLT Statement Syntax
I= type [ : argument ] [ argument ] [ argument ] "..."
type can be one of the following three values:
DFLT=LIT Specifications
DFLT=STRING Specifications
Fig. 9: Field Descriptors for STRING Specifications
m month of year -01 to 12
d day of month - 01-31
y last two digits of year - 00-99
D date as mm/dd/yy
H hour - 00 to 23
M minute - 00 to 59
S second - 00 to 59
T time as HH:MM:SS
j day of year 1-366
a abbreviated weekday - Sun to Sat
h abbreviated month- Jan to DEC
r time in AM/PM notation
P number of pages on form
p current page number
DFLT=STRING Examples
DFLT=STRING: %r
produces a value of
04:44:33 PM
as the default for the associated field,
at around a quarter to five in the afternoon.
DFLT=STRING: "Page %p of %P"
produces a default value like:
Page 1 of 2
DFLT=STRING: "This is my path: ${PATH}"
produces a default value like:
This is my path: :/usr/bin:/bin:/usr/lbin
DFLT=FUNC Specifications
DFLT=FUNC: funcname(usrarg)
For example,
DFLT=FUNC: credlim("123-45-6789")
might call your function credlim to provide the
value for a credit limit field.
The usrarg,
123-45-6789,
is presumably an identifying number needed by credlim.
Specifying Multiple Default Values
DFLT=STRING: "TOM" "DICK" "HARRY"
Specifications for VAL Statements
VAL Statement Syntax
VAL=type[:argument]
type
is one of the nine values shown below.
The format for argument
varies according to type.
Four of the nine types do not require an argument.
VAL=LIT Specifications
VAL=LIT: "THANK YOU" GRACIAS
will cause either
THANK YOU
or
GRACIAS
to be
accepted as valid input to the field.
VAL=RE Specifications
VAL=RE: (a*b*) | (cd)
is a valid regular expression.
The alternation operator ( | ) is supported.
VAL=IR Specifications
VAL=IR: 1-10 12-15
indicates that any integer between 1 and 15, excluding 11, is valid.
VAL=NR Specifications
VAL=FUNC Specifications
VAL=FUNC: ZIP_CODE("NINE DIGIT")
It indicates that the function
ZIP_CODE
should be called to validate
the current field.
The argument, "NINE DIGIT"
is to be passed to it as usrarg.
An
argument for the
FUNC
type of validation option can specify
a list of functions to be called to validate the field.
An example might be:
VAL=FUNC: ZIP_CODE("NINE DIGIT") ADDRESS( )
With this validation option specification,
ZIP_CODE()
is first called to validate the field.
If
ZIP_CODE()
returns a -1 (invalid field)
then
ADDRESS()
is called to validate the field.
If
ADDRESS()
returned a 1 (valid field) then the field
would be considered valid.
In other words,
the input need only be accepted by one of the specified
validation functions to be considered valid.
If both validations
fail, the error message returned by
ADDRESS()
is displayed.
Specifications for MENU Statements
MENU Statement Format
MENU value = option : suboption [, value = option : suboption, ... ]
where:
MENU Statement: Suboption Specifications for Option A
MENU Statement: Suboption Specifications for Option C
[Hit return to continue]
is displayed and the form from which the command was executed is
displayed.
The F option has three variations; all three take
formname as a value for suboption.
MENU Statement: Suboption Specifications for Option S
Notes on Menu Options
*=C:mycmd@
the shell command mycmd is executed for all values entered in
the field and the entered value is passed to the shell as an
argument to mycmd.
General form switching can be established with a
MENU
statement
such as:
*=F:@
which is interpreted as "switch to the form specified by the user."
Fig. 10: UFORM Statements for a Menu List
+1 2 0 1 - L "1. Print Date/Time: "
+1 2 0 1 - L "2. Go to myform Form: "
+1 2 0 1 - L "3. Perform myservice: "
+1 2 0 1 - L "4. Pop Up a Menu Level: "
+1 2 0 1 - L "5. Exit: "
+1 2 0 1 - L "MENU SELECTION: "
- 1+ 1 1 6 UIH MENUFLD
MENU 1=C:date, 2=F:myform, 3=SC:myservice, 4=A:A, 5=A:E, \
*=S:default_svc
Specifications for FORMEXIT Statements
FORMEXIT Statement Format
FORMEXIT value = option : suboption [, value = option : suboption, ... ]
where:
UFORM Comment Lines