Record Separators (/V)
Use the Record Separators execution command (/V) to enable special handling of datasets with variable length records (datasets defined with RECFM=V).
/V[separator_list...] ddname
Option |
Description |
---|---|
separator_list | Specify a comma-delimited string of separator bytes that can be expressed in hex format (for example: /VX5B,X6C,X7C) or character format (for example: /V$,%,@). The default record separator if none is indicated on the /V command as a single byte, hex15. |
ddname | The DDNAME of the input or output dataset |
This command functions differently for data sources and targets. If specified for an input dataset, the indicated (or default) record separator string is appended to each variable record after it has been read. If specified for an output dataset, the record separator string is interpreted as marking the end of a variable length record in the output.
For inputs, this command causes a string of one or more record separator bytes to be appended to each variable record to ensure that the data maps properly on z/OS Batch. For example, suppose you are mapping an input file on Windows that consists of lines of text delimited by carriage-return/line-feed (0D 0A) pairs. Even though you cannot see them in a text editor, these delimiters are embedded in the data and the map expects them to be there.
Now you need to run this same map on z/OS Batch. However, when you upload the input file to a z/OS dataset of variable length records using the CRLF option, the record separators embedded in the data are removed during the transfer. Consequently, when the file is read in for mapping under z/OS Batch, the record separators 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 record separator string to the end of each variable record.
If a dataset of variable length records already contains the separators defined to the map embedded in the data, this option should not be used.For outputs, this command specifies that the indicated (or default) record separator byte or bytes are used to mark the ends of variable length records in the output. When this command is used, the map must embed record separator strings in the output data. These separator strings indicate the places where variable length record boundaries are to occur in the final output. The record separator strings are removed when the variable records are created. They do not appear in the output in its final form.
Output variable records wrap at the maximum record length defined for the dataset. If an output dataset is defined in the JCL with DCB=(RECFM=VB,LRECL=80) and either by accident or design a map produces an output record which is actually 120 bytes in length, two variable records are produced in the output dataset-one that is 80 bytes in length and one that is 40 bytes in length.