IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How to convert VB to FB file


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
varalakshmi.G

New User


Joined: 04 Jun 2007
Posts: 55
Location: Hyderabad

PostPosted: Fri Mar 07, 2008 3:22 am
Reply with quote

Could you please tell me how to convert VB to FB file.
I have one FB input file of length 256. I need to convert this to VB file.

Is there any way to convert VB to VB file. I want to take only specific fields from VB input file.

Lakshmi.G
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Fri Mar 07, 2008 3:28 am
Reply with quote

Quote:
Could you please tell me how to convert VB to FB file.


You can use the technique discussed in the "VB to FB conversion" Smart DFSORT Trick at:

www.ibm.com/servers/storage/support/software/sort/mvs/tricks/

Quote:
Is there any way to convert VB t VB file.I want to take only specific fields from VB input file.


You can do it with a DFSORT INREC, OUTREC or OUTFIL statement. Describe what you want to do in more detail and I'll tell you how. What is the LRECL of your input file? Which fields do you want in the output file?

If you're not familiar with DFSORT and DFSORT's ICETOOL, I'd suggest reading through "z/OS DFSORT: Getting Started". It's an excellent tutorial, with lots of examples, that will show you how to use DFSORT, DFSORT's ICETOOL and DFSORT Symbols. You can access it online, along with all of the other DFSORT books, from:

Use [URL] BBCode for External Links
Back to top
View user's profile Send private message
varalakshmi.G

New User


Joined: 04 Jun 2007
Posts: 55
Location: Hyderabad

PostPosted: Fri Mar 07, 2008 2:02 pm
Reply with quote

While I am converting VB to FB it is giving LRECL/BLKSIZE invalid.

I am using SYNCSORT and my Control card is like

OPTION COPY,VLSHRT
OUTFIL FNAMES=FBFILE,VTOF,OUTREC=(5,252).

Could somebody tell me the problem.

Thanks in advance
Lakshmi
Back to top
View user's profile Send private message
Alissa Margulies

SYNCSORT Support


Joined: 25 Jul 2007
Posts: 496
Location: USA

PostPosted: Fri Mar 07, 2008 9:39 pm
Reply with quote

Quote:
I have one FB input file of length 256. I need to convert this to VB file.

Quote:
While I am converting VB to FB it is giving LRECL/BLKSIZE invalid.
I am using SYNCSORT and my Control card is like
Code:
OPTION COPY,VLSHRT
OUTFIL FNAMES=FBFILE,VTOF,OUTREC=(5,252).

Are you sure you have the correct RECFM of the input data. These statements seem to conflict. Please verify you are converting VB data to FB and not FB data to VB.
Back to top
View user's profile Send private message
varalakshmi.G

New User


Joined: 04 Jun 2007
Posts: 55
Location: Hyderabad

PostPosted: Fri Mar 07, 2008 10:11 pm
Reply with quote

Hi

I am converting VB to FB file.My input file is VB and length 256.


Could you tell me how to solve this.

Thanks,
Lakshmi
Back to top
View user's profile Send private message
Alissa Margulies

SYNCSORT Support


Joined: 25 Jul 2007
Posts: 496
Location: USA

PostPosted: Fri Mar 07, 2008 10:25 pm
Reply with quote

At first glance, your control cards appear fine.

Are you getting WER197A, WER200A, or some other error message?

Please post your JCL (not just the control cards) along with the complete text of the error message produced.

Also, which release of SyncSort are you running?
Back to top
View user's profile Send private message
mkk157

Active User


Joined: 17 May 2006
Posts: 310

PostPosted: Mon Mar 10, 2008 10:23 am
Reply with quote

Change the OUTREC field from

OUTREC=(5,252).

to

OUTREC=(5,256) As the LRECL of your file is 256.


Now the sort card is like this:

OPTION COPY,VLSHRT
OUTFIL FNAMES=FBFILE,VTOF,OUTREC=(5,256).
Back to top
View user's profile Send private message
Alissa Margulies

SYNCSORT Support


Joined: 25 Jul 2007
Posts: 496
Location: USA

PostPosted: Mon Mar 10, 2008 8:32 pm
Reply with quote

mkk157 wrote:
Change the OUTREC field from

OUTREC=(5,252).

to

OUTREC=(5,256) As the LRECL of your file is 256.

This will cause the following error:
Code:

WER230A  OUTREC   FIELD OUTSIDE RANGE

The original LRECL of 256 includes the 4 byte RDW of the VB file. When converting to FB, and stripping off the 1st 4 bytes, you need to subtract that from the LRECL. Hence, the output LRECL is 252. If the OP wanted to include the RDW in the output, then it would be OUTREC=(1,256) not (5,252).
Back to top
View user's profile Send private message
varalakshmi.G

New User


Joined: 04 Jun 2007
Posts: 55
Location: Hyderabad

PostPosted: Mon Mar 10, 2008 8:54 pm
Reply with quote

Hi All,

Now it is working fine by giving control card as
OPTION COPY,VLSHRT
OUTFIL FNAMES=FBFILE,VTOF,OUTREC=(5,252)
END

The problem is the output file is already existed one.Just I gave DISP as (OLD,CATLG,CATLG),but the attributes of this file is different that's y it is giving problem.

Thank u all for your help.

Thanks,
Lakshmi
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 1
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
Search our Forums:

Back to Top