HP 3000 Manuals

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


HP RPG/XL Utilities-Part 2 RISE

JOIN 

JOIN merges or appends a file to your work file.

Form 

     J[OIN] filename [TO loc] [BY inc]

Parameter Explanation 

filename         Name of the file to be joined.

TO loc           Location where "filename" will be joined.  If the
                 destination line exists, "filename" will be joined at
                 the next line in sequence.

BY inc           Increment value of sequence number you wish to use for
                 the JOIN command.

Purpose 

The JOIN command appends or merges the entire contents of file "filename"
to the work file.  If "TO loc" is not specified "filename" is appended at
the end of the work file.  If "BY inc" is not specified, the current
increment default value is used.

Using an increment value of less than 1 allows you to concentrate more
lines in a restricted location.  Sometimes the entire contents of
"filename" cannot be joined as indicated because they are blocked by the
next higher line number.  RISE will automatically attempt to join them by
using the smallest increment value of 0.001.  If this attempt fails
because of the block, the JOIN command will not execute.

 *  Execution mode:  Line or Block.

 *  Record Pointer:  At last line joined to the work file.

 *  Control Y:    Stops listing of lines being joined to work file.

Examples 

The following are legal abbreviations which may be used with the JOIN
command and its parameters:

J FILE2 TO 10    Join the file named FILE2 to the current work file
                 starting at line 10.

J FILE2 TO L     Join the file named FILE2 to the current work file
                 starting at the first line following the last line in
                 the file.

JOI FILE2 BY     Join the file named FILE2 at the end of the current work
0.1              file using an increment value of 0.1.

In the JOIN examples, a file named RPGDOC is created for purposes of file
documentation.  It is stored as a permanent file using the KEEP command
(1).  A five-line version of SIMCAL is then copied into a work file using
the TEXT command (2).  The JOIN command is used to join RPGDOC to SIMCAL
at line 0.1 (3).  The results are displayed on the screen (4), and an
execution message appears (5).

The LIST command, entered incorrectly, produces an error message (6).
When LIST is entered legally, with a line range from the first line to
line 5 (7), the display indicates how the JOIN command with an increment
of 0.1 is executed (8).  The user could JOIN RPGDOC repeatedly to
different source files to document those files.

                   0         1         2         3         4
          12345678901234567890123456789012345678901234567890123456789
              1    :     H*
              2    :     H*  PROGRAM NAME:
              3    :     H*
              4    :     H*  PROGRAMMER  :
              5    :     H*  DATE WRITTEN:
              6    :     H*  PURPOSE     :
              7    :     H*
              8    :<Control Y>
     (1)  >K RPGDOC
           Keep completed.
           File name is RPGDOC
          >
          >
          >
          >T SIMCAL
           Text completed.
     (2)  >L 1/5
              1      00011H
              SIMCAL
              2      00012FINPUT    I P  F      72              DISK
              3      00013FOUTPUT   O    F      72              DISK
              4      00014IINPUT    AA   01   1 CA
              5      00015I        OR    02   1 CS

     (3)  >JOIN RPGDOC TO .1
               .1        H*
               .2        H*  PROGRAM NAME:
               .3        H*
               .4        H*  PROGRAMMER  :
               .5        H*  DATE WRITTEN:
               .6        H*  PURPOSE     :
               .7        H*

     (4)   Join completed.

     (5)  >

     (6)  >LF/5
            ^
           Error 112: Can't distinguish between LINe or LISt command.

     (7)  >L F/5
               .1        H*
               .2        H*  PROGRAM NAME:
               .3        H*
               .4        H*  PROGRAMMER  :
               .5        H*  DATE WRITTEN:
               .6        H*  PURPOSE     :
               .7        H*
              1     00011H
              SIMCAL
              2     00012FINPUT   IP   F       72           DISK
              3     00013FOUTPUT  O    F       72           DISK
              4     00014IINPUT   AA   01   1  CA

     (8)      5     00015I       OR    02   1  CS
          >



MPE/iX 5.0 Documentation