HOW TO CONVERT VARIABLE BLOCK TO FIXED BLOCK ?
Answer / 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 |
Can comments be specified at the very beginning of a jobcard? Will the JCL execute?
What do you feel makes a good program?
Can you delete the GDG base without deleting GDG generations ?
Can we give TIME = (1440, 59) also ? or is TIME = (1439, 59) is the last one ?
A statement about PROCs is " In PROCs, Symbolic Parameters can be assigned on PROC and EXEC", BUT On which EXEC, (i) On the JCL's EXEC which is calling to PROC1. (Inside JCL, EXEC PROC1) (ii) or On the PROC's EXEC where it calls the PGM1. (Inside PROC, EXEC PGM=PGM1)
Can we have a JOBSTEP without any EXEC ?
Can we DELETE all the Generations of a GDG at once, WITHOUT deleting the GDG itself ?
What is the exact difference between PRTY and DPRTY
What is COND=EVEN ?
What are the default system and catalog libraries in JCL?
Hi, Please clear me when COND=ONLY and COND=EVEN. Explain me with example.
How can the attributes of one sms dataset be copied to another dataset?