Page 1 of 1

How to convert FB to VB file and opposite?

Posted: Wed Apr 02, 2014 4:29 pm
by Binamra
Hi,

How to convert a FB file to a VB file and reversal? Please guide me.

Re: How to convert FB to VB file and opposite?

Posted: Wed Apr 02, 2014 5:28 pm
by Robert Sample
Converting fixed length records to variable length records (or the reverse) depends upon the application -- this is not something done for fun. Variable to fixed is easier since shorter records can be padded with spaces to match the length of the longest record.

Re: How to convert FB to VB file and opposite?

Posted: Thu Apr 03, 2014 6:30 pm
by William Collins
Look at CONVERT in your documentation, VTOF, FTOV

Re: How to convert FB to VB file and opposite?

Posted: Wed Nov 08, 2017 4:33 pm
by Anil
You can use this JCL:

Code: Select all

//STEP01  EXEC SORT                           
//SORTIN   DD DISP=SHR,                         
//            DSN=INPUT.FILE.FB,DISP=SHR
//SORTOUT  DD DSN=OUTPUT.FILE.VB,DISP=SHR
//            DISP=(,CATLG,DELETE),UNIT=SYSDA,   
//            DCB=(LRECL=??,RECFM=VB)
//*
//SYSIN    DD *                                 
  SORT FIELDS=COPY                               
  OUTFIL FNAMES=SORTOUT,VTOF                     
/*

Re: How to convert FB to VB file and opposite?

Posted: Sat Nov 18, 2017 6:19 pm
by Binamra
Thanks Anil. I have used your JCL and it works for me.

Re: How to convert FB to VB file and opposite?

Posted: Sat Nov 18, 2017 6:30 pm
by Anil
:), yes it worked for me too.