HOW TO CONVERT VARIABLE BLOCK TO FIXED BLOCK ?
Answer Posted / sreedhar naidu dhekodna
VB to FB conversion
DFSORT makes it easy to do VB to FB conversion and FB to VB
conversion..
OUTFIL adds lots of tricks to your DFSORT toolkit,
including the ability to convert a variable-length data set
to a
fixed-length data set while sorting, copying or merging.
With the VLFILL=byte option of OUTFIL, you can even
do the conversion easily when "short" records are present.
The VTOF and BUILD operands of OUTFIL can be used to change
variable-length (e.g. VB) input records to
fixed-length (e.g. FB) output records. VTOF indicates that
conversion is to be performed and BUILD defines the
reformatted records. All output data sets for which VTOF is
used must have or will be given fixed-length record
formats.
Here's an example of OUTFIL conversion:
SORT FIELDS=(7,8,CH,A)
OUTFIL FNAMES=FB1,VTOF,BUILD=(5,76)
The FB output records for the FB1 data set will be 76 byte
records containing positions 5-80 of the VB input
records.
Only positions 5-80 of VB input records longer than 80
bytes will be used for the 76-byte FB output records.
But what about VB input records that are "shorter" than the
80 bytes needed to copy input positions 5-80 to the
76-byte FB output records? No problem. DFSORT automatically
uses the VLFILL=C' ' option with VTOF to
replace missing bytes in "short" OUTFIL BUILD fields with
blanks. So all of your short VB input records will be
padded with blanks to create 76-byte FB output records.
If you want to select your own padding byte, just specify
the VLFILL=byte option. For example, here's how you'd
use an asterisk as the padding byte for the previous
example:
SORT FIELDS=(7,8,CH,A)
OUTFIL FNAMES=FB1,VTOF,BUILD=(5,76),VLFILL=C'*'
| Is This Answer Correct ? | 28 Yes | 3 No |
Post New Answer View All Answers
how you can access an uncataloged dataset in a JCL?
Differentiate between the joblib and the steplib statements?
Is it possible to left uncode disp?
How can the disposition of sysout datasets be set for an entire jobstream?
What is the function of the dd mgmtclas keyword in sms datasets?
hello friends ,i have exam in Hsbc,pls any on send me placement papers and technical questions on mainframes,thank u
what happens in conversion stage in job processing?
how do you access an uncataloged dataset in a jcl?
What are the difference between jcl and jes?
Why block size is multiple of lrecl in jcl?
Is their any limit for data sets?
How can the attributes of one sms dataset be copied to another dataset?
How can values be passed from the job stream to an executable program?
how can you check if a file is empty using jcl?
How to compare two files in SYNCSORT and on the mismatch record should be deleted from second file.