User’s Tutorial

This chapter shows a user the basics of running a Process Module that was generated by DataPaint.  The form that was created in the Developer’s Tutorial is used in this section.  Before starting the tutorial, there are a few basic operations that a user should understand.

Starting The Process Module

You start the Process Module by giving a USE PM command at the ACCENT R asterisk prompt:

*USE PM EMPLOYEE_UPDATE

If the application developer related the Data Set as a Schema Definition or Index Definition in DataPaint, you will need to add an EQUATE clause to the USE command to specify the name of the Data Set or Data Index that you want to use:

*USE PM EMPLOYEE_UPDATE EQUATE {ds_name; di_name} TO designator

See the ACCENT R Reference Manual for details.

Selecting An Item On A Menu

The form uses menus that list the options available at any given point.  To select an item on a menu, use the arrow keys to move the cursor to that item.  After the cursor is positioned on the item, press the Return key.

You can also type the first letters of the menu item name to move the cursor to the item.  If the first letter of the item name is unique in the menu, only one character needs to be entered to move to that selection.  If more than one letter is required to make the item name unique and it is not the first one in the list, you need to type additional letters.

Moving From Field To Field

The cursor shows the position on the screen where data can be entered or changed.  The arrow keys on the keyboard are used to move the cursor up, down, or across the screen.  You can use the arrow keys to move from field to field.  You can also press the Return key or the Tab key to move to the next field.

The cursor automatically moves to the next field if the number of digits or characters entered from the keyboard equals the width of the data entry area.

Help

The form has two types of context-sensitive help.  The first type is for the selections on the menus.  This type of help is in every Process Module generated by DataPaint.  The second type is help provided by the application developer for the data fields in the MAIN Data Set.  For both types, you display the help text by positioning the cursor and pressing the Question Mark (?) key.  After you have read the help text, you can go back to the form by pressing the Return key.

If there is no help text defined for an item, the terminal beeps when you press the Question Mark (?) key.

PF Keys

In some functions, you use PF (Program Function) keys to tell DataPaint what operation to perform.  Anytime you are instructed to press a PF key, be sure that you press one of the PF keys that is on the numeric keypad on the right-hand side of the keyboard.

Control-R (Refresh)

The Control-R character can be used at any time to redisplay the current screen.  This is helpful if unwanted data has appeared on the screen such as mail notification messages or random characters from communication line errors.

You enter a Control-R by holding down the Control key, pressing the R letter key, and then releasing the Control key.  The Control key is often abbreviated Ctrl or Ctl and it is usually in the lower left-hand corner of the keyboard near the Shift key.

Entering Data On The Form

If any invalid character is entered (such as entering an alphabetic character in an integer field), the terminal beeps and the character is ignored.

Character Fields

Each time you press a character key, the cursor moves from left to right.

Numbers Without Decimal Points

When you enter digits into an integer field, the digits shift to the left and the cursor remains at the right most column.  The digits are displayed on the screen according to the specified picture format.

Numbers With Decimal Points

For a numeric field, the cursor points at the column immediately left of the decimal point.  As the digits are being entered, they shift to the left and the cursor remains at the same column position.  The cursor moves to the right when the decimal point is entered.  The digits are displayed on the screen according to the specified picture format.

Date Fields

A date field can be entered in the format MM/DD/YY if the American Date option is enabled.  If the European Date option is enabled, a date field can be entered in the format DD/MM/YY or DD/MM/YYYY.  If the ISO Date option is enabled, a date field can be entered in the format YY/MM/DD or YYYY/MM/DD.  After the date field is completely entered, the date value with the specified date format is redisplayed on the screen.

Delete/Rubout Key

While entering a value into a data field, the only editing allowed is deleting the characters using the Delete or Rubout key.

However, for character fields you can enter edit mode and use a complete set of edit functions (see below).

Editing Character Fields

When entering or changing data, you can enter edit mode to modify the data instead of retyping the entire field.

At any time during data entry for a character field, you can enter Control-V to enter the edit mode.  To exit edit mode, enter another Control-V.  The possible editing operations are listed on the next page.

Character Field Editing Operations

Operation

Command

Move left

Left arrow, ^D

Move right

Right arrow, ^F

Move to end

^E

Move to beginning

Backspace, ^H

Delete left

Delete/Rubout

Delete forward

^K

Delete from beginning

^U

Delete word

Linefeed

Insert/Overstrike

^A

Enter/exit

^V

 

Each of these editing operations is explained below.

Left arrow or Control-D (^D)

This command moves the cursor one character to the left.  If the cursor is already at the beginning of the character string, the cursor will not move.

Right arrow or Control-F (^F)

This command moves the cursor one character to the right.  If the cursor is already at the end of the character string, the cursor will not move.

Control-E (^E)

This command moves the cursor to the end of the character string.

Backspace or Control-H (^H)

This command moves the cursor to the beginning of the character string.

Delete/Rubout

This command deletes one character to the left of the cursor.

Control-K (^K)

