Converting FB file to VB



JES, JES2, JCL utilities, IDCAMS, Compile & Run JCLs, PROCs etc...

Converting FB file to VB

Postby manjeera.bonakurthi » Thu Mar 11, 2010 11:48 am

How to convert an FB file to VB

I have 2 i/p files which are in VB
I have to compare these two files for a perticular field and if match occures , I have to write to o/p file .
I have tried using SORT join with reformat fields bt am unable to create the o/p file in VB.

File 1

trans-idA   Trans-idB
1-----4       5------8---------------------------80

1234          4567
2345          6789
3456          9123

File B
                                Trans-id
1---------------------------   17----20------------------------------4096
                                1234
                                3456


O/P FILE

File C
                               Trans-id
1----------------------------17------20----------------------------4096
                               4567
                               9123


I have used the below SORT join keys syntax

JOINKEYS FILES=F1,FIELDS=(9,4,A)
JOINKEYS FILES=F2,FIELDS=(21,4,A)
REFORMAT FIELDS=(F2:5,16,F1:9,4,F2:25,4072)
SORT FIELDS=COPY

As the i/p files are in VB I have added 4 bytes .

Bt when am using the above sysntax am unable to give the VB o/p file format ....
How can indicate the o/p file as VB in Reformat fields?
manjeera.bonakurthi
 
Posts: 13
Joined: Fri Feb 19, 2010 10:54 am
Has thanked: 0 time
Been thanked: 0 time

Re: Converting FB file to VB

Postby Frank Yaeger » Fri Mar 12, 2010 12:08 am

Which Sort product are you using (DFSORT? Syncsort?).
Frank Yaeger - DFSORT Development Team (IBM) - yaeger@us.ibm.com
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort
User avatar
Frank Yaeger
Global moderator
 
Posts: 1079
Joined: Sat Jun 09, 2007 8:44 pm
Has thanked: 0 time
Been thanked: 15 times

Re: Converting FB file to VB

Postby manjeera.bonakurthi » Fri Mar 12, 2010 9:32 am

I t is simple DFSORT
manjeera.bonakurthi
 
Posts: 13
Joined: Fri Feb 19, 2010 10:54 am
Has thanked: 0 time
Been thanked: 0 time

Re: Converting FB file to VB

Postby Frank Yaeger » Fri Mar 12, 2010 10:22 pm

How can indicate the o/p file as VB in Reformat fields?


By specifying the RDW and a starting position without a length. For example:

   REFORMAT FIELDS=(F2:1,16,F1:9,4,F2:25)
Frank Yaeger - DFSORT Development Team (IBM) - yaeger@us.ibm.com
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort
User avatar
Frank Yaeger
Global moderator
 
Posts: 1079
Joined: Sat Jun 09, 2007 8:44 pm
Has thanked: 0 time
Been thanked: 15 times

Re: Converting FB file to VB

Postby manjeera.bonakurthi » Tue Mar 23, 2010 4:14 pm

Thank u for ur solution bt if am mentioning the o/p file RECFM as VB it is giving an error
manjeera.bonakurthi
 
Posts: 13
Joined: Fri Feb 19, 2010 10:54 am
Has thanked: 0 time
Been thanked: 0 time

Re: Converting FB file to VB

Postby Frank Yaeger » Tue Mar 23, 2010 10:14 pm

Thank u for ur solution bt if am mentioning the o/p file RECFM as VB it is giving an error


I don't know if you used my REFORMAT statement, your incorrect REFORMAT statement or some other REFORMAT statement.
I don't know what error you're getting.

You need to show the job you're using and the messages you received before I can help you.

Also, tell me the RECFM and LRECL of the input file and expected output file.
Frank Yaeger - DFSORT Development Team (IBM) - yaeger@us.ibm.com
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort
User avatar
Frank Yaeger
Global moderator
 
Posts: 1079
Joined: Sat Jun 09, 2007 8:44 pm
Has thanked: 0 time
Been thanked: 15 times


Return to JCL

 


  • Related topics
    Replies
    Views
    Last post