Record Terminators (/V)
Use the Record Terminators execution command (/V) in source and target map settings to enable special handling of data with embedded record terminators in files with variable-length records, specifically with a record format of variable (V), variable block (VB), or variable block spanned (VBS).
[/V[terminator_list...]]
- Option
- Description
- terminator_list
- A comma-delimited string of bytes that can be expressed
in hex format (for example: /VX5B,X6C,X7C)
or character format (for example: /V$,%,@).
The default record terminator, if none, is indicated on the /V command as a single byte, hex15.
This string of terminator bytes should match the record terminator defined in the type tree that represents this data.
This command functions differently for data sources and targets. If specified for input data, the indicated (or default) record terminator string is appended to each record after it has been read. If specified for an output data set, the record terminator string is interpreted as marking the end of a record in the output.
For inputs, this command causes a string of one or more bytes to be appended to each record to ensure that the data maps properly when using the Launcher for z/OS®. For example, suppose you are mapping an input file on the PC that consists of lines of text terminated by carriage-return/line-feed (0D 0A) pairs. Even though you cannot see them in a text editor, these terminators are embedded in the data, they are defined in the type tree that is created to represent this data, and the map expects them to be there.
Now you need to run this same map using the Launcher for z/OS. However, when you upload the input file to a z/OS environment, the record terminators embedded in the data are removed during the transfer. Consequently, when the file is read in for mapping using the Launcher for z/OS, the record terminators must be reinstated or the data will not map correctly. The solution is to use the command [/VX0D,X0A] to append a hex 0D 0A string to the end of each record.
For outputs, this command specifies that the indicated (or default) byte or bytes are used to mark the ends of each record in the output. When this command is used, the map must embed record terminators in the output data. These terminators indicate the places where record boundaries are to occur in the final output. The record terminators are removed when the records are created in the output target or targets and do not appear in the resulting output.