This command deletes the character pointed to by the cursor ("delete forward").

Control-U (^U)

This command deletes all the characters from the beginning of the field (data entry area) to the character to the left of the cursor.

Linefeed (LF)

This command deletes the word to the left of the cursor.  A "word" is a sequence of characters separated by any white space characters or special characters.  Note that the following are not considered special characters in edit mode:

            % * ^ _ ~

Control-A (^A)

This command switches between insert and overstrike mode.  When you first enter edit mode, you are in overstrike mode.

Control-V (^V)

This command enters and exits edit mode.

Once you are in edit mode, the Question Mark (?) key (for help) is disabled.  The terminal beeps if the Question Mark (?) key is pressed during edit mode.

The terminal beeps if the number of characters entered exceeds the field width.  In this case, the cursor does not advance to the next data field as it does in non-edit mode.

When you exit edit mode, if the data you entered does not fill the entire field width, the cursor remains in the current data field.  Otherwise, the cursor advances to the next data field automatically.

The terminal beeps if you try to use the Control-V (^V) command on an integer field or a date field.

Tutorial

  1. Start the Process Module:

    *USE PM EMPLOYEE_UPDATE

The Employee Update form appears on the screen.

  1. Enter the letter G.  Note how the cursor moves to the first menu selection that starts with G.  You could have also used the right arrow key to move the cursor to Get.

  2. Press the Question Mark (?) key.  A help message for the Get function appears on the screen.

  3. After reading the help message, press the Return key.  The screen goes back to the way it was before the help message was displayed.

  4. With the cursor still positioned on Get, press the Return key.

  5. Move the cursor to Last.  Press the Return key.  This will retrieve and display the last record in the Data Set.  

  6. Move the cursor to Match and press the Return key.  The message "Enter PF4 to GET the record" appears at the top of the screen.  You are asked to enter the key value of the record to retrieve.  

Note:  Mode in the upper right-hand corner of the screen says "Get".  This helps you keep track of what you are doing.

  1. Enter the value 34532111.  Press the PF4 key.  Anytime you are instructed to press a PF key, be sure that you press the PF key that is on the numeric keypad on the right-hand side of the keyboard.  After you press the PF4 key the record is retrieved and displayed.

  2. In the previous step, there was a record in the Data Set with a key value that exactly matched the key value you  entered on the screen.

Next, we will enter a key value for a record that does not exist in the Data Set.  Move the cursor to Match on the Get menu and press the Return key.

  1. Enter the value 53500000.  Press the PF4 key.
  2. Since a record with that key value is not in the Data Set, a message is displayed that says "matching record was not found".

The message says to use Get Next or Get Prior to "fit".  This means that you should do a Get Next or Get Prior to retrieve the record with a key value that is closest to the key value you entered.  After reading the message, press the Return key and you will go back to the Get menu.

  1. The cursor is on Next on the Get menu.  Press the Return key.  The next record in the Data Set with a key value that is an approximate "fit" is displayed.  The record has a key value of 53553555.
  2. Select Prior on the Get menu and press the Return key.  The prior record in the Data Set with a key value that is an approximate "fit" is displayed.  The record has a key value of 34532111.

For another example of "fitting" key values, see the topic Get Match in the User’s Reference.

  1. Select the Return menu item on the Get menu and you will go back to the main menu.  Select Modify on the main menu and press the Return key.  The message "PF1 to Select Page, PF3 to Write Record, PF4 to Return" appears at the top of the screen.
  2. Use the arrow keys, the Return key, or the Tab key to move to any field and change its value.  

Note:  Mode in the upper right corner of the screen says "Modify".

  1. Press the PF3 key.  The record is written back to the Data Set with the changes you made.  The message "Record Written" appears at the top of the screen, and you go back to the main menu.
  2. Select Enter on the main menu and press the Return key.  The message "PF1 to Select Page, PF3 to Write Record, PF4 to Return" appears at the top of the screen.
  3. Enter a value in each field.  Use the arrow keys, the Return key, or the Tab key to move from field to field.  You can press the Question Mark (?) key on any field in the MAIN Data Set to get help, if the developer has provided it.
  4. Press the PF3 key.  The record is written to the Data Set.  The message "Record Written" appears at the top of the screen, and you go back to the main menu.
  5. We will now delete the record that was just added.  Select Get on the main menu and press the Return key.  Select Match on the Get menu and press the Return key.
  6. The message "Enter PF4 to GET the record" appears at the top of the screen.  Enter the key value to retrieve and press the PF4 key.  The record is displayed and you go back to the Get menu.
  7. Select the Return menu item on the Get menu.  You will go back to the main menu.  Select Delete on the main menu and press the Return key.  The message "Are you sure?" appears at the top of the screen.  Select Yes and press the Return key.  You go back to the main menu.  

Note:  You could have chosen No if you had changed your mind about deleting the record.

This completes the DataPaint User’s Tutorial.  For more detailed information on functions and menus, see the User’s Reference section.