Merging two VB files to VB file



IBM's flagship sort product DFSORT for sorting, merging, copying, data manipulation and reporting. Includes ICETOOL and ICEGENER

Re: Merging two VB files to VB file

Postby porwalrox » Fri Nov 02, 2012 12:54 pm

Thanks to all of you!
My problem has been solved. But i am not much very sure, How i stuck with the previous code. Why If i write REFORMAT fields like previous post, it chnges to TYPE=V file to TYPE=F.

I changed my code like:
REFORMAT FIELDS=(F1:1,76,F2:1)
JOIN UNPAIRED,F1,F2           
OPTION COPY                   
OUTFIL FNAMES=OUT,BUILD=(1,4,5)


it is working fine. No problem. But i don't understand. if i code
REFORMAT FIELDS=(F1:1,76,F2:1)         
JOIN UNPAIRED,F1,F2                   
OPTION COPY                           
OUTFIL FNAMES=OUT,BUILD=(1,4,5,76,5,76)

OR
How does a TYPE=V file change to a TYPE=F? Some questions remain unanswered in mind.
porwalrox
 
Posts: 38
Joined: Fri Oct 05, 2012 4:05 pm
Has thanked: 2 times
Been thanked: 0 time

Re: Merging two VB files to VB file

Postby BillyBoyo » Fri Nov 02, 2012 1:10 pm

Did you look at TYPE=V/F in the manual? If so, what do you think is the relevance here?

The JOINKEYS can use any combination of datasets which DFSORT can process. If we stick to QSAM, then it means both fixed-length records, both variable-length or one of each in either order.

The REFORMAT record does not have to be variable. You can make a fixed-length REFORMAT record even if both input files are variable-length records.

What tells DFSORT that the record is variable-length is the RDW. If you want a variable-length REFORMAT you need an RDW from one of the input files.

If you do not put the RDW in the first position of the REFORMAT record, the REFORMAT record will be fixed in length.

If you want variable-length records from fixed-length, there is FTOV/CONVERT available on OUTFIL.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Re: Merging two VB files to VB file

Postby porwalrox » Fri Nov 02, 2012 3:28 pm

Thanks Billy! I got it that there must be an RDW from any of the input files.

Can you just tell me that if write REFORMAT FIELDS=(F1:1,80,F2:5,76)? it converts a V to F.
If i write REFORMAT FIELDS=(F1:1,80,F2:5). It works fine. How?
Or
If i write REFORMAT FIELDS=(F1:1,80,F2:1). It works fine & If i write REFORMAT FIELDS=(F1:1,80,F2:1,80). Again it coverts a V to F. How does it happen? Could you please explain?
porwalrox
 
Posts: 38
Joined: Fri Oct 05, 2012 4:05 pm
Has thanked: 2 times
Been thanked: 0 time

Re: Merging two VB files to VB file

Postby BillyBoyo » Fri Nov 02, 2012 6:55 pm

:-)

I've been so absorbed in you not specifying 1,4 seperately, it just passed me by that you didn't have a variable record on the REFORMAT. In addition to starting with the RDW, you need, as the last fields, and as you have discovered, something that is actually variable on the REFORMAT record.

One gives you variable, because the REFORMAT definition is variable, the other gives you fixed, because the definition is fixed. If the REFORMAT is variable, you need the RDW, but having and RDW will not make it variable.

These users thanked the author BillyBoyo for the post:
porwalrox (Sat Nov 03, 2012 2:03 pm)
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Previous

Return to DFSORT/ICETOOL/ICEGENER

 


  • Related topics
    Replies
    Views
    Last post