The WRITE keyword specifies to which output files the move or work buffer is to be written. The output files are referenced by ddnames. The move buffer is created and populated by a series of MOVE keywords. The work buffer is created by the COPY, PRINT, READ and UPDATE commands, and populated with the current input record.
You can specify multiple WRITE keywords per command as well as multiple output files per WRITE keyword. If the move buffer has not been written from, the WRITE keyword takes its output from there. Once the move buffer has been written, subsequent WRITEs take its output from the work buffer, if, and only if, a new move buffer has not been created and initialized by a subsequent MOVE keyword. Otherwise it again takes its output from the move buffer.
If the move or work buffer is longer than the maximum allowable record length for the output file, the buffer beyond this length will not be written, and the command terminates with the value of TRUNCRC, if supplied, otherwise it uses the &BAT_TRUNCRC installed value.
If the move or work buffer is shorter than the minimum allowable record length for the output file, the buffer is increased to this length. These bytes are initialized with the PADCHAR value, if supplied, otherwise it uses the &BAT_PADCHAR installed value.
|
Copyright © 2015 CA Technologies.
All rights reserved.
|
|