OUTFIL: Converting VB to FB
OUTFIL: Converting VB to FB
Summary
- VB data set can be converted to an FB data set with OUTFIL's VTOF and BUILDor OUTREC parameters.
- All of the PARSE, BUILD, or OUTREC features are available with OUTFIL's VTOF.
- DFSORT does not include the RDW in theFB output records.
Syntax -
OUTFIL FNAMES=DDNAMEn, VTOF
DDNAMEn | DDNAME is eight character’s name that representing the actual dataset in JCL. |
VTOF | Specifies convert from VB to FB |
Note! OVERLAY, FINDREP, or IFTHEN cannot specify with VTOF.
Example -
Scenario - Create FB file from VB file.
Input File - MTHUSER.SORT.INPUT02 - VB file of 100 length
----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8
********************************* Top of Data **********************************
00001 student1 dept1 560
00003 student3 dept2 520
00004 student4 dept1 540
00005 student5 dept2 500
00002 student2 dept3 510
00006 student6 dept3 550
00008 student8 dept1 530
00007 student7 dept3 510
00009 student9 dept2 520
00010 student10 dept2 505
******************************** Bottom of Data ********************************
JCL -
----+----1----+----2----+----3----+----4----+----5----+----6----+----7--
***************************** Top of Data ******************************
//Job-card
//**********************************************************************
//STEP01 EXEC PGM=SORT
//SORTIN DD DSN=MTHUSER.SORT.INPUT02,DISP=SHR
//FBOUTP DD DSN=MTHUSER.SORT.OUTPT02,
// SPACE=(CYL,(1,1),RLSE),
// DISP=(NEW,CATLG,DELETE)
//SYSOUT DD SYSOUT=*
//SYSIN DD *
OPTION COPY
OUTFIL FNAMES=FBOUTP,VTOF,OUTREC=(5,80)
/*
**************************** Bottom of Data ****************************
Output File - MTHUSER.SORT.OUTPT02 - FB file of length 80
----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8
********************************* Top of Data **********************************
00001 student1 dept1 560
00003 student3 dept2 520
00004 student4 dept1 540
00005 student5 dept2 500
00002 student2 dept3 510
00006 student6 dept3 550
00008 student8 dept1 530
00007 student7 dept3 510
00009 student9 dept2 520
00010 student10 dept2 505
******************************** Bottom of Data ********************************
Explaining Example -
- OUTFIL FNAMES=FBOUTP,.. - Specifies the output is Fixed block file.
- OUTFIL FNAMES=..,VTOF,.. - Specifies the conversion is Variable to Fixed.
- OUTFIL FNAMES=..,OUTREC=(5,80) - Copies from 5th to 80th byte of the input file to output file.