PAN#1 Library Statements

capan146
Syntax Requirements
You supply library statements that control the functions of PAN#1. Each library statement consists of a library command to direct a specific action. Optional parameters further identify or clarify the action to take. Statements can also include any comments or notes that you want to incorporate.
The characters ++ or -- in the first two positions of an input record, followed by a keyword specifying the function you want to perform (for example, ++ADD or --WRITE) distinguishes the command. Functional parameters can be required or optional, based on the command. 
Panvalet
 prints comments supplied on a library statement on the library activity list. The comments do not effect the system.
All keyword functions and parameters must be in upper case.
The following rules apply to all PAN#1 library statements:
  1. The command must begin with a ++ (plus, plus) or a -- (minus, minus) in positions one and two (except for ++INCLUDE).
  2. The command must follow the ++ or -- without intervening spaces. 
    The command can be any of the following and must be spelled exactly as shown:
ADD
I
RESEQ
ALLOCATE
ID
SELECT
ATTACH
INCLUDE
STATUS
C
INSERT
UNLOCK
COMMENT
LEVEL
UPDATE
COPY
LOCK
USER
D
OPTION
USING
DETACH
PASS
WRITE
EJECT
R
 
FORMAT
RENAME
 
  1. At least a single space must separate the command and the first parameter. Commas with no intervening spaces separate multiple parameters.
  2. At least one space must always follow the last parameter. Comments can begin in any position following this space.
  3. The INCLUDE command is embedded within a member for execution only when the member is retrieved. To conform to source language format standards, the command must begin in position eight of the input record rather than the standard position one required for all other commands.
Special Input Character Combinations
Certain combinations of characters in positions one and two of an input record have special meanings when processed by PAN#1:
Character
Meaning
++
A ++ followed by a valid PAN#1 command and a space is an imperative command to perform a specific library action.
--
A -- followed by a valid PAN#1 command and a space is a conditional command to perform a specific library action if the preceding ++ command completed successfully. The -- command is bypassed if the preceding ++ command was in error.
/*
A /* in the input stream terminates the processing of PAN#1 input. Verify that /* is present only at the end of the PAN#1 input stream.
$+ or $-
A $+ or $- in the input stream converts to a ++ or -- respectively, before being written to an output print, punch, or work file (z/OS only) or added to the
Panvalet
library. All other positions of the input record remain unchanged. Subsequent processing of the output file as a input file results in normal execution of the converted statements as valid PAN#1 commands.
$/
A $/ in the input stream converts to a // before being written to an output print, punch, or work file (z/OS only) or added to the
Panvalet
library. All other positions of the input record remain unchanged. The $/ facilitates storage of JCL in the library or insertion to an output file without interfering with the PAN#1 job stream or JCL.
$* or $&
A $* or $& in the input stream converts to a /* or /& before being written to an output print, punch, or work file (z/OS only) or added to the
Panvalet
library. The standard termination functions of the /* and /& statements are not processed until subsequent retrieval, thus eliminating conflict with PAN#1 termination characters.
You can store unconverted $+, $-, $/, $*, or $& on the library by first adding the member, then reconverting the other symbol back to $ by using PAN#8 scan and replace.
The ++ or -- Characters
A PAN#1 command preceded by ++ is assumed to be imperative. PAN#1 processes it directly regardless of prior or following library actions.
Whenever 
Panvalet
 encounters an error during PAN#1 processing, it bypasses the erroneous library statements and user statements until it encounters a valid ++ command in the input stream to re-establish normal processing.
The first library statement in the input stream must always be a ++ or -- command. In a batch input environment, each set of library statements should begin with a ++ command; you are not affected by any error caused by use of a ++ command as the first statement.
A PAN#1 command preceded by a -- is a conditional command. Library commands in PAN#1 that are entirely dependent upon successful completion of a previous library action are bypassed if the previous command was unsuccessful due to error. A -- command is bypassed if the immediately preceding command does not successfully complete. If the previous command completes successfully, the -- is processed as if it were a normal ++.
For example, several -- commands to create a test job stream can follow an UPDATE command. Failure of the UPDATE due to an incorrect level number does not result in the test stream being built and executed on the old version of the member. Also, a new member is added to the 
Panvalet
 library and immediately updated. If the ADD failed due to a parameter error, the member is not added and the UPDATE fails after searching for the member; use of --UPDATE bypasses this search and results in faster machine throughput. Computer and distribution time wasted in processing an incomplete or incorrect job stream is eliminated.
Any number of -- commands can follow a ++ command. They are bypassed or processed as ++ commands depending on the prior command.
Any PAN#1 command can appear as ++ or -- except ++INCLUDE.
Remember, all 
Panvalet
 commands (++, --, $+, $-, $*, $&, $*, $/) and parameters must be contained within positions 1 to 72 of the input record. The number of blanks permitted between a
Panvalet
 command and its associated parameters cannot exceed the number that extends the command or parameters beyond position 72. User comments or other data can be contained on the input record through position 80, separated by a single space after the command and parameters. This data is processed normally, through position 80.
When extending comments through column 80, be sure that you do not inadvertently invoke the column 72 option.
Commands and Parameters
See Command Notation in Using for standard references throughout 
Panvalet
 (for example, all capital letters signify a keyword). Also, see PAN#1 Applications for a practical explanation of sample problems and solutions using the PAN#1 commands discussed in this section.