Hi,
I tried with Build, Its working fine now.
Thanks scherrer
.
But made slight changes to get exact output.
OPTION COPY
OUTREC IFTHEN=(WHEN=(27,01,CH,EQ,C'1'),
BUILD=(1,395,
396:5Z,
401:5Z,
406:5Z,
469:396,500)) .
Lipica,
I found the following information in DFSORT manual... Pasting it here...
hope this will help u...
Converting VB to FB You can convert a VB data set to an FB data set with OUTFIL’s VTOF and BUILD or OUTREC parameters. All of the PARSE, BUILD, or OUTREC features are available (input fields, strings, editing, and so on). For VTOF, you specify the input positions of the VB input record (with the RDW), and the output columns of the FB output record (without the RDW). DFSORT does not include the RDW in the FB output records.
Attention: You cannot specify OVERLAY or IFTHEN with VTOF.
The following JCL and DFSORT control statements convert a VB data set with LRECL=104 to an FB data set with LRECL=100:
//VBFB JOB A92,PROGRAMMER
//S1 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=A123456.VBIN,DISP=SHR
//FBOUT DD DSN=A123456.FBOUT, DISP=(NEW,CATLG,DELETE),
// UNIT=3390,SPACE=(CYL,(5,5))
//SYSIN DD *
OPTION COPY
OUTFIL FNAMES=FBOUT,VTOF,OUTREC=(5,100)
/*
Up to 100 bytes of data starting at position 5 (after the RDW) of the VB input record appears in the FB output record starting at position 1. The FB output records are all 100 bytes long. By default, if a VB input record has less than 100 data bytes, DFSORT pads the output data with blanks on the right to 100 bytes. However, you can change the padding character to anything you like with OUTFIL’s VLFILL parameter. For example, VLFILL=C’*’ pads with asterisks and VLFILL=X’00’ pads with binary zeros:
SORT FIELDS=(25,10,CH,A)
*Pad short fields on the right with blanks (default is VLFILL=C’ ’)
OUTFIL FNAMES=PADB,VTOF,
OUTREC=(41,40,C’Blank padding’,11,20)
* Pad short fields on the right with asterisks
OUTFIL FNAMES=PADA,VTOF,
OUTREC=(5,60,C’Asterisk padding’,61,40),VLFILL=C’*’.
* Pad short fields on the right with binary zeros
OUTFIL FNAMES=PADZ,VTOF,
OUTREC=(21,60,C’Binary zero padding’),VLFILL=X’00’
LRECL=73 is set for the PADB output data set, which has 73 byte FB records. Short input fields are padded with blanks on the right as needed.
LRECL=116 is set for the PADA output data set, which has 116 byte FB records. Short input fields are padded with asterisks on the right as needed.
LRECL=79 is set for the PADZ output data set, which has 79 byte FB records. Short input fields are padded with binary zeros on the right as needed.