HP 3000 Manuals

RESET [ HP Transact Reference Manual ] MPE/iX 5.0 Documentation


HP Transact Reference Manual

RESET 

Resets execution control parameters, the match or update registers, the
list register stack pointer, or delimiter values.

Syntax 

     RESET(modifier) [target];

The function of RESET depends on the verb's modifier, and the different
modifiers determine the syntax of the statement.  The allowed modifiers
and the associated syntax options are:

COMMAND       Clears user responses from the input buffer.  (See Syntax
              Option 1.)

DELIMITER     Resets delimiter values to Transact defaults.  (See Syntax
              Option 2.)

LANGUAGE      Resets any SET(LANGUAGE) commands issued in the program.

OPTION        Resets various execution control parameters or the match
              and update registers.  (See Syntax Option 3.)

PROPER        Resets delimiters for upshifting the next letter.  (See
              Syntax Option 4.)

STACK         Resets the stack pointer for the list register.  (See
              Syntax Option 5.)

Syntax Options 

(1) RESET(COMMAND);

RESET(COMMAND) clears the input buffer, TRANIN, that contains the
responses to prompts issued by a Transact program.  This option is
particularly useful to clear unprocessed responses from the input buffer
when there is a need to reissue a prompt.  Unprocessed responses can
occur when the user responds to multiple prompts with a series of
responses separated by a currently defined delimiter.  For example:

     GET-NAME:
       DATA CUST-NO ("Please enter a customer number and name"):
           CUST-NAME;

       SET(KEY) LIST(CUST-NO);
       FIND CUST-MAST;
       IF STATUS=0 THEN                <<CUST-NO not found                   >>
         DO
           DISPLAY "Invalid Customer Number. Please re-enter.";
           RESET(COMMAND);             <<Clear input buffer before returning >>
           GO TO GET-NAME;
         DOEND;

When the DATA program is run, suppose the prompt and response are:

     Please enter a customer number and name> 30335, Jones, James

Without the RESET(COMMAND) statement, the unprocessed response "James"
would appear to Transact as a response to the CUST-NO prompt.

(2) RESET(DELIMITER);

RESET(DELIMITER) resets the delimiters used in input fields to the
defaults of "," and "=".  (See "Field Delimiters" in Chapter 5.)

(3) RESET(OPTION) option-list;

RESET(OPTION) is used to reset any options that have been changed by
means of the SET verb.  It is also used to reset the match and update
registers.

