UPDATE Command

This command updates a member in the library. The function of this command is to identify the member. The actual changes are accomplished through the use of one or more change, delete, or replace subcommands (described next) associated with the UPDATE command. You can update only members in TEST and ENABLE status. You can temporarily update a PRODuction member using the TEMP parameter.
capan146
This command updates a member in the library. The function of this command is to identify the member. The actual changes are accomplished through the use of one or more change, delete, or replace subcommands (described next) associated with the UPDATE command. You can update only members in TEST and ENABLE status. You can temporarily update a PRODuction member using the TEMP parameter.
The UPDATE command supports members with logical record lengths of 80 though 4096 bytes (inclusive). All input data used for UPDATE replacement records must have the matching logical record length of the existing member; however, when the ALL option (see below) is used, the existing logical record length of the member may be changed by the logical record length of the replacement data.
Syntax
              {,level} ++UPDATE name {,0    } [,ALL ] [,LRECL=size] [,SL=YES]               {      } [,TEMP]
Parameters
  • name
    The name of the member you want to update.
  • ,level | 0 | (blank)
    These indicate the current modification level of the member. This level is increased by one each time the member is updated; that is, each time a non-temporary UPDATE command is issued to the member and successfully completed.
    You can specify a 0 (zero) modification level only for UPDATE ALL commands. This signifies that no level check occurs, assuming the default installation option LEVEL0=YES was selected in PVOPT. However, the level is incremented following a successful update.
  • ALL | TEMP
    The optional parameter ALL on the UPDATE command indicates that all statements presently in a member are replaced by the statements that follow the command in the input stream. When the ALL option is specified, input data of a different logical record length may replace all the existing member's data, thus, changing the logical record length of the member. All other rules for the UPDATE function remain unchanged. Subcommands are not allowed when you specify this option. The replaced statements are not printed; however, as in normal update, you can use a ++WRITE PRINT of the member for this purpose.
    The optional parameter TEMP on the UPDATE command specifies that the changed copy of the member only exists until PAN#1 encounters:
    • A ++ID
    • Any PAN#1 command that requires additional library space (++ADD, ++COPY, another ++UPDATE, and so on)
    • End of the job step.
    The TEMP optional parameter can only be used for members whose logical record length is 80 bytes. Members with logical record lengths greater than 80 bytes cannot be processed with the TEMP option.
    While the temporarily changed copy exists, any reference to that member accesses the temporarily changed copy. A reference that follows one of the above three terminating circumstances accesses the old unchanged copy.
  • [,LRECL=size]
    This optional parameter allows you to declare the size of the logical record length of the input data associated with the ++UPDATE command. The size must be a numerical value from 80 to 4096 bytes (inclusive). The size must not be larger than the physical logical record length of the input file. For example, if the SYSIN (or the INPUT WORK) file has a logical record length of 133 (LRECL=133), a ++UPDATE with LRECL=134 (or larger) is invalid.
    When the LRECL parameter is not specified, the physical size of the input file is used to automatically determine the logical record length of the update data.
    Note:
    The LRECL specification is only in effect for the duration of the ++UPDATE command processing. Upon completion, the physical size of the input file is the default value of the input data.
  • [,SL=YES]
    This optional parameter allows you to automatically strip stacker select codes in column one (1) of each PUNCH update data record. Only columns 2 through 81 of each data record are used as input update data for each corresponding member record. The logical record length of the input file must be 81 (either physically or by use of the LRECL=81 parameter); otherwise, the SL=YES parameter is considered invalid.