── WRITE ─┬──────────────────────────────────────────────────────┬─────┤ │ ┌◄─────────────────────────────────────────────────┐ │ └─┴─┬─/1\─┬─<file title>────────┬──────────────────┬─┴─┘ │ └─ <directory title> ─┘ │ ├─/1\─<sequence range list>────────────────────┤ ├─/1\─ @ ─┬─<start column>─┬───────────────────┤ │ │ └─ - ──<end column>─┤ │ └─ ALL ──────────────────────────────┤ ├─/1\─ TO ─── PRINTER ─────────────────────────┤ │ │ └─ : ──<write options>─────────────────────────┘
<write options>
┌◄─────────────────────────── , ──────────────────────────┐ ──┴─┬─/1\─ AFTER ─┬─────┬─ " ──<after specification>── " ─┬─┴──────────┤ │ └─ = ─┘ │ ├─ BANNER ────────────────────────────────────────────┤ ├─ CHECKPOINT ────────────────────────────────────────┤ ├─/1\─ COPIES ─┬─────┬─<integer>──────────────────────┤ │ └─ = ─┘ │ ├─/1\─ DESTINATION ─┬─────┬─<destination>─────────────┤ │ └─ = ─┘ │ ├─ DOUBLE ────────────────────────────────────────────┤ ├─/1\─ FILENAME ─┬─────┬─<file name>──────────────────┤ │ └─ = ─┘ │ ├─/1\─ FORMID ─┬─────┬─<string>───────────────────────┤ │ └─ = ─┘ │ ├─ HEXPLICIT ─────────────────────────────────────────┤ ├─ NOHEADING ─────────────────────────────────────────┤ ├─/1\─ NOTE ─┬─────┬─<string>─────────────────────────┤ │ └─ = ─┘ │ ├─ NUMBERED ──────────────────────────────────────────┤ ├─/1\─ PRINTCHARGE ─┬─────┬─<printcharge>─────────────┤ │ └─ = ─┘ │ ├─/1\─ PRINTCOPIES ─┬─────┬─<integer>─────────────────┤ │ └─ = ─┘ │ ├─/1\─ PRINTDISPOSITION ─┬─────┬─<printdisposition>───┤ │ └─ = ─┘ │ ├─/1\─ PRINTERKIND ─┬─────┬─<printerkind>─────────────┤ │ └─ = ─┘ │ ├─ SAVEPRINTFILE ─────────────────────────────────────┤ ├─/1\─ SECURITYTYPE ─┬─────┬─<securitytype>───────────┤ │ └─ = ─┘ │ ├─/1\─ SECURITYUSE ─┬─────┬─<securityuse>─────────────┤ │ └─ = ─┘ │ ├─ SQUASHED ──────────────────────────────────────────┤ ├─/1\─ TITLE ─┬─────┬─<file title>────────────────────┤ │ └─ = ─┘ │ ├─/1\─ TRAINID ─┬─────┬─<trainid>─────────────────────┤ │ └─ = ─┘ │ ├─/1\─ TRANSFORM ─┬─────┬─<transform>─────────────────┤ │ └─ = ─┘ │ ├─ TRUNCATED ─────────────────────────────────────────┤ ├─ UNSEQUENCED ───────────────────────────────────────┤ ├─ UPCASED ───────────────────────────────────────────┤ └─ USERBACKUPNAME ────────────────────────────────────┘
<after specification>
Specifies time in hours and minutes using the form HH:MM. A date can be specified by using the form ON MM/DD/YY. The <after specification> must be within quotation marks (" "). For example,"20:00" represents 8:00 p.m., and "09:30 ON 04/30/86" represents 9:30 a.m. on April 30, 1986. For additional information about the <after specification> string value, refer to the <starttime spec> discussion in the WFL Programming Reference Manual. Also refer to the Print System Guide.
<destination>
Specifies a <device name> in the form <device type><device number>, where the device type is IP or LP for an image printer or a line printer, respectively, and where the device number is the unit number. The destination must appear within quotation marks (" ") and must adhere to the following syntax:
┌◄────────────── , ──────────────┐ ── " ─┴─<device name>─┬──────────────┬─┴─ " ───────────────────────────┤ └─ : <copies> ─┘
For example: LP14:2.
To specify a remote device as a destination, use the form STATION <station name>, where <station name> is the name of the remote station. Example: STATION TDS1203LA.
This option can also be used to specify copies for each destination by placing a colon (:) after the device number and ending the statement with an integer representing the number of copies. Each destination specification must be separated from the other by a comma (,). For example, to send four copies to line printer 14 and three copies to image printer 2, enter the following:
DESTINATION = "LP14:4, IP2:3"
<printcharge>
Specifies any valid charge code. The <printcharge> can consist of up to 17 alphanumeric characters and must appear within quotation marks (" ").
── " ──<printcharge>── " ──────────────────────────────────────────────┤
<printdisposition>
Any one of the mnemonics defined for the PRINTDISPOSITION file attribute in the Print System Guide. Examples are DIRECT, EOJ, DONTPRINT, DIRECTDLP, DIRECTPS, FILEOPEN, and NOW.
<printerkind>
Any one of the mnemonics defined for the PRINTERKIND file attribute in the File Attributes Reference Manual. Examples are LINEPRINTER, IMAGEPRINTER, and LP.
<securitytype>
Any one of the mnemonics defined for the SECURITYTYPE file attribute in the File Attributes Reference Manual. Examples are PRIVATE, PUBLIC, and GUARDED.
If a security type of CONTROLLED or GUARDED is specified, a guard file name must be entered after the SECURITYTYPE attribute. For additional information about guard files, refer to the SECURITYGUARD attribute discussion in the File Attributes Reference Manual.
If the security type is PUBLIC or PRIVATE, the SECURITYUSE attribute can optionally be entered after the SECURITYTYPE attribute. Note that a SECURITYUSE attribute cannot be specified if the security type is GUARDED or CONTROLLED.
Specify the <securitytype> option according to the following syntax:
── <securitytype> ─┬────────────────────────┬──────────────────────────┤ ├─/1\─<guard file title>─┤ └─/1\─<securityuse>──────┘
<securityuse>
Any one of the mnemonics defined for the SECURITYUSE file attribute in the File Attributes Reference Manual. Examples are IN, OUT, and IO.
<trainid>
Any one of the mnemonics defined for the TRAINID file attribute in the File Attributes Reference Manual. Examples are EBCDIC96 and ASCII72.
<transform>
Specify <transform> according to the following syntax:
── " ──<transform name>─┬──────────────────────────┬─ " ───────────────┤ └─ IN <transform library> ─┘
If a <transform library> is not specified, the <transform name> must be in the standard transform library.
Explanation
The WRITE command allows a file (or portions thereof) to be listed on the line printer. As with any output generated by a user, backup files created by using the WRITE command are not actually printed until the user either logs off or uses the SPLIT command.
The <file title> defines the file to be printed. If no <file title> is specified, the work file is assumed. In this case, an UPDATE is done before the WRITE is executed. The <file title> construct can be any file to which the user is allowed access.
If a <directory title> is specified, each file under the given directory is written. However, the WRITE command ignores a file whose file name has more than 11 nodes (excluding the usercode).
The <sequence range list> construct defines the portions of the file to be written. When multiple sequence ranges are specified, a blank record separates each range from its successor. If no <sequence range list> is specified, the entire file is output.
The TO option defines the destination of the output. The PRINTER option directs the output to the site printer. The default, if this option is omitted, is PRINTER.
The @ option specifies the portion of each line to be written. If a <start column> and optional <end column> are specified, then only those columns of each line are written. If ALL is specified, all columns are written adjacent in an unformatted form. If the @ options are omitted, the lines are written in the format described in the following text.
Output files are unlabeled if printed. If a TITLE or FILENAME option is provided, print files are assigned the specified title or file name. All non-EBCDIC files are translated to EBCDIC for printing purposes.
Each line of printer output is formatted as follows:
-
The record sequence number is printed in columns 1 through 8, right justified, with leading zeros replaced by blanks (pseudo-sequence numbers are supplied for type DATA or CDATA files). If the sequence field of the record contains nonnumeric, nonblank characters or is less than or equal to the previous record sequence number, *SEQERR* is printed instead of the sequence field. In this case, the contents of the sequence field can be found in columns 92 through 99.
-
Columns 9 through 12 are blank.
-
Type DATA and CDATA files use the remainder of the print line (columns 13 through 132) for the text of the record (unless NUMBERED is specified). If the text field of the file is longer than the remainder of the print line, then squeezing or truncation is performed if the output options so indicate (these options are described in the following paragraphs). If necessary, the text is split and continued on successive lines of output. To use the entire 132-column print line for text, the single output option UNSEQUENCED must be specified.
-
For file types other than DATA or CDATA, print columns 13 through 87 are used for the text portion of the record. The text field of type COBOL files (columns 7 through 72) is printed in columns 13 through 78, and the identification field (columns 73 through 78) is printed in columns 81 through 88. For other types of files, the text field is printed in columns 13 through 84 (up to 72 characters per line of printer output). If the text field of the file is longer than 72 characters, then squeezing or truncation can be specified. If necessary, the text is split and continued on successive lines of output.
-
Columns 89 through 92 are blank.
-
The sequence field of the record is printed in columns 93 through 100. If the file is of type DATA or CDATA, these columns are blank.
-
Columns 101 through 102 are blank.
-
Columns 103 through 112 are left blank for most types of files; however, for type ALGOL, DCALGOL, and ESPOL files that have patch information in columns 81 through 90, the information is printed in these columns.
-
Columns 113 through 114 are blank.
-
If the NUMBERED option is specified, the relative record number is printed in columns 115 through 120, prefixed by a number sign (#).
-
The remainder of the print line is blank.
The AFTER option defers printing of the backup file until a later time. When specified, the string value of the AFTER option must conform to the WFL <starttime spec>. A null string indicates that the backup file is to be printed as soon as possible.
If the BANNER option is specified, a banner page is printed preceding the text of the backup file. Otherwise, no banner page is printed.
If the NOTE option is specified and the BANNER option has not been specified, the printing of a note is suppressed.
If the BANNER option is specified, the banner page is composed of either the NOTE text if the NOTE text is nonnull, or the file title if the NOTE text is null. The text of the banner page is printed in block characters.
The CHECKPOINT option causes the system to take checkpoints to allow printing to restart in mid-file if the system halt/loads. The interval between checkpoints is determined by the system administrator. If CHECKPOINT is not specified, the system restarts printing from the beginning of the file after a halt/load. If PRINTDISPOSITION = DIRECT, CHECKPOINT is not applicable and is therefore ignored.
The COPIES option specifies the number of times a file is written by CANDE. For example, if a <directory title> is specified and COPIES is set equal to 2, each file in the directory will be written two times. This option is different from the PRINTCOPIES option, which applies to backup files; refer to the explanation of PRINTCOPIES below. The PRINTCOPIES option can be used in conjunction with the COPIES option. If the COPIES option and PRINTCOPIES option are both set to a value greater than 1, the number of copies printed is the value of COPIES multiplied by the value of PRINTCOPIES (COPIES * PRINTCOPIES).
The DESTINATION option specifies a list of destinations to which the backup file is to be routed. For each device indicated, the system prints the specified number of copies on the device. If the <copies> part of the option is not specified, the number of copies is determined by the PRINTCOPIES option.
If the CANDE command DESTNAME previously specified a station for the session, the destination specified by the DESTINATION option of the WRITE command overrides the DESTNAME value. A warning is displayed when the WRITE command option DESTINATION overrides the DESTNAME value.
The DOUBLE option causes listings to be double-spaced.
The FILENAME option is used in conjunction with the USERBACKUPNAME option to specify a title for the backup file. If the USERBACKUPNAME option is specified, the value assigned to the FILENAME option is used as the title of the backup file. Otherwise, a standard system-generated title is used. If FILENAME is specified and USERBACKUPNAME is not set, the last node of the file title reflects the specified FILENAME. Note that since the TITLE option also affects the naming of the backup file, either FILENAME or TITLE can be specified. However, both should not be specified. If both are specified, the last one specified takes precedence, and the previously specified one is ignored.
The FORMID option, when used with the WRITE command, specifies forms for the printer by using a string. The string can contain up to 15 characters, and it is displayed on the operator display terminal (ODT). For additional information, refer to the FORMID attribute discussion in the File Attributes Reference Manual.
Header and trailer pages are not printed when FORMID is specified unless the following PRINTDEFAULTS print modifier values for the task are explicitly specified at the time the print request is created for the WRITE operation:
HEADER=UNCONDITIONAL TRAILER=UNCONDITIONAL
Refer to the CANDE command PDEF for information about setting print modifier values with the PRINTDEFAULTS command.
The HEXPLICIT option causes a record that contains nongraphic characters to be printed on two lines. The two characters representing the hexadecimal notation of the nongraphic character appear vertically. The first HEX character appears on the first line. The second HEX character appears on the second line, immediately below the first. Uppercase letters and other graphic characters appear on the first line with a blank on the second line. Lowercase letters are printed in the uppercase equivalent with an underscore (_). A blank line separates each record. The DOUBLE option is ignored if the HEXPLICIT option is used.
The NOHEADING option suppresses the heading and the two blank lines following the heading. The file is printed starting on the first line of the first page. The heading consists of a blank line followed by a file title, a creation date, and a current time and date.
The NOTE option specifies the message text that is to be printed on the banner page preceding the backup file.
The NUMBERED option causes the number of each record to be printed in columns 115 through 120.
The PRINTCHARGE option specifies a chargecode, which can consist of up to 17 alphanumeric characters. The print system uses the chargecode to record information for charging printing costs.
The PRINTCOPIES option specifies the number of times a backup file is printed by the print system. This option is different from the COPIES option, which specifies the number of times a file is written by CANDE; refer to the explanation of COPIES above for additional information. The PRINTCOPIES option can be used in conjunction with the COPIES option. If the COPIES option and PRINTCOPIES option are both set to a value greater than 1, the number of copies printed is the value of COPIES multiplied by the value of PRINTCOPIES (COPIES * PRINTCOPIES).
The PRINTDISPOSITION option specifies whether a backup file is to be queued for printing, and if so, when the system should queue the backup file for printing.
The PRINTERKIND option specifies the type of output device to which the output is to be directed.
If you specify the SAVEPRINTFILE option, the backup file is saved upon completion of printing. If you do not specify the SAVEPRINTFILE option, the file is removed.
The SECURITYTYPE option specifies the security type of the backup file. As is the case with disk files, the default value of the SECURITYTYPE attribute is PRIVATE for usercoded files and PUBLIC for nonusercoded files.
The SECURITYUSE option specifies the manner in which a disk file that is protected by security can be accessed by nonprivileged users using nonprivileged programs. SECURITYUSE is ignored if a guard file is invoked.
The SQUASHED option causes any group of multiple blanks to be reduced to a single blank.
The TITLE option is used in conjunction with the USERBACKUPNAME option to specify a title for the backup file. If the USERBACKUPNAME option is specified, the value assigned to the TITLE option is used as the title of the backup file. Otherwise, a standard system-generated title is used. If TITLE is specified and USERBACKUPNAME is not set, the last node of the file title reflects the file name specified in TITLE. Note that since the FILENAME option also affects the naming of the backup file, either FILENAME or TITLE can be specified. However, both should not be specified. If both are specified, the last one specified takes precedence, and the one specified previously is ignored.
The TRAINID option specifies the train to be used on the line printer when a file is printed.
The TRANSFORM option specifies a transformation procedure to be executed between the retrieval of records from the source file and the printing of those records on the destination device or devices. The <transform name> is the name of the transform function. The IN <transform library> specification is optional and specifies the library name of which the function is an entry point. The library name must have the correct usercode or family name. If a library name is not specified, the system assumes the function to be an entry point of the standard transform library, PRINTSUPPORT.
The TRUNCATED option causes the text portion of a record that cannot fit in the available space on a line to be truncated to one line and terminated by a slash (/).
The UNSEQUENCED option causes the sequence number listed at the beginning of each line to be suppressed and the record text to begin printing in column 1.
The UPCASED option causes all lowercase letters to be translated to the uppercase equivalent.
The USERBACKUPNAME option controls the default naming conventions for the backup files. When the USERBACKUPNAME option is specified, the backup file is titled using the names specified by either the FILENAME or the TITLE option, applying family substitution as is done for other files. If the USERBACKUPNAME option is not specified, standard system-generated names are used. Note that since both the FILENAME and TITLE options can affect the naming of the backup file, either FILENAME or TITLE can be specified. However, both should not be specified. If both are specified, the last one specified takes precedence, and the one specified previously is ignored.
The following file attributes are further discussed in the File Attributes Reference Manual:
FILENAME FORMID TITLE TRAINID SECURITYTYPE SECURITYUSE
The following print file attributes/modifiers are further discussed in the Print System Guide:
AFTER PRINTCOPIES BANNER PRINTDISPOSITION CHECKPOINT PRINTERKIND DESTINATION SAVEPRINTFILE NOTE TRANSFORM PRINTCHARGE USERBACKUPNAME
Examples
write #RUNNING 8154 # WRI TO PR:DOUBLE, UP FILEID @1-10 100,150-200,END #RUNNING 8156 #