option-    One or more of the following fields, separated by commas:
list 

           AUTOLOAD         Resets the AUTOLOAD option.  Forms are not
                            automatically loaded into local form storage
                            before they are displayed.

           END              Resets the END option.  If END or "]" or "]]"
                            is encountered during execution, control
                            passes to the end of sequence.

           FIELD            Resets the FIELD option.  The lengths of
                            prompted-for fields are not indicated on 264X
                            series terminals.  See SET(OPTION) in the SET
                            verb description for more information.

           FORMSTORE=       Unloads the VPLUS forms in form-store-list 
           (form-store-     from the local form storage memory of a forms
           list)            caching terminal.  Form-store-list can either
                            be a list of VPLUS forms separated by commas.
                            Or, it can be the name, enclosed in an
                            additional set of parentheses, of a data item
                            containing such a list.  Forms belonging to
                            different families can appear in the same
                            list.  To use local form storage, you must
                            include the FSTORESIZE parameter in the
                            SYSTEM verb.  (See the FSTORESIZE parameter
                            in the SYSTEM verb entry in this chapter.)

                            The RESET(OPTION) FORMSTORE statement should
                            only be used when lookahead loading is
                            disabled and only to make room in local
                            storage for new forms.  For example, if you
                            know that one form is significantly larger
                            than the others and is not used later in the
                            program, you can explicitly unload it to make
                            room for new forms, rather than relying on
                            lookahead loading to choose the best form to
                            unload.  The RESET(OPTION) FORMSTORE
                            statement is not required in any other
                            situation.  Chapter 5 contains more
                            information about the SET(OPTION) FORMSTORE
                            statement under "Local Form Storage".

                            The following example unloads four forms:

                                 RESET(OPTION) FORMSTORE=(MENU,ADDPROD,CHGPROD,DELPROD);

                            The following commands do the same as
                            above with a data name specified as
                            form-store-list:

                                 DEFINE(ITEM) FORMLIST X(40);
                                 :
                                 LIST FORMLIST;
                                 MOVE (FORMLIST) = "MENU,ADDPROD,CHGPROD,DELPROD";
                                 RESET(OPTION) FORMSTORE=((FORMLIST));

                            ____________________________________________ 

                            NOTE  When local form storage is enabled,
                                  VPLUS automatically configures the HP
                                  2626A and HP 2626W terminals to use
                                  datacomm port 1 and removes the HPWORD
                                  configuration from the HP 2626W
                                  terminal.

                            ____________________________________________ 

           MATCH item-list  Clears the MATCH register so that you can set
                            up new match criteria.  This option can also
                            be used to selectively delete item entries.
                            Here is the format you would use:

                                 RESET(OPTION) MATCH [LIST({[item-name]})];
                                                           {     *     }

                            If there is an entry in the match register
                            with the specified name, it will be deleted.
                            An asterisk (*) can be used in place of the
                            item name to delete the last entry added to
                            the list register.  In either case, if more
                            than one such entry exists in the match
                            register (such as multiple selection
                            criterion in an OR chain), all will be
                            deleted.

                            Only entries that were created in the current
                            level can be deleted.  The error message:
                            ITEM TO BE DELETED NOT FOUND IN MATCH
                            REGISTER is issued at run time if the item
                            specified is not found in the set of entries
                            for the current level.

           NOHEAD           Resets the NOHEAD option.  Data item headings
                            are to be generated on any subsequent
                            displays set up by DISPLAY or OUTPUT
                            statements.

           NOLOCK           Re-enables automatic locking disabled by a
                            previous SET(OPTION) NOLOCK.

           NOLOOKAHEAD      Re-enables lookahead loading.  VPLUS forms
                            are loaded into local form storage according
                            to the sequence defined in FORMSPEC.
                            Lookahead is the default loading option for
                            local form storage in Transact.

           PRINT            Resets the PRINT option.  Any displays
                            generated by the DISPLAY or OUTPUT statements
                            are directed to the user terminal.

           SORT             Resets the SORT option.  Any listings
                            generated by subsequent OUTPUT statements are
                            not sorted before display.

           SUPPRESS         Resets the SUPPRESS option.  Multiple blank
                            lines sent to the display device are not to
                            be suppressed.

           TPRINT           Resets the TPRINT option.  Any displays
                            generated by the DISPLAY or OUTPUT statements
                            and directed to the terminal are not line
                            printer formatted.

           UPDATE           Clears the UPDATE register so you can set up
           item-list        new update parameters.  This option can also
                            be used to selectively delete item entries.
                            Here is the format you would use:

                                 RESET(OPTION) UPDATE [LIST({[item-name})];
                                                            {    *     }

                            If there is an entry in the update register
                            with the specified name, it will be deleted.
                            An asterisk (*) can be used in place of the
                            item name to delete the last entry added to
                            the list register.

                            Only entries that were created in the current
                            level can be deleted.  The error message ITEM
                            TO BE DELETED NOT FOUND IN UPDATE REGISTER
                            will be issued at run time if the item
                            specified is not found in the set of entries
                            for the current level.

           VPLS             Indicates to Transact that the terminal is no
                            longer in block mode.  Error messages are no
                            longer sent to the window.  (See the
                            SET(OPTION) VPLS description.)

                            If SET(OPTION) VPLS=item-name has been
                            specified, you must follow this statement
                            with a RESET(OPTION) VPLS statement.  The
                            VPLS option causes RESET to write the
                            contents of item-name back to the VPLUS
                            comarea.  Only as much of the comarea as was
                            transferred by SET(OPTION) VPLS is written
                            back to the VPLUS comarea by RESET(OPTION)
                            VPLS. You must not include any Transact
                            statement that references VPLUS forms between
                            the SET(OPTION) VPLS=item-name and the
                            RESET(OPTION) VPLS statements.  If you do,
                            Transact returns to command mode and issues
                            an error message.

(4) RESET(PROPER);

RESET(PROPER) resets the delimiters back to the default characters that
cause the next letter to be upshifted by the PROPER function of the MOVE
verb.  The default set of special characters as used by PROPER function
are !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~ and the blank character.

(5) RESET(STACK) LIST;

RESET(STACK) resets the list register so that a new list can be generated
by PROMPT and LIST statements.  The contents of the data register are not
touched.

(6) RESET(LANGUAGE);

RESET(LANGUAGE) resets any SET(LANGUAGE) commands issued in the program.

Examples 

This example removes all current match criteria and item update values
from the match and update registers.

     RESET(OPTION)
         MATCH,
         UPDATE;

This example resets the list register to its beginning so you can use the
same area for new list items.

     RESET(STACK) LIST;

The following examples show how to use the MATCH option to delete
specific items from the match register.  The first example sets up the
match register.

     MOVE (name) = "Fred";
     SET(MATCH) LIST(NAME);
     MOVE (name) = "Bud";
     SET(MATCH) LIST(NAME);
     SET(MATCH) LIST(ADDRESS);
     SET(MATCH) LIST(ZIP);

This example deletes "ADDRESS" from the match register.

     RESET(OPTION) MATCH LIST(ADDRESS);

This example deletes both "NAME" entries from the match register.

     RESET(OPTION) MATCH LIST(NAME);

This example causes the error message ITEM TO BE DELETED NOT FOUND IN
MATCH REGISTER to be issued, because "AGE" is an item in the match
register.

     RESET(OPTION) MATCH LIST(AGE);

The following example shows what happens when using the UPDATE option to
delete an item not added in the entries for the current level.  This
example will result in an error since "NAME" was not added in the current
level.

     SET(UPDATE) LIST(NAME);
     LEVEL;
          SET(UPDATE) LIST(ADDRESS);
          RESET(OPTION) UPDATE LIST(NAME);

     END(LEVEL);

The following example shows how to use the RESET(PROPER) option to reset
the delimiters back to the default characters.

     SET(PROPER) " -;,:0123456789";
     :
     RESET(PROPER);
     MOVE (NAME) = PROPER((NAME));

                             Before         After
          NAME         X(12) 1doe's_joe,p   1doe'S_Joe,P

     SET(PROPER) ". & -";
     :
     RESET(PROPER);
     MOVE (LNAME) = PROPER("mr.&ms.smith-jones");

                             Before               After
          LNAME       X(18)  Mr._John_Smith,jr.  Mr.&Ms.Smith-Jones



MPE/iX 5.0 Documentation