|
View previous topic :: View next topic
|
| Author |
Message |
bhavana yalavarthi
New User
Joined: 07 Dec 2016 Posts: 7 Location: India
|
|
|
|
Hi,
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. |
|
| Back to top |
|
 |
mistah kurtz
Active User
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. |
|
| Back to top |
|
 |
bhavana yalavarthi
New User
Joined: 07 Dec 2016 Posts: 7 Location: India
|
|
|
|
| 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. |
|
| Back to top |
|
 |
bhavana yalavarthi
New User
Joined: 07 Dec 2016 Posts: 7 Location: India
|
|
|
|
Sample I/p having 32750 RECL.
| Code: |
| ISA*00* *00* *01*032893096 *16*054481205NPCT*150721*0814*U*00200*856000595*0*T*.GS*SH*1414008NPCC*054481205*150721*0814*10068078*X*0030REF*LS*S3002522.CTT*2.SE*16*0001.GE*1*10068078.IEA*1*856000595. |
Like this VB file comes in single record having 32750 RECL.I want to split this one record into 80 RECL FB file each having 80 byte records. |
|
| Back to top |
|
 |
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2482 Location: @my desk
|
|
|
|
| You could give the DFSORT 'RESIZE' a try. And then make sure you get rid of the 'blank' records. |
|
| Back to top |
|
 |
Rohit Umarjikar
Global Moderator

Joined: 21 Sep 2010 Posts: 3109 Location: NYC,USA
|
|
| Back to top |
|
 |
bhavana yalavarthi
New User
Joined: 07 Dec 2016 Posts: 7 Location: India
|
|
|
|
| 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. |
|
| Back to top |
|
 |
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2454 Location: Hampshire, UK
|
|
|
|
| If you had read the entire topic you would have found that it actually related to VB data set (NOTE: DATA SET not 'file'). |
|
| Back to top |
|
 |
Rohit Umarjikar
Global Moderator

Joined: 21 Sep 2010 Posts: 3109 Location: NYC,USA
|
|
|
|
So basically you don't want to put time and efforts to learn yourself, your choice.
Feed this card to your input data and let us know.
| Code: |
//JS040 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN DD DSN=Input file VB-32750
//T1 DD DSN=&&T1,UNIT=SYSDA,SPACE=(CYL,(5,5)),DISP=(,PASS)
//T2 DD DSN=&&T2,UNIT=SYSDA,SPACE=(CYL,(5,5)),DISP=(,PASS)
//T3 DD SYSOUT=*
//TOOLIN DD *
COPY FROM(IN) USING(CTL1)
RESIZE FROM(T1) TO(T2) TOLEN(80)
COPY FROM(T2) USING(CTL2)
//CTL1CNTL DD *
OUTFIL FNAMES=(T1),VTOF,BUILD=(5,32746)
//CTL2CNTL DD *
OUTFIL FNAMES=(T3),INCLUDE=(1,1,CH,NE,C' ') |
May be someone can suggest you a better way as there always is. |
|
| Back to top |
|
 |
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2482 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). |
|
| Back to top |
|
 |
Rohit Umarjikar
Global Moderator

Joined: 21 Sep 2010 Posts: 3109 Location: NYC,USA
|
|
|
|
Right Arun Raj, it was test data I tested with and did not change the include with TS stuff.
| Code: |
//JS040 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN DD DSN=RXxxxxx.TEST.VB,DISP=SHR
//T1 DD DSN=&&T1,UNIT=SYSDA,SPACE=(CYL,(5,5)),DISP=(,PASS)
//T2 DD SYSOUT=*
//TOOLIN DD *
COPY FROM(IN) USING(CTL1)
RESIZE FROM(T1) TO(T2) TOLEN(80) USING(CTL2)
//CTL1CNTL DD *
OUTFIL FNAMES=(T1),VTOF,BUILD=(5,32746)
//CTL2CNTL DD *
OUTFIL FNAMES=(T2),INCLUDE=(1,80,CH,NE,C' ') |
Edited to fix typo. |
|
| Back to top |
|
 |
|
|
 |
All times are GMT + 6 Hours |
|