HP 3000 Manuals

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


HP RPG/XL Utilities-Part 2 RISE

XPAND 

XPAND expands file limit size of the current work file.

Form 

         X[PAND] numrecs

Parameter Explanation 

numrecs          Number of records by which you wish to expand the file
                 size.

Purpose 

The XPAND command increases the file limit size of the current work file
by a specified number of records.

Related Commands 

When you use the FILE command to create a new file, RISE asks you for the
maximum number of records the file will contain.  If, for example, you
specified 10 lines for the new file, entered 10, and discovered that you
had more lines to add to the file, RISE would return the following
message:

     Error 147:  No room in edit file; use XPAND.

Using X[PAND] with the number of records you wish to add, you could
enlarge the size of the file as desired.  RISE would respond with the
following message, when the expansion is accomplished:

     Xpand completed.

Execution mode:  Line.

Examples 

The following is a legal abbreviation which may be used with the XPAND
command and its parameters:

     X100 Increase the file limit size of the current work file by 100
     records.

In the example, a KSAM file is created with a maximum number of 3 records
(1).  An attempt to LIST the complete contents of the file results in an
error message because, at this point, the file is empty (2).  A second
error is caused by an attempt to enter more records into the file than
were specified as the maximum number previously (3).  The XPAND command
is used to expand the maximum number of records the file will accept by
ten (4).  When the ADD command is again employed, the file accepts the
additional records (5).

          >FILE NEWSIM
     (1)   Creating new Ksam file, enter maximum number of records.
          3
           File opened.
          >L ALL

     (2)   Error 81: Range is empty.
          >A
              1    :LINE 1
              2    :LINE 2
              3    :LINE 3
              4    :LINE 4

     (3)   Error 147: No room in edit file, use XPAND.
          >L A
              1     LINE 1
              2     LINE 2
              3     LINE 3
          >

     (4)  >XPAND10
           Xpand completed.

     (5)  >ADD LAST
              3     LINE 3
              4    :LINE 4
              5    :LINE 5
              6    :<Control Y>

          >



MPE/iX 5.0 Documentation