HP 3000 Manuals

COMMANDS-DETAILED DESCRIPTIONS [ HP RPG/XL Utilities-Part 2 RISE ] MPE/iX 5.0 Documentation


HP RPG/XL Utilities-Part 2 RISE

Chapter 2  COMMANDS-DETAILED DESCRIPTIONS 

Notations for this Manual 

Notation                         Meaning                     Example of Use 

--------------------------------------------------------------------------------------

[opt]        Part of command or parameter enclosed by        A[DD] [^^[formf]]
             brackets is optional.

form         One of the designators of the RPG Record        FO[RM] form
             Specifications--H,F E,L,I,C,O--or CO[L], which
             brings a column indicator to the screen.

lb           Line begin (beginning with line).               D[ELETE] lb

le           Line end (ending with line).                    D[ELETE] lb/le

inc          Increment value.                                A[DD] BY inc

/            Delimiter with semantics of TO.                 L[IST] lb/le

X                                                                      A[LL]

             Choose one of the options, X or Y.              L[IST]

Y                                                                       lb/le

Literal Parameters 

Notation                         Meaning                     Example of Use 

--------------------------------------------------------------------------------------

BY           The following number is an increment value.     A[DD] BY.01

CO[L]        Display with column indicator.                  FO[RM] CO[L]

TO           The following line number is a destination; or, COP[Y]l TO l0 CH[ANGE]
             the following is a new string.                  "OLD" TO "NEW"

IN           The following is a range of line numbers.       F[IND] "string" IN lb

E[VERY]      Locates every occurrence of string in the FIND  F[IND] E[VERY] "string"
             command.                                        IN A[LL]

O[FF]        List lines offline on a line printer in the     L[IST] A[LL] O[FF]
             LIST command.

N[OW]        The command is to be executed immediately       E[XIT] N[OW]
             without safeguards.

U[NN]        The work file is to be made permanent without   K[EEP] SAVEFILE U[NN]
             the appended sequence numbers.

A[LL]        The command applies to the entire work file.    D[ELETE] A[LL]

F[IRST]      Indicates first line in work file.              COM[MENT] F[IRST]

L[AST]       Indicates last line in work file.               M[ODIFY] L[AST]
^^           Controls the display of the RPG Record          A[DD] ^^H
             Specification form.

R[EPEAT]     Controls the auto-repeating factor in ADD mode. A[DD] ^^ HR[EPEAT] 3

*            Indicates current position of record pointer    L[IST] *-5/*+5
             (in Line Mode only).

@            May be used in place of *.                      L[IST] @-5/@+5

Those command descriptions which include references to <Control Y> and
the use of "*" for the record pointer position apply only if RISE is in
Line Mode.

Specifying the Sequence Numbers 

There are two ways of specifying sequence numbers:  you can use
references to actual line numbers, or you can refer to them relative to
the current position of the record pointer.  The record pointer is
located at your current editing sequence number in the file.  In this
instance, only the pointer's position relative to sequence numbers is
used.

Below is a summary of the ways in which you may specify sequence numbers
using RISE:

---------------------------------------------------------------------------------------------
|                                             |                                             |
| Actual specification                        | L20/37 (In the manual notation, this will   |
|                                             | be written as "lb/le", meaning line         |
|                                             | beginning and line ending.)                 |
|                                             |                                             |
---------------------------------------------------------------------------------------------
|                                             |                                             |
| Actual specification                        | F[IRST]/L[AST] may be used in place of      |
|                                             | lb/le                                       |
|                                             |                                             |
---------------------------------------------------------------------------------------------
|                                             |                                             |
| Actual specification                        | A[LL] may be used in place of lb/le         |
|                                             |                                             |
---------------------------------------------------------------------------------------------
|                                             |                                             |
| Relative specification (The special         | L* -5/* +5                                    |
| character, *, indicates the current         |                                             |
| position of the record pointer.)            |                                             |
|                                             |                                             |
---------------------------------------------------------------------------------------------
|                                             |                                             |
| (The special character, @, may be used in   | L@-5/@+5                                    |
| place of * to indicate record pointer       |                                             |
| position.)                                  |                                             |
|                                             |                                             |
---------------------------------------------------------------------------------------------
|                                             |                                             |
| (Specifications may be mixed.)              | LF[IRST]/* +10 L* -5/L L 10/L                 |
|                                             |                                             |
---------------------------------------------------------------------------------------------

Increments for Sequence Numbers 

Every text record in RISE's work file has a unique sequence number that
RISE uses to access the KSAM work file.  The difference in value between
each sequence number is known as the increment.  RISE uses a default
increment value of 1 which you may replace with the INCR[ment] command
followed by the new value, so long as that value is between .001 and 5000
inclusively.

Those RISE commands which create new sequence numbers and text records
for you need an increment value to determine the next new number.  Some
of the commands involved are RENUM, ADD, COPY, MOVE, and JOIN. Each of
the commands provides the optional paramater "BY inc" to allow you to
specify the increment for RISE to use while executing the command.  If
you omit "BY inc", RISE will use the current default increment value.

At times you will want to add or merge new text records between two
existing sequence numbers.  If the current increment value that RISE is
using is too large, the new sequence numbers being generated may exceed
the existing upper sequence number.  If this happens, RISE will
automatically make room for your new lines by reducing the large
increment to a smaller one to stay within the upper limit while keeping
your text records in proper order.

If, however, RISE cannot determine a small enough increment value because
you are attempting to introduce too many lines into a restricted space
between two existing line numbers, RISE will display the following error
message:

     Error 144: No room between line numbers.

In such a case, you can use the RENUM[ber] command to change the sequence
numbers and continue with your editing.

About the Examples 

Examples of commands in the section which follows use a short RPG source
file called SIMCAL (SIMple CALculator).  The program will perform simple
calculations--addition, subtraction, multiplication, and division.  Here
is a listing of the file which was made using RISE's PRINT command.

[]
To compile, prepare, and run SIMCAL from within the RPG Interactive System Environment, you would enter the commands below. The comments on the right are for your information and are not part of your responses. While the Segmenter is executing, its HP banner and responses will appear on your screen. You are expected to supply colon (":") prompts as required when entering the ":MPEcommand". --------------------------------------------------------------------------------------- >T[EXT] SIMCAL Copy SIMCAL to work file >V[ERIFY] R[PG] RPG compile the work file into a USL file >PRINT ALL RPGLIST Prints compilation listing offline >V[ERIFY] P[REP] Prepare USL to program file >:FILE INPUT=$STDIN Issue file equations for I/O >:FILE OUTPUT=$STDLIST >RU[N] $OLDPASS Execute SIMCAL Alternatively, you could prepare SIMCAL manually using the commands listed below. Again, you will have to supply colon prompts where they appear below. These are examples of the ":MPEcommand". (See :MPEcommand.) RISE will respond with execution messages, mode changes, and banners to some of the commands. The example below includes only the prompt for information to be used in running the calculator. Comments appear to the right and are not part of your responses. Also, see the MPE Segmenter Reference Manual, (30000-90011), for more information on USL and program files. --------------------------------------------------------------------------------------- >T[EXT] SIMCAL Copy SIMCAL to work file >L[IST] A[LL] List contents for review >V[ERIFY] R[PG] RPG compile the work file >PRINT ALL RPGLIST Prints compilation listing offline >RU[N] SEGDVR.PUB.SYS Run the Segmenter subsystem -USL $OLDPASS Identify the USL file -PREPARE $NEWPASS Prepare USL file in a new program file -EXIT Leave the Segmenter subsystem >:FILE INPUT=$STDIN Issue FILE equations for I/O >:FILE OUTPUT-$STDLIST >RU[N] $OLDPASS Execute SIMCAL When SIMCAL executes, you will receive the following message: SIMPLE CALCULATOR Enter the data in the format: C NNNDD NNNDD Under C, you enter S (subtract), M (multiply), D (divide), or A (add). Your operands may include three whole numbers (NNN) and two decimals (DD). After you enter the data in the prescribed format, SIMCAL produces the arithmetic answer and prompts for more data. When you have all the calculations you require, type ":" (colon), and you will exit from SIMCAL and return to RISE. Do not type ":EOD" to end SIMCAL for it will also end RISE.


MPE/iX 5.0 Documentation