Reformatting a Variable length file



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

Reformatting a Variable length file

Postby mfguy » Fri Dec 31, 2010 12:29 pm

Hi ,

I have a requirement here. I am having a VB(Variable Length) file which has first 4 digits as binary. Using sort option i have to reformat the 4 digits in the i/p file to a 9 digit Zoned Decimal in the O/P file. The O/p file is also a VB(Variable Length) file. Please help me out in this. I can achieve this if the O/P file is a Fixed length file.
But couldn't get how to achieve this for a VB file.

Thanx in advance
mfguy
 
Posts: 7
Joined: Mon Aug 23, 2010 5:20 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Reformatting a Variable length file

 

Re: Reformatting a Variable length file

Postby Frank Yaeger » Sun Jan 02, 2011 12:41 am

It's not clear from your description what your input records look like.

For a VB record, the first 4 bytes would be the RDW which has the length as binary in the first 2 bytes.
You say "which has first 4 digits as binary". What does that mean? Do you mean positions 5-8 (after the RDW) are binary or do you mean something else - you need to be specific. It would help if you'd show an example of what your input records look like in hex, and what you expect for output.
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: 1080
Joined: Sat Jun 09, 2007 8:44 pm
Has thanked: 0 time
Been thanked: 14 times

Re: Reformatting a Variable length file

Postby mfguy » Mon Jan 03, 2011 12:40 pm

Hi Frank,

I mean the binary digits after RDW of a VB file. The Binary digits are in the position 5-8. The O/P dataset shld have the ZD value(length 9)
of the binary digits in postion 5-8 of the i/p file. The O/P file should also be a VB file.

Please find the Hexadecimal value of an input record

                .....@31.10.1995..
                020007FF4FF4FFFF00
                01009C31B10B199501


The expected O/P shld have 210000097 in 1-9 position of the O/P file(V/B file).
mfguy
 
Posts: 7
Joined: Mon Aug 23, 2010 5:20 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Reformatting a Variable length file

Postby Frank Yaeger » Mon Jan 03, 2011 10:55 pm

Sigh. How can you expect me to help you when you can't describe accurately what you want?

.....@
020007
01009C


Assuming you aren't showing the RDW, I see X'00' in position 5 and X'210000097C' in positions 6-10 which is a PD value, so how does this match your description of "The Binary digits are in the position 5-8"? Please accurately describe what you want.

The expected O/P shld have 210000097 in 1-9 position of the O/P file(V/B file).


I assume you mean 5-13 position? Are you dropping the leading 00 from the X'00210000097C' PD value or what?

I can easily show you how to do this kind thing in DFSORT, but only if I actually know what it is you want to do, which you're making difficult.
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: 1080
Joined: Sat Jun 09, 2007 8:44 pm
Has thanked: 0 time
Been thanked: 14 times


Return to DFSORT/ICETOOL/ICEGENER

 


  • Related topics
    Replies
    Views
    Last post