Iam trying to convert Variable block file(Record length-32750) to Fixed block file(Record length=80).I used the following Build statement,
//SYSIN DD *
OPTION COPY
OUTFIL VTOF,BUILD=(5,80,/,85,80,/,165,80,/,245,80,/,325,80,/,
405,80,/,485,80,/,565,80,/,645,80,/,725,80,/,805,80,/,885,80,/,
965,80,/,1045,80,/,1125,80,/,1205,80,/,1285,80,/,1365,80,/,
.
.
.
.
32645,80,/,32725,25) .The build statement I mentioned here is working fine,but as each time the position upto which data exists in input VB file differs, during VB to FB conversion,the positions which are not having data are getting copied as spaces into output FB file.Please suggest me a way to get rid of spaces.Iam using ICEMAN for this.
Joined: 28 Jan 2012 Posts: 316 Location: Room: TREE(3). Hilbert's Hotel
Quote:
Please suggest me a way to get rid of spaces.
What do you mean by getting rid of spaces. What do you expect? Did you mean that the next record should start immediately after the data part of previous record ends?
You need to explain more clearly and if possible post a sample input and expected output.
I mean whatever data is available in input VB file,that data should get copied to output FB file ,as spaces are getting populated into output file when the data is not there in input file.
The link you have suggested is in case of FB file. Can you please tell me whether I can use the same RESIZE option during VB to FB conversion!I want to split the 32750 byte I/p VB record to 80 byte FB records.I mean first 80 columns data in 1st record,next 80 columns data in 2nd record...If data is not present upto 32750 RECL,that empty data should not be populated as spaces in the resultant FB file.
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
Rohit Umarjikar,
The idea should be to OMIT entire-blank-records, instead of just checking the first character, or else you might end up losing data records that could possibly have a blank only at position-1, but have data at other positions.
You don't really need the second COPY (plug it into the RESIZE...USING).