Previous topic |
Next topic |
Contents |
Contact z/OS |
Library |
PDF
Converting FB to VB z/OS DFSORT: Getting Started SC23-6880-00 |
|
You can convert an FB data set to a VB data set with OUTFIL's FTOV parameter. Each VB output record has a 4-byte RDW followed by the corresponding data from the FB input record, and the length in the RDW is the length of the FB record plus 4. The following JCL and DFSORT control statements convert the bookstore
data set records from FB to VB.
Because the LRECL of SORT.SAMPIN is 173 bytes, each VB record in SORT.VSAMP is 177 bytes (the FB record length of 173 plus 4 for the RDW) and SORT.VSAMP is given an LRECL of 177. You can also use PARSE, BUILD, OUTREC, OVERLAY, FINDREP, or IFTHEN parameters with FTOV on the OUTFIL statement. All of the reformatting features are available (input fields, strings, editing, and so on). With FTOV, you specify the input positions, and output columns as you would for an FB record (without the RDW). DFSORT adds the RDW after the FB record is reformatted. Here is an example of using FTOV with BUILD:
The VB output records look like this:
Each VB output record is 43 bytes long and the output data set is given an LRECL of 43. For the previous examples, the VB output records are all the same
length. You can use OUTFIL'S VLTRIM parameter to create VB output
records of different lengths from FB input records. Suppose you have
an FB input data set with LRECL=20 and 20-byte records like this:
These statements change each 20-byte FB input record to a 24-byte
VB output record and set LRECL=24 for the VB output data set:
The VB output records look like this:
To remove the trailing blanks from the end of each VB output record,
use VLTRIM=C' ' (or VLTRIM=X'40') like this:
LRECL=24 is still set for the resulting VB output data set, indicating
that the maximum record length is 24, but the VB output records are
not padded on the right with blanks; they now have different record
lengths like this.
You can use any character or hexadecimal byte value for VLTRIM. For example, VLTRIM=C'*' removes trailing asterisks, and VLTRIM=X'00' removes trailing binary zeros. |
Copyright IBM Corporation 1990, 2014
|