View previous topic :: View next topic
|
Author |
Message |
mushreyas
New User
Joined: 18 Jul 2008 Posts: 59 Location: Bangalore
|
|
|
|
Hi,
I have to sort first 5 bytes of character data of an input record which is left justified. But before sorting i need to right justify the data and then convert character data (which is always numeric) into binary format.
I have searched for JUSTIFY statement in SYNCSORT manual which i have and couldn't find anything. Hence turning over to you guys for help. |
|
Back to top |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
mushreyas,
Show a few sample input records and the expected output out of it along with the input/output file attributes |
|
Back to top |
|
|
mushreyas
New User
Joined: 18 Jul 2008 Posts: 59 Location: Bangalore
|
|
|
|
Hi,
Sample Input
Output should be as below
Code: |
00005
00004
00009
00001
00006
|
And i should convert this to Binary which i will be able to once i do the justification. |
|
Back to top |
|
|
mushreyas
New User
Joined: 18 Jul 2008 Posts: 59 Location: Bangalore
|
|
|
|
Input file is of 5 bytes Fixed format and same goes with output file. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
You should be able to convert these values to binary without the justify (in the BUILD).
Look at the UFF data format maybe. |
|
Back to top |
|
|
mushreyas
New User
Joined: 18 Jul 2008 Posts: 59 Location: Bangalore
|
|
|
|
Hi Dick,
Is the UFF format available with SYNCSORT? If so can it converts the data after justification to Binary.
Should it be coded like below
Code: |
OUTREC FIELDS=(1,5,UFF,M11) |
|
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
What happens when you try it?
'Tis free to try and should cause no problems. . .
A local test will almost always be quicker than the forum. . .
Quote: |
Is the UFF format available with SYNCSORT? |
Yes, UFF is available with Syncsort. |
|
Back to top |
|
|
mushreyas
New User
Joined: 18 Jul 2008 Posts: 59 Location: Bangalore
|
|
|
|
Thanks Dick. It worked... |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Good to hear it is working - thank you for letting us know
d |
|
Back to top |
|
|
|