![]() |
|
![]() |
| CursorEditPosition | RecordEd | RecordEdH | RecordEdit |
| RecordEditH | ScrollRelation |
PROCEDURE RecordEdit
(CONST FormName : ARRAY OF CHAR;
CONST RelationName : ARRAY OF CHAR;
CONST KeyFieldName : ARRAY OF CHAR;
CONST CommandRelation : ARRAY OF CHAR;
CONST CommandKey : ARRAY OF CHAR);
(**
RecordEdit - Edit a relation's records.
This procedure allows editing of a relations records. Functions
include locating, finding the next record, finding the previous
record, adding a record, modifying an existing record, and
deleting a record.
CALLING SEQUENCE -
RecordEdit (FormName, RelationName, KeyFieldName,
CommandRelation, CommandKey)
ENTRY -
FormName : ARRAY OF CHAR
Name of form used for editing
RelationName : ARRAY OF CHAR
Name of record to be edited
KeyFieldName : ARRAY OF CHAR
Name of primary keyed field within the relation to be
edited that uniquely identifies a record. An entry
field in the form must exist for this field. If the
primary field is concatenated, the fields which are
components of that field must have entry fields
on the form.
CommandRelation : ARRAY OF CHAR
Name of relation which contains the 'CommandKey' field.
CommandKey : ARRAY OF CHAR
Key name used to receive the single letter command from
the form. This field should be a 1 characters upper-case
only type field. Commands processed in this procedure
include the following (all other responses are invalid).
"A"dd "N"ext
"D"elete "M"odify
"E"xit "P"revious
"L"ocate
*)
PROCEDURE RecordEd
(CONST FormName : ARRAY OF CHAR;
CONST RelationName : ARRAY OF CHAR;
CONST KeyFieldName : ARRAY OF CHAR;
CONST CommandRelation : ARRAY OF CHAR;
CONST CommandKey : ARRAY OF CHAR;
CONST PreModify : PreModifyProcType;
CONST PostLocate : PostLocateProcType);
(**
RecordEd - Edit a relation's records.
This procedure allows editing of a relations records. Functions
include locating, finding the next record, finding the previous
record, adding a record, modifying an existing record, and
deleting a record.
This procedure allows the programmer to execute two variable
procedures which are passed in the argument list. The first,
or 'PreModify' procedure is executed after each form is sent
with a modify type option such as 'add', 'delete', 'modify',
or any command that is not a locate type command.
The second procedure, 'PostLocate', is executed after each
locate type command is performed and before the form is again
displayed. Locate type commands are 'locate', 'next', and
'previous'. This is only executed if the 'SageError' is
returns as 0 after a locate operation.
CALLING SEQUENCE -
RecordEd (FormName, RelationName, KeyFieldName,
CommandRelation, CommandKey, PreModify, PostLocate)
ENTRY -
FormName : ARRAY OF CHAR
Name of form used for editing
RelationName : ARRAY OF CHAR
Name of record to be edited
KeyFieldName : ARRAY OF CHAR
Name of primary keyed field within the relation to be
edited that uniquely identifies a record. An entry
field in the form must exist for this field. If the
primary field is concatenated, the fields which are
components of that field must have entry fields
on the form.
CommandRelation : ARRAY OF CHAR
Name of relation which contains the 'CommandKey' field.
CommandKey : ARRAY OF CHAR
Key name used to receive the single letter command from
the form. This field should be a 1 characters
upper-case only type field. Commands processed in this
procedure include the following.
locate commands modify commands exit commands
--------------- --------------- -------------
"L"ocate "A"dd "E"xit
"P"revious "M"odify " " (exit)
"N"ext "D"elete
PreModify : PreModifyProcType
The name of a procedure to be executed after a form has
been sent by the user and before any non-exit request is
performed. The argument is the 1 letter command
requested by the user as returned from the form. This
command may be any letter. If the command is not
recognized as one of the standard operations, an error
will be given after 'PreModify' is executed. The
command letter may be changed in 'PreModify' to one of
the acceptable commands or a blank (" ") which will be
interpreted as a "do nothing" command.
PostLocate : PostLocateProcType
The name of a procedure to be executed after the actual
locate type command is successfully executed. The
locate commands are "L", "P", or "N" (locate, next, or
previous). If a Sage.SageError is returned as non-zero
after execution of a locate type command, this
procedure is not executed.
*)
PROCEDURE RecordEditH
(CONST FormName : ARRAY OF CHAR;
CONST RelationName : ARRAY OF CHAR;
CONST KeyFieldName : ARRAY OF CHAR;
CONST JoinFieldName : ARRAY OF CHAR;
CONST FatherRelation : ARRAY OF CHAR;
CONST FatherJoinField : ARRAY OF CHAR;
CONST CommandRelation : ARRAY OF CHAR;
CONST CommandKey : ARRAY OF CHAR);
(**
RecordEditH - Edit a relation's records using hierarchical restrictions.
This procedure allows editing of a relations records. Functions
include locating, finding the next record, finding the previous
record, adding a record, modifying an existing record, and
deleting a record.
The records available for editing may be restricted by
a joined field from another existing record. Only those records
whose "join" field is equal to the "join" field of the defined
"father" relaion may be accessed.
CALLING SEQUENCE -
RecordEditH (FormName, RelationName, KeyFieldName,
JoinFieldName, FatherRelation, FatherJoinField,
CommandRelation, CommandKey)
ENTRY -
FormName : ARRAY OF CHAR
Name of form used for editing
RelationName : ARRAY OF CHAR
Name of record to be edited
KeyFieldName : ARRAY OF CHAR
Name of primary keyed field within the relation to be
edited that uniquely identifies a record. An entry
field in the form must exist for this field. If the
primary field is concatenated, the fields which are
components of that field must have entry fields
on the form.
JoinFieldName : ARRAY OF CHAR
Name of field in relation being edited to restrict by.
FatherRelation : ARRAY OF CHAR
Name of other relation that contains a field to restrict
the editing of the fields in 'RelationName'.
FatherJoinField : ARRAY OF CHAR
Name of field withing 'FatherRelation' to restrict
access to the relation being edited. The current
contents are compared against 'JoinFieldName' for
equality.
CommandRelation : ARRAY OF CHAR
Name of relation which contains the 'CommandKey' field.
CommandKey : ARRAY OF CHAR
Key name used to receive the single letter command from
the form. This field should be a 1 characters upper-case
only type field. Commands processed in this procedure
include the following.
locate commands modify commands other
--------------- --------------- -----
"L"ocate "A"dd "E"xit
"P"revious "M"odify
"N"ext "D"elete
*)
PROCEDURE RecordEdH
(CONST FormName : ARRAY OF CHAR;
CONST RelationName : ARRAY OF CHAR;
CONST KeyFieldName : ARRAY OF CHAR;
CONST JoinFieldName : ARRAY OF CHAR;
CONST FatherRelation : ARRAY OF CHAR;
CONST FatherJoinField : ARRAY OF CHAR;
CONST CommandRelation : ARRAY OF CHAR;
CONST CommandKey : ARRAY OF CHAR;
CONST PreModify : PreModifyProcType;
CONST PostLocate : PostLocateProcType);
(**
RecordEdH - Edit a relation's records using hierarchical restrictions.
This procedure allows editing of a relations records. Functions
include locating, finding the next record, finding the previous
record, adding a record, modifying an existing record, and
deleting a record.
This procedure allows the programmer to execute two variable
procedures which are passed in the argument list. The first,
or 'PreModify' procedure is executed after each form is sent
with a modify type option such as 'add', 'delete', 'modify',
or any command that is not a locate type command.
The second procedure, 'PostLocate', is executed after each
locate type command is performed and before the form is again
displayed. Locate type commands are 'locate', 'next', and
'previous'. This is only executed if the 'SageError' is
returns as 0 after a locate operation.
The records available for editing may be restricted by
a joined field from another existing record. Only those records
whose "join" field is equal to the "join" field of the defined
"father" relaion may be accessed.
CALLING SEQUENCE -
RecordEdH (FormName, RelationName, KeyFieldName,
JoinFieldName, FatherRelation, FatherJoinField,
CommandRelation, CommandKey, PreModify, PostLocate)
ENTRY -
FormName : ARRAY OF CHAR
Name of form used for editing
RelationName : ARRAY OF CHAR
Name of record to be edited
KeyFieldName : ARRAY OF CHAR
Name of primary keyed field within the relation to be
edited that uniquely identifies a record. An entry
field in the form must exist for this field. If the
primary field is concatenated, the fields which are
components of that field must have entry fields
on the form.
JoinFieldName : ARRAY OF CHAR
Name of field in relation being edited to restrict by.
FatherRelation : ARRAY OF CHAR
Name of other relation that contains a field to restrict
the editing of the fields in 'RelationName'.
FatherJoinField : ARRAY OF CHAR
Name of field withing 'FatherRelation' to restrict
access to the relation being edited. The current
contents are compared against 'JoinFieldName' for
equality.
CommandRelation : ARRAY OF CHAR
Name of relation which contains the 'CommandKey' field.
CommandKey : ARRAY OF CHAR
Key name used to receive the single letter command from
the form. This field should be a 1 characters upper-case
only type field. Commands processed in this procedure
include the following.
locate commands modify commands other
--------------- --------------- -----
"L"ocate "A"dd "E"xit
"P"revious "M"odify
"N"ext "D"elete
PreModify : PreModifyProcType
The name of a procedure to be executed after a form has
been sent by the user and before any non-exit request is
performed. The argument is the 1 letter command
requested by the user as returned from the form. This
command may be any letter. If the command is not
recognized as one of the standard operations, an error
will be given after 'PreModify' is executed. The
command letter may be changed in 'PreModify' to one of
the acceptable commands or a blank (" ") which will be
interpreted as a "do nothing" command.
PostLocate : PostLocateProcType
The name of a procedure to be executed after the actual
locate type command is successfully executed. The
locate commands are "L", "P", or "N" (locate, next, or
previous). If a Sage.SageError is returned as non-zero
after execution of a locate type command, this
procedure is not executed.
*)
PROCEDURE CursorEditPosition
(CONST RelationName : ARRAY OF CHAR;
CONST fieldName : ARRAY OF CHAR);
(**
CursorEditPosition - Specify field to place the cursor during edit.
This procedure allows the specification of the field in which
to place the cursor if other than the command field as specified
in the various editing procedures in this library. This must
be specified each time one of the editing procedures are called.
The default is the command key field.
CALLING SEQUENCE -
CursorEditPosition (RelationName, FieldName)
ENTRY -
RelationName : ARRAY OF CHAR
Name of record whose field will contain the cursor.
FieldName : ARRAY OF CHAR
Name of field in which to place the cursor.
*)
PROCEDURE ScrollRelation
(CONST FormName : ARRAY OF CHAR;
CONST formRel : ARRAY OF CHAR;
CONST formField : ARRAY OF CHAR;
CONST relName : ARRAY OF CHAR;
CONST fldName : ARRAY OF CHAR;
CONST Format : ARRAY OF CHAR;
CONST quickSearch : BOOLEAN);
(**
ScrollRelation - Display a highlighted scroll form for a relation.
This procedure displays a form (similar to Display.DisplayFormVIP)
fed by fields from the specified relation. The relation name
and keyed field are given as well as the format of the
displayed line. The form used to display the data is a form with
multiple highlighted fields. The format string used to define
the contents (format) of each line contains pairs of field names
i.e -
format := "field1, 1, field2, 23, field3, 50";
The format specification may be greater than can be contained within
the field to which it is assigned on the form. The right and left
arrows are used to scroll right and left within the displayed
data window.
This procedure may be called with the 'quickSearch' option set
to true. If so, a character pressed by the user will cause
the cursor to be moved to and positioned on the record whose
keyed field ('fldName') is less than or equal to that character.
As each character is pressed, the internal search string is
added to, and the associated record greater than or equal to
that string will be positioned on. The search continues adding to
and searching on the progressively user supplied string until
a space is encountered (entered by the user) or the requested
search goes beyond the supplied records, at which time the string
is cleared and starts over.
Key functions 57 through 60 (special exits 27 through 60) are used
by this procedure for internal exits. (see Display.DefineFunctionKey
documentation for further explanation) After this procedure
terminates, it will reset these key functions to whatever initial
value they were previously assigned.
CALLING SEQUENCE -
ScrollRelation (formName, formRel, formField, relName, fldName,
format, quickSearch)
ENTRY -
formName : ARRAY OF CHAR
Form to be used for the display.
formRel : ARRAY OF CHAR
Relation associated with the field on the form used as
the highlighted field (formField).
formField : ARRAY OF CHAR
Field used as the highlighted field on the form. This
field will also be the field in which the cursor will be
positioned. This field name may contain the "/n" format
to designate in which relative line number the cursor
should be positioned. If you want to position on the
same line as it was positioned on the last time the
form was shown the "/0" should be added to the form name.
For example -
formField := "field1/581"; -- positions on line 581
or
formField := "field1/0"; -- positions at former line
relName : ARRAY OF CHAR
Name of relation whose records appear on the form.
fldName : ARRAY OF CHAR
Name of keyed field from 'relName' used to sort the
records presented on the form.
format : ARRAY OF CHAR
The format of fields to be presented within each highlighted
field on the form. Each field or literal string is
presented as a pair (the name or literal and the location
within the highlighted field (1 .. n)) with the comma (, ) used
as separators. For example -
format := "field1, 1, '---', 12, field2, 5";
quickSearch : BOOLEAN
Invoke the quick search option for any alpha keys pressed
during the scroll presentation. The space bar clears the
search as previously described.
*)
Send mail to
warren.merrill@inl.gov
with questions or comments about this web site.
Copyright © 1989-2006 Battelle Energy Alliance