Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Converting Variable block file to Fixed block file

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
bhavana yalavarthi

New User


Joined: 07 Dec 2016
Posts: 7
Location: India

PostPosted: Tue May 16, 2017 2:20 pm    Post subject: Converting Variable block file to Fixed block file
Reply with quote

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
View user's profile Send private message

mistah kurtz

Active User


Joined: 28 Jan 2012
Posts: 287
Location: Room: TREE(3). Hilbert's Hotel

PostPosted: Tue May 16, 2017 2:27 pm    Post subject:
Reply with quote

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
View user's profile Send private message
bhavana yalavarthi

New User


Joined: 07 Dec 2016
Posts: 7
Location: India

PostPosted: Tue May 16, 2017 2:29 pm    Post subject:
Reply with quote

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
View user's profile Send private message
bhavana yalavarthi

New User


Joined: 07 Dec 2016
Posts: 7
Location: India

PostPosted: Tue May 16, 2017 2:33 pm    Post subject:
Reply with quote

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
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2285
Location: @my desk

PostPosted: Tue May 16, 2017 5:25 pm    Post subject:
Reply with quote

You could give the DFSORT 'RESIZE' a try. And then make sure you get rid of the 'blank' records.
Back to top
View user's profile Send private message
Rohit Umarjikar

Senior Member


Joined: 21 Sep 2010
Posts: 1819
Location: NY,USA

PostPosted: Tue May 16, 2017 8:30 pm    Post subject:
Reply with quote

http://ibmmainframes.com/about62609.html
Back to top
View user's profile Send private message
bhavana yalavarthi

New User


Joined: 07 Dec 2016
Posts: 7
Location: India

PostPosted: Wed May 17, 2017 3:35 pm    Post subject:
Reply with quote

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
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 1922
Location: UK

PostPosted: Wed May 17, 2017 5:50 pm    Post subject:
Reply with quote

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
View user's profile Send private message
Rohit Umarjikar

Senior Member


Joined: 21 Sep 2010
Posts: 1819
Location: NY,USA

PostPosted: Wed May 17, 2017 10:22 pm    Post subject:
Reply with quote

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
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2285
Location: @my desk

PostPosted: Fri May 19, 2017 6:28 pm    Post subject:
Reply with quote

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
View user's profile Send private message
Rohit Umarjikar

Senior Member


Joined: 21 Sep 2010
Posts: 1819
Location: NY,USA

PostPosted: Fri May 19, 2017 10:23 pm    Post subject:
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Moving a PS file as body of a mail! Vignesh Sid JCL & VSAM 4 Tue Nov 21, 2017 9:23 pm
No new posts unable to set RC = 4 when empty file migusd SYNCSORT 1 Tue Nov 21, 2017 1:21 am
No new posts VBS and VB, COBOL syntax is the same ... natt.sut COBOL Programming 3 Sun Nov 12, 2017 6:36 am
No new posts Updating data from one file to other!!! Vignesh Sid SYNCSORT 1 Mon Nov 06, 2017 2:42 pm
No new posts Move from Comp3 variable to Edited Va... Revathy.nair0485 COBOL Programming 7 Fri Nov 03, 2017 3:30 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us