ADD Command

The ++ADD command adds a new member to the library. The records in the input file that follow this command are written in the library until a record with a ++, --, /*, or /& in positions one and two is encountered. The resulting member resides in the library with status of TEST, ENABLE, ACTIVE, and with a modification level of one.
capan14610
The ++ADD command adds a new member to the library. The records in the input file that follow this command are written in the library until a record with a ++, --, /*, or /& in positions one and two is encountered. The resulting member resides in the library with status of TEST, ENABLE, ACTIVE, and with a modification level of one.
Syntax
The ADD command has the following format:
            [,AUTOCODER     ]             [,BAL or ALC    ]             [,COBOL         ]             [,ANSCOBOL      ]             [,COBOL-72      ]             [,FORTRAN       ] [,DLM=dc]  ++ADD name [,PL/I or PL/1  ] [,LIST] [,NOFORMAT]             [,RPG           ] [,SEQ ] [,TSO     ] [,user code] [,SL=YES]             [,ZTYPE         ]             [,OBJECT        ]             [,JCL           ]             [,DATA          ] [,LRECL=size]             [,OTHER         ]             [,USER780       ]             [,USER180       ]
Parameters
The ADD command uses the following parameters:
  • name
    This required parameter is the name of the new member. This name must be unique; it cannot be the name of any member currently in the library. It can consist of any combination of up to ten alphanumeric characters (letters A through Z, digits 0 through 9, and special characters #, $, @) in any order.
    Language designates the format and internal description of the member. This language identifies source programs; object programs are identified as OBJECT; job control language is identified as JCL; other members are identified as DATA or OTHER. This parameter is optional; if omitted, the member is described as UNSPECIFIED.
  • [,AUTOCODER]
    Positions 6 through 75 of each input record are compressed and stored in the
    Panvalet
    library. Upon any retrieval from the
    Panvalet
    library to a work, print, or punch file, PAN#1 processes the member as follows:
    • Inserts the first five characters of the member name into positions 76 to 80 of each output record, and into positions one through five of the first record.
    • Inserts the second five characters of the member name into positions one through five of the second record.
    • Inserts LVmmm into positions one through five of the third record; mmm indicates the current modification level of the member.
    • Inserts the date of last maintenance of the member into positions one through five of the fourth record, in MMDDY form (MM=month, DD=day, Y=last digit of year).
    • Inserts
      Panvalet
      sequence numbers that you reference in a subsequent UPDATE of the member into positions one through five of the fifth and all subsequent records (for example, 00005 in the fifth record, 00006 in the sixth record, and so on).
  • [,BAL or ALC]
    BAL designates the format and internal description for 370 Assembler language source programs. Positions 1 through 72 of each record are entered into the library. When the member is written to an output file, sequence numbers are inserted into positions 73 through 77 of each record.
  • [,COBOL ] [,ANSCOBOL]
    These parameters designate the format and internal description for standard COBOL and ANSCOBOL language source programs. Positions 7 through 72 of each record are entered into the library. Keywords are compressed if you selected COBOL keyword compression as an installation option. When the member is written to an output file, sequence numbers are inserted into positions one through five of each record and column six is set to a blank. The following data is also inserted into the output records:
    • Inserts date of last maintenance into positions 73 through 80 of the first record in the form of MM/DD/YY.
    • Inserts the first eight characters of the member name into positions 73 through 80 of the second record.
    • Inserts the ninth and tenth characters of the member name, if present, into positions 73 and 74 of the third record.
    • Inserts the current modification level into positions 78 through 80 of the third record.
    • Inserts the first eight characters of the member name into positions 73 through 80 of all remaining records.
  • [,COBOL-72]
    COBOL-72 designates the format and internal description for non-standard COBOL language source programs. Columns 7 through 72 are compressed and stored in the library; columns one through six are retained unchanged for subsequent retrieval. Keywords are compressed if you selected COBOL keyword compression as an installation option. When retrieved from the library, the following formatting rules apply:
    • When retrieved by a WRITE command, inserts asterisks (***) into positions 78 through 80 of the first record, and inserts periods (...) into positions 78 through 80 of the second record.
    • When retrieved by other than a WRITE command, inserts blanks in positions 78 through 80 of the first and second records.
    • Inserts the date of last maintenance into positions 73 through 80 of the third record in the form of MM/DD/YY.
    • Inserts the first eight characters of the member name into positions 73 through 80 of the fourth record.
    • Inserts the ninth and tenth characters of the member name, if present, into positions 73 and 74 of the fifth record.
    • Inserts the current modification level into positions 78 through 80 of the fifth record.
    • Inserts zero-filled sequence numbers, used for
      Panvalet
      updating functions, in columns 73 through 77 of the sixth and all subsequent records.
  • [,FORTRAN]
    This parameter designates the format and internal description for FORTRAN language source programs. Positions 1 through 72 of each record are entered into the library. When the member is written to an output file, sequence numbers are inserted into positions 73 through 77 of each record.
  • [,PL/I or PL/1]
    This parameter designates the format and internal description for PL/I language source programs. Positions 1 through 72 of each record are entered into the library. When the member is written to an output file, sequence numbers are inserted into positions 73 through 77 of each record.
  • [,RPG]
    The formatting rules for RPG members are similar to the AUTOCODER processing described earlier in this section. RPG members are processed the same as AUTOCODER except that when you specify RPG, only positions 6 through 74 of each input record are compressed and stored in the
    Panvalet
    library. The first six positions of the name are generated in positions 75 through 80 of all output records.
  • [,ZTYPE]
    For information about the eight user-defined language labels for existing language types, see Language Name Change Options.
  • [,OBJECT] [,JCL ]
    OBJECT is the format and internal description for object programs. JCL is the format and internal description for job control language members. Positions 1 through 72 of each record are entered into the library. When the member is written to an output file, a sequence number is inserted into positions 73 through 77 of each record.
  • [,DATA]
    You can use DATA to define the format and internal description for other members that are undefined source programs, object programs, JCL, print image listings, or general DATA records from 80 to 4096 bytes long.
    The DATA format parameter results in the following internal handling. Positions 1 through 4096 of each record are entered into the library. When the member is written to the output print file, sequence numbers appear in positions 84 through 88 of each print record. Logical records greater than 80 bytes are "wrapped" onto the print file, that is, each 80-byte record segment of the logical record is written to a single print record, followed by the next 80-byte segment until the whole logical record is printed. When the member is written to the output punch or work file, no sequence numbers are added to the individual records. For logical records greater that 80, the work file must have the same logical record length as the member; however, only 80-byte or 81-byte (stacker select coded) records may be punched.
  • [,OTHER]
    You can use OTHER to define the format and internal description for other members that are undefined source programs, object programs, or JCL.
    The OTHER format, as well as the NOFORMAT parameter, result in the following internal handling. Positions 1 through 80 of each record are entered into the library. When the member is written to the output print file, sequence numbers appear in position 84 through 88 of each print record. When the member is written to the output punch or work file, no sequence numbers are added to the individual records.
  • [,USER780] [,USER180][,USER3] [,USER4]
    You can modify default user formats at
    Panvalet
    installation time. USER3, USER4, and USER780 default store positions 7 through 80; they have no ID field, sequence numbers are inserted in positions one through six as in COBOL for USER780, but not for USER3 and USER4. USER180 defaults store positions 1 through 80. It has no ID field and prints sequence numbers on a write to print only, as in DATA. For more information, see System Management.
  • [,DLM=dc]
    This optional parameter lets you add members or JCL to a
    Panvalet
    library that contains
    Panvalet
    commands starting with ++ or -- in columns 1 & 2.
    Select two characters that are not used in positions 1 & 2 of the member to be input. Add the two characters to the SYSIN input stream after ++ADD statement of the member. The DLM parameter causes
    Panvalet
    to read the input member as data until it reads the two-character delimiter. In the following example, the JCL001 and TEST02 are members in the input PDS library.
    //ADDMEM   EXEC PGM=PAN#1 //SYSPRINT DD SYSOUT=* //SYSUDUMP DD SYSOUT=* //PANDD1   DD DISP=SHR,DSN=
    hlq
    .
    mlq
    .PANLIB //PDSIN    DD DISP=SHR,DSN=
    hlq
    .
    mlq
    .input.PDS //SYSIN    DD * ++OPTION INPUT,PDSIN ++ADD  JCL001,JCL,DLM=%% %% ++ADD  TEST01,DATA ++ADD  TEST02,DATA,DLM=%% %% /*
  • [,LIST] [,SEQ ]
    These optional parameters write the member to the output print file and sequence check the records as the member is added to the library. The print contains the entire 80 column card-images ++ADDed, as well as the new sequence numbers assigned by
    Panvalet
    for subsequent modifications. New sequence numbers appear to the right of the 80 column card-images. Each member begins printing at the top of a new page.
    LIST only prints the new member without sequence checking.
    SEQ forces a print of the new member and checks sequence according to its designated format. When it detects a sequence error,
    Panvalet
    prints a message to the right of the record in error.
    Input records are checked for ascending sequence in the following positions of the member:
Member
Internal Description
Positions
1 to 5
Sequence
1 to 6
Checked
73 to 80
ANSCOBOL
 
X
 
AUTOCODER
X
 
 
BAL or ALC
 
 
X
COBOL
 
X
 
COBOL-72
 
X
 
DATA (LRECL = 80)
 
 
X
DATA (LRECL > 80)
 
 
 
FORTRAN
 
 
X
JCL
 
 
X
OBJECT
 
 
X
OTHER
 
 
X
PL/I or PL/1
 
 
X
RPG
X
 
 
UNSPECIFIED
 
 
X
USER180
 
 
X
USER780
 
X
 
USER3
 
 
X
USER4
 
 
X
If you choose the default options, sequence checking for user formats is as listed previously. If you do not choose the default, refer to the user format definitions in the installation options module.
  • [,NOFORMAT] [,TSO ]
    The NOFORMAT parameter overrides source language formatting. The internal description and the positions to be sequence checked are unaffected. Positions 1 through 80 of each record are entered into the library. When the member is written to the output print file, sequence numbers are inserted into positions 84 through 88 of each print record. When the member is written to an output file, no sequence numbers are inserted into the individual records. If you use the SEQ option, the internal description of the member determines the positions to be sequence checked. When a NOFORMAT member is written to a WORK or PUNCH file, no Special Comment Record is inserted, regardless of the language type. When a NOFORMAT member is updated, no level stamping is done.
    The TSO parameter is designed to be used in conjunction with the TSO option of
    Panvalet
    . In many cases, columns 73 through 80 are used to store sequence numbers that are incremented by ten. Since these sequence numbers become part of the stored record, truncation of the sequence numbers can occur when you use a shift function (R subcommand or scan/replace). You can only use TSO formatting with BAL, COBOL, ANSCOBOL, FORTRAN, PL/I, and JCL language types. You should only use the TSO parameter in conjunction with the TSO option of
    Panvalet
    . See Option for TSO for further details.
  • [,user code]
    This optional parameter allows you to supply information related to the member you are adding. The user code can be any numeric digits from 0 to 9999. This field has no effect on the member, but is maintained and printed on the
    Panvalet
    directory list for your later reference. The field can represent a project number, application code, client number, installation number, or machine number in a multi-computer environment. Zero is assumed if you omit this parameter.
  • [,SL=YES]
    This optional parameter allows you to automatically strip stacker select codes in column one (1) of each input PUNCH data record. Only columns 2 through 81 of each data record are used as input data for each 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.
  • [,LRECL=size]
    This optional parameter allows you to declare the size of the logical record length of the input data associated with the ++ADD 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 ++ADD with LRECL=134 (or larger) is invalid. This parameter is only valid for format DATA.
    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 new member.
    The LRECL specification is only in effect for the duration of the ++ADD command processing. Upon completion, the physical size of the input file is the default value of the input data.