WRITE Command

The ++WRITE command writes members to a specified output file. You can retrieve an entire member, a group of members with a specific name key, or the entire library. The usual rules for formatting apply (see for more information).
capan14610
The ++WRITE command writes members to a specified output file. You can retrieve an entire member, a group of members with a specific name key, or the entire library. The usual rules for formatting apply (see ADD Command for more information).
The WRITE command supports members with logical record lengths of 80 though 4096 bytes (inclusive).
For logical records greater than 80 bytes:
  • The logical records 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.
  • The WORK file must have the same logical record length as the member.
  • Only 80-byte or 81-byte (stacker select coded) records may be PUNCHed.
Parameters
If you use WRITE (,PREFIX=name-key or *):
  • Members are retrieved in name sequence
  • Each member begins printing at the top of a new page
  • INCLUDE reporting occurs as usual on the print file.
  • {PRINT } {PUNCH } {WORK }
    These required parameters specify the output file to which the member is written.
    • PRINT -- To the output print file
    • PUNCH -- To the output punch file
    • WORK -- To the output work file.
  • {,name } {,PREFIX=name-key} {,* } {,PREFIX=wildcard}
    These required parameters describe which member or members you want to retrieve.
    When you specify a name, a single member with that name is written to the output file.
    Using PREFIX=name-key causes all members beginning with a particular name-key of up to nine characters to be written.
    Specifying an asterisk (*) in this position causes the entire PANDD1 library to be written. Because of the amount of output involved, use this parameter with caution.
    PREFIX=wildcard notation allows for generic pattern matching in member names. The two special characters used are:
    • Asterisk (*) - any number of characters or no characters
    • Question mark (?) - any single character.
    A name can contain only one asterisk (*), but any number of question marks (?). One name can contain both an asterisk and question marks.
  • PAY*
    All members beginning with the first three letters PAY. This includes any item named PAY such as 'PAY', 'PAYROLL', and 'PAY1'.
  • PAY??
    All members beginning with PAY and followed by two or more additional characters. This does not include any item named 'PAY', but would include 'PAY1A', 'PAYDAY', and 'PAYROLL'.
  • PAY??X
    All members that begin with PAY and have a sixth character of X. This would include 'PAY1AX' and 'PAY1AXYZ'.
  • *
    All members.
  • *OLD
    All members ending in OLD, such as 'PAYOLD' and 'PGMOLD.'
  • *O?D
    All members that have 'O' in the third from the last character and 'D' as the last character, such as 'PAYO1OLD' and 'BOND'.
  • W*T
    All members starting with 'W' and ending with 'T', such as, 'WAIT' and 'WHAT'.
  • [,up to 10] [ non-blanks ]
    This option inserts a record of 1 to 10 consecutive non-blank characters after writing the last record of the last member. If less than 10 characters, it is filled with blanks to the right.
  • [,/*]
    This option inserts a /* record into the output file after writing the last record of the member.
  • [,/&]
    This option inserts a /& record into the output file after writing the last record of the member.
  • [,CC=ASA]
    For ++WRITE PRINT only: this option directs the output data to the PANPRINT listing file OPENed with record format American National Standard carriage control (RECFM=FBA). The system assumes that column 1 of each output record contains an American National carriage control character. No validation is done. It is the user's responsibility to validate the member's data.
  • [,CC=MCH]
    For ++WRITE PRINT only: this option directs the output data to the PANPRINT listing file OPENed with record format machine carriage control (RECFM=FBM). The system assumes that column 1 of each output record contains a machine carriage control character. No validation is done. It is the user's responsibility to validate the member's data.
  • Column 72 Option
    Column 72 of this command is reserved for the column 72 option. This allows you to add or override options for the command execution. You must code the character code for the option in column 72 of the command you want to execute. The WRITE command options are as follows:
    • C
      causes any ++WRITE command to compress the special comment record from the full 43 characters to 25 characters for DBCS processing.
    • E
      causes any ++WRITE command to expand ++INCLUDEs, independent of the
      Panvalet
      installation option specified.
    • N
      causes any ++WRITE command to not expand ++INCLUDEs, independent of the
      Panvalet
      installation option specified.
    • S
      causes the currently executing ++WRITE PRINT command to suppress page ejects.
    • Z
      causes any ++WRITE command to not expand ++INCLUDEs, independent of the
      Panvalet
      installation option specified, and set the job Return Code to zero even if any of the INCLUDEs are not found.
    If column 72 is blank, the ++WRITE command expands ++INCLUDES according to the installation options.
    If you place a comment on a
    Panvalet
    statement and the comment extends into column 72, you can force an option into effect.