Page 1 of 1

not able to convert vb to fb

PostPosted: Thu Jul 16, 2009 3:18 pm
by ranga_subham
Hi, I am trying to convert a VB file to FB using CONVERT feature of sort but unsuccessful. My file LRECL is 133 and RECFM is VB and below is the sort job I am using....

//STEP0002 EXEC PGM=SORT                         
//SORTOUT  DD  DSN=THERESA.TEXT1,         
//             DISP=(NEW,CATLG,DELETE),           
//             UNIT=SYSDA,                       
//             SPACE=(TRK,(1,1),RLSE),           
//             DCB=(RECFM=FB,LRECL=133,BLKSIZE=0)
//SYSOUT   DD  SYSOUT=*                           
//SORTIN   DD DSN=THERESA.TEXT,DISP=SHR   
//SYSIN  DD *                                     
  OPTION COPY                                     
  OUTFIL OUTREC=(5,133),CONVERT
/*                                               


SYSOUT shows this error:

WER108I  SORTIN   : RECFM=VB   ; LRECL=   133; BLKSIZE=  6233
WER230A  SORTOUT  OUTREC FIELD OUTSIDE RANGE                 


Please let me know where I am going wrong.

Thanks.

Re: not able to convert vb to fb

PostPosted: Thu Jul 16, 2009 8:36 pm
by Alissa Margulies
You need to subtract 4 from the OUTREC length because your are not including the RDW. If you want the LRECL to remain 133, then code something like this:
OUTFIL OUTREC=(5,129,133:X),CONVERT

Re: not able to convert vb to fb

PostPosted: Fri Jul 17, 2009 8:03 pm
by ranga_subham
Thank you. :D