HP 3000 Manuals

ADD [ HP RPG/XL Utilities-Part 2 RISE ] MPE/iX 5.0 Documentation


HP RPG/XL Utilities-Part 2 RISE

ADD 

     ADD allows you to add new lines to a work file.

Form 

     A[DD] [lb] [BY inc] [^^[form] [R[EPEAT] [n]]]

Parameter Explanation 

lb               The line number where you wish to start adding lines.
                 If not specified, adding begins after the last line in
                 the work file.  If "lb" exists in the work file, RISE
                 will first display the existing source record at "lb"
                 and prompt you with a sequence number immediately
                 following "lb".

BY inc           Increment by which you wish to add lines.  If omitted
                 the current default is used.

^^               Your control of the RPG Record Specification forms.  By
                 itself "^^" homes the cursor and clears the screen
                 before you begin adding lines.  The "^^" option and its
                 parameters may be entered while in ADD mode at the start
                 of a new line to change the RPG Record Specification
                 form or the REPEAT option.  (See R [n] below.)

form             Additionally displays the RPG Record Specification form
                 type you designate.  "form" may be H,F,E,L,I,C,O, or
                 CO[L].

Rn               The REPEAT command homes the cursor and clears the
                 screen of all but the Record Specification form or
                 column indicator after your have entered "n" number of
                 lines.  If "n" is omitted or "n" equals zero, the auto
                 repeat is turned off.

                 Note:  REPEAT parameter must be preceded by "^^".

Purpose 

The ADD command allows you to add new lines to a work file.  If there is
no work file established--if you have not entered a TEXT or FILE
command--your ADD command will automatically create a new work file.

Related Commands 

While in ADD mode, you may enter the LIST MODIFY, and DELETE commands.
To do so, you type ">>" followed by the command at the start of a new
line.

If you type ">>" without a command, the cursor moves to column 6 of your
RPG Record Specification form.  This relieves you of the tedious task of
spacing over columns 1 through 5, where the RPG optional line numbers are
specified, in order to begin entering your record specifications.

Once you type ">>" alone at the start of a new line, RISE will always
prompt you for new text starting from Column 6 whenever you are in ADD
mode.

To return the cursor to column 1, type "<<", and RISE will prompt you
from there.

Leaving ADD 

To leave the ADD mode you type <Control Y> or "//" at the start of a new
line.

Execution mode:  Line

Record pointer:  At last added line

Examples 

The following are legal abbreviations used with the ADD command and its
parameters:

A10^^H R3        Add line 10, Header Specifications form, REPEAT 3.

A^^H             Add under Header Specification form.

AD L BY 10       Add beginning after last line using an increment value
                 of 10.

Examples in this manual are based upon the file SIMCAL. In the examples
of the ADD command, a portion of SIMCAL is entered.  Various parameters
are used.  Errors are committed, and the messages appear with the
listing.

In the first example below, when the ADD command creates a work file, the
ADD begins at line 1 because the file is empty.  If the file existed
previously, RISE would display the last line in the file and the next
line number, where the ADD would begin.

RISE prompts with line numbers for you to enter text.  Two slashes (//)
at the beginning of a line terminate the ADD command.  The ADD command
can also be terminated by <Control Y>.

Initially, in the first example, an error is committed when the ADD
command is given in lower case letters.  RISE only accepts capital
letters (1).  Following the error, the ADD command is legally entered
with a message and line number prompt (2).  No text is entered, however.
Instead, a command is entered which calls for a display of the column
indicator (3).  This command could have been entered immediately
following the ADD command in the following form:

     A[DD] ^^COL

     (1) >add
         Error 195: Only capital letters are allowed.

     (2) >ADD

     (3) Creating work space file.
           1:   ^^COL

In the next example, in which the column indicator is displayed, an error
is committed when an illegal Record Specification form is commanded (1).
Following the correct entry of a command for a Header Specification form
(2), the form is displayed and the first line of text added (3).  Another
error is made when an alphabetic integer (TWO) is used with the R[EPEAT]
parameter (4).  Following the error message, the command is given
correctly (5).

                  0         1         2         3         4         5         6         7
     (1) 12345678901234567890123456789012345678901234567890123456789012345678901234567890
             1    :^^X

     (2)  Error 176:  Only H,F,E,L,I,C,O,COL or Repent allowed after ^^.
             1    :^^H

[]
In the next example, lines 2 and 3 are entered (1). With the ^^R[EPEAT]2 parameter in effect, the second screen display shows that lines 2 and 3 have cleared automatically, the cursor has homed, and line 4 has been added (2). The new line contains a syntax error in the attempt to shut off the REPEAT parameter while changing the specification form to I, for Input Specifications (3). When the command is entered correctly, the Input Specifications form is displayed and lines 5 and 6 are added (4). Line 6 contains a command (">>") which instructs RISE to move the cursor to column 6 of the Record Specification form in order to make the entry of your specifications more convenient (5).
[]
The remaining examples show lines added correctly with the prompt at column 6 (1). In line 9, the R[EPEAT] parameter is again in effect (2). The display shows the results after two Input Specification records are entered (3). After the second line is entered (line 10), the cursor will home up and prompt for more text with line 11. Line 11 shows the way in which you may use the L[IST] command in ADD mode if it is preceded by ">>" (4). D[ELETE] and M[ODIFY] may also be used in this mode if preceded by ">>". <Control Y> is entered at the start of line 11 to exit ADD mode. RISE prompts you for your next command with the ">" (5).
[]
[]


MPE/iX 5.0 Documentation