HOW TO CONVERT VARIABLE BLOCK TO FIXED BLOCK ?



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

Post New Answer

More JCL Interview Questions

In Job, there are 10 steps. If I want to execute the first 6 steps and don't want to execute from 7th to 10th step. What is the solution for this ?

7 Answers  


which statement is used to end the in-stream procedure in a jcl?

1 Answers   IBM,


Can we create VSAM file by using IEBGENER?

4 Answers   Principal Finance,


Wrete a JCL to compare two files and mached records move to onc file & un mached rows wants to another file?

13 Answers   CGI, DSRC, IBM,


what does mvs stand for?

1 Answers   IBM,






ihave ten flatfile in that iwant to concatinate all the files except file 5,6 into output file by uing jcl? how to do this? give me detail yntax for tis?

4 Answers   IBM,


Can a PROC CALL another PROC ? (in both Instream and Cataloged cases) ?

3 Answers   IBM,


how to modify the copy book?explain with examples

2 Answers   TCS,


Can we Execute a job without specifying Job Name in the Job Card?

2 Answers  


When space is allocated for an output dataset, what units can be used?

0 Answers  


what is the difference between the JCLLIB and JOBLIB ,and where do we use it ?

3 Answers   Convergys,


What do you do if you do not want to keep all the space allocated to a dataset?

2 Answers  


Categories