OPTION Command

The OPTION command allows you to specify auxiliary input or output during a  execution. There are two variations of the OPTION command, one for z/OS and one for VSE.
capan146
The OPTION command allows you to specify auxiliary input or output during a 
Panvalet
execution. There are two variations of the OPTION command, one for z/OS and one for VSE.
z/OS Syntax
The OPTION command has the following format:
          {      }                    col 72 ++OPTION {INPUT } ,ddname [,member]   [0]           {OUTPUT}                     [1]
z/OS Parameters
The following parameters are available:
  • {INPUT} 
    INPUT specifies that following ADD and UPDATE ALL commands, PAN#1 receives input from the PDS or sequential file specified. 
    The logical record length of the optional input file can range between 80 and 4096 bytes (inclusive). By default, the logical record length of the input file automatically determines the logical record length of the input data being processed for the current command, unless otherwise specified by the ++ADD or UPDATE LRECL= option. If LRECL=0, 80 is assumed. 
    Note:
    All input, whether from SYSIN or from the Optional Input File, is scrutinized for
    Panvalet
    commands. 
  • PDS Processing 
    After encountering an OPTION INPUT command, PAN#1 delays switching to the specified PDS until it encounters an ADD or UPDATE ALL command. PAN#1 then begins reading from the PDS. PDS input continues until EOF, or until it encounters an ID, OPTION, ADD, or UPDATE ALL command, or detects a
    Panvalet
    command error. Input then reverts to the standard input file. 
    If you do not specify a member name, PAN#1 uses a name equal to the first eight characters of the PAN member name on the previous ADD or UPDATE ALL command. 
    If you specify a member name, the first ADD or UPDATE ALL receives its input from that specified member. After this first ADD or UPDATE ALL, the member name is reset and subsequent ADD and UPDATE ALL commands act as if no member name was specified. 
    Each OPTION INPUT command remains in effect until the system encounters another OPTION or ID command. 
    You can place the 
    Panvalet
    commands in the PDS member. ADD and UPDATE ALL commands still transfer input control (nonrecursive) when encountered. If only commands are in the PDS member, a dummy ADD switches input to the specified member. For example: 
    ++OPTION INPUT,DDNAME,MEMB  ++ADD MEMBER 
    The ADD command abnormally ends with ZERO STATEMENTS NOT ALLOWED, but the commands in the member (MEMB) execute properly. The first command should not specify conditional execution (--COMMAND). 
  • Sequential File Processing 
    After encountering an OPTION INPUT command, PAN#1 delays switching to the specified sequential file until it encounters an ADD or UPDATE ALL command. PAN#1 then begins reading from the sequential file. Input from the sequential file continues until EOF, or until it encounters an ID, OPTION, ADD, or UPDATE ALL command. Input then reverts to the standard input file. 
    If you specify a member name, an INVALID OR UNAVAILABLE FILE message is issued. PAN#1 uses the member name specified on the subsequent ADD or UPDATE ALL command. 
    Each OPTION INPUT command remains in effect until the system encounters another OPTION or ID command. 
    You can place the 
    Panvalet
    commands in the sequential file. ADD and UPDATE ALL commands still transfer input control (nonrecursive) when encountered. If only commands are in the sequential file, a dummy ADD switches input to the sequential file. For example: 
    ++OPTION INPUT,DDNAME  ++ADD MEMBER 
    The ADD command abnormally ends with ZERO STATEMENTS NOT ALLOWED, but the commands in the sequential file execute properly. The first command should not specify conditional execution (--COMMAND). 
User Notes
Consider the following items:
  • The ddname must specify a PDS or sequential file. It cannot be any of the ddnames used by PAN#1, as described in the PAN#1 File Requirements and Options section in PAN#1 Functions and Uses.
  • If no PDS member is found, a ZERO STATEMENTS NOT ALLOWED or NO INSERT RECORDS message is issued.
  • The PDS or sequential file must have an LRECL ranging from 80 through 4096 bytes (inclusive). If LRECL=0, 80 is assumed.
  • The message LRECL CONFLICT BETWEEN OPTION INPUT AND THE STANDARD INPUT STREAM is issued when:
    • Data record(s) immediately follow ADD or UPDATE ALL
    • The LRECL of OPTION INPUT does not match the LRECL of the standard input stream.
  • {OUTPUT}
    OUTPUT reroutes all output from a WRITE, SELECT, or INSERT command to a PDS or sequential file instead of the PANDD2 sequential work file. Once encountered, all subsequent output goes to the PDS or sequential file ddname as specified. This option remains in effect until the system encounters another OPTION or ID command.
    The logical record length of the option output file can range between 80 and 4096 bytes (inclusive). The logical record length is for the member currently being processed for any ++WRITE to OPTION OUTPUT operations.
  • PDS Processing
    If you specify a member name, the first PDS member has that member name. Subsequent members written act as if no member name was specified.
    If you do not specify a member name, PAN#1 uses a name equal to the first eight characters of the 
    Panvalet
    name in the last WRITE command encountered. If you do not use a WRITE command, or if you use column 72 option O, TEMPNAME is used as the member name.
    One PDS member is written (or STOWed) for any combination of WRITE, SELECT, or INSERT commands until one of the following occurs:
    • Encounters another WRITE command.
    • Reaches EOF on SYSIN.
    • Encounters an OPTION, ID, or EXEC command.
    • Begins a ++INCLUDE (the included 
      Panvalet
      member is itself written as a PDS member).
    • Begins a new 
      Panvalet
      member in a group WRITE (WRITE of the entire library or use of the PREFIX= parameter).
    You can use multiple SELECT and INSERT commands combined with a WRITE command to create one PDS member. All output is saved until one of the described situations is encountered. Only then is the previous combination of commands written as a PDS member.
    During a WRITE WORK command with the OPTION OUTPUT in effect, 
    Panvalet
    writes a PDS member for every ++INCLUDE command in the member being written to work. You must be careful when writing a member to a PDS member if the member contains embedded ++INCLUDEs that are not located at the very end of the member. Whenever 
    Panvalet
    finds an INCLUDE, it completes (closes) the current PDS member (name) it is writing and starts creating a new member for the INCLUDE (unless column 72 0 option is used).
    The logical record length of the option output file can range between 80 and 4096 bytes (inclusive). The logical record length of the output file must match the logical record length of the member currently being processed for any ++WRITE to OPTION OUTPUT operations.
    Note:
    See Copying Members to a PDS for more discussion and sample JCL.
  • ,ddname
    The ddname in your JCL that identifies the PDS.
  • [,member]
    The member name in the PDS that is read or written.
  • Column 72 Option
    The column 72 option allows you to add or override options for the command execution. You must code the character for the option desired in column 72 of your statement. The OPTION OUTPUT command options are as follows:
    • 0 generates output from all subsequent SELECT, INSERT, and WRITE commands to a single PDS member.
    • 1 incorporates output generated by level 2 and above nested INCLUDEs into the PDS member generated by the level 1 INCLUDE instead of creating separate PDS members.
    • blank (no option specified) causes a new member to be written to the PDS upon encountering a WRITE or ++INCLUDE of any nest level.
      Note:
      Placing a comment into a ++ command that accidentally goes to or past column 72 can force an option into effect.
  • Sequential File Processing
    If you specify a member name, an INVALID OR UNAVAILABLE FILE message is issued.
    The sequential file is written to any combination of WRITE, SELECT, or INSERT commands until one of the following occurs: 
    • Reaches EOF on SYSIN. 
    • Encounters an OPTION, ID, or EXEC command.
      Any column 72 option specified is ignored.
  • ,ddname
    The ddname in your JCL that identifies the sequential file.
Additional User Notes
Consider the following items:
  • An unsuccessful open of the ddname or the specification of a member name for a sequential file causes a PV051 INVALID OR UNAVAILABLE FILE message.
  • A ddname cannot contain national characters (#, $, @).
  • Member names can contain national characters.
  • A superset subset can be written to a PDS or sequential file. For a PDS, the member name is the subset name.
  • A superset can be written to a PDS or sequential file. For a PDS, the member name is the superset name.
  • PDS errors result in standard z/OS PDS error messages.
  • The output PDS or sequential file must already exist.
  • OPTION issues ENQ/RESERVE macros as needed to ensure PDS integrity.
VSE Syntax
The ++OPTION INPUT command temporarily switches the PAN#1 input stream to an alternate programmer logical unit until end-of-file is reached. ++OPTION INPUT operates in conjunction with ++ADD and ++UPDATE ALL commands.
The logical record length of the option input file can range between 80 and 4096 bytes (inclusive), and must be unblocked. By default, the logical record length of the option input file automatically determines the logical record length of the input data being processed for the current command, unless otherwise specified by the ++ADD or UPDATE LRECL= option.
See Executing PAN#1 for a detailed description of how this command works.
                       [,CATALS ] ++OPTION INPUT ,SYSxxx [,CATALR ]                        [,PHASE ]                        [,CATALOG]
VSE Parameters
The following parameters are available:
  • ,SYSxxx
     
    This required parameter names the programmer logical unit from which the optional input is to come. You can assign this programmer logical unit to card, tape, or disk. 
  • [,CATALS ] [,CATALR ] [,PHASE ] [,CATALOG] 
    These optional parameters specify that end-of-file is simulated on the alternate input whenever a card-image containing the specified parameter is encountered. The record causing the endoffile is ignored. In addition, if you specify CATALS, BKEND statements are ignored, if you specify CATALOG, /+ statements are ignored. For detailed information on these parameters, see the IBM
    VSE System Control Statements Manual
    .