Conversion of BI value



Support for NetApp SyncSort for z/OS, Visual SyncSort, SYNCINIT, SYNCLIST and SYNCTOOL

Conversion of BI value

Postby rajt » Wed Aug 18, 2010 8:02 pm

Hi There !!

Can you help me in converting a 'BI' value. Here is what am using;

17,4,BI,EDIT=(STTTTTTTTT),SIGNS=('+',-,,)

The input contains a value of FFFFADCC (A database field of INTEGER type, after the database unload). After conversion it has to display the value -21044 , but i currently see the output as +4294946252;

Can you suggest;

Thank You.

Rajesh.
rajt
 
Posts: 1
Joined: Wed Aug 18, 2010 7:56 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Conversion of BI value

Postby Alissa Margulies » Wed Aug 18, 2010 8:42 pm

You seem to be missing a leading F. FFFFFADCC is equivalent to -21044. Please check your input data to make sure you are specifying the correct position and length of the field.

In order for us to better assist you, please provide us an example of the input field with the HEX display turned on.

Thank you.
Alissa Margulies
Syncsort Mainframe Product Services
201-930-8260
zos_tech@syncsort.com
Alissa Margulies
Global moderator
 
Posts: 369
Joined: Tue Feb 26, 2008 11:15 pm
Location: USA
Has thanked: 1 time
Been thanked: 3 times

Re: Conversion of BI value

Postby kiranmayipv » Wed Aug 18, 2010 8:50 pm

Hi,

Below is the data from Database for that fieled. When i query in DB2, the value is coming correct as -21044. The value in the unloaded database file is

Ýö
FFAC
FFDC

One observation is that the sort card is working fine for positive values, but when there is a negative value its showing a problem. Also can you help me out, how you are doing the converdsion.

Thanks.
kiranmayipv
 
Posts: 7
Joined: Wed Aug 18, 2010 8:31 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Conversion of BI value

Postby kiranmayipv » Wed Aug 18, 2010 9:14 pm

Adding additional info,

There are two values at same psition in the DB2 unload file.

1st value:
--------------------
FFAC
FFDC
value in file, expected O/p -21044 , but i currently see the output as +4294946252

2nd value:
------------------------
000E
0033
Value in file, expected O/p 995, I am getting output as 995

Sort card used 17,4,BI,EDIT=(STTTTTTTTT),SIGNS=('+',-,,)
kiranmayipv
 
Posts: 7
Joined: Wed Aug 18, 2010 8:31 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Conversion of BI value

Postby kiranmayipv » Wed Aug 18, 2010 9:33 pm

need help on this post plss
kiranmayipv
 
Posts: 7
Joined: Wed Aug 18, 2010 8:31 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Conversion of BI value

Postby kiranmayipv » Wed Aug 18, 2010 10:13 pm

As suggested, I submitted the sort card by giving
0FFAC
FFFDC
in the input.

O/p recieved
+0068719455692
kiranmayipv
 
Posts: 7
Joined: Wed Aug 18, 2010 8:31 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Conversion of BI value

Postby enrico-sorichetti » Wed Aug 18, 2010 10:18 pm

quoting the principle of operations

For signed binary integers, the leftmost bit represents the sign, which is followed by the numeric field. Positive numbers are represented in true binary notation with the sign bit set to zero. When the value is zero, all bits are zeros, including the sign bit. Negative numbers are represented in two's-complement binary notation with a one in the sign-bit position.


all this irrelevant of the number of bits used to represent the number

so for the case in question, interpreting the FFFFADCC as a negative 21044 seems correct

adding a semibyte simply adds confusion

just an analogy, but for DFSORT BI implies unsigned FI implies signed
check the syncsort documentation for something similar
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 3003
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 164 times

Re: Conversion of BI value

Postby Alissa Margulies » Wed Aug 18, 2010 10:23 pm

Change BI to FI and you should get the desired results. Let me know if you continue to encounter a problem and I would be happy to further assist you.
Alissa Margulies
Syncsort Mainframe Product Services
201-930-8260
zos_tech@syncsort.com
Alissa Margulies
Global moderator
 
Posts: 369
Joined: Tue Feb 26, 2008 11:15 pm
Location: USA
Has thanked: 1 time
Been thanked: 3 times

Re: Conversion of BI value

Postby Alissa Margulies » Wed Aug 18, 2010 10:23 pm

Sorry Enrico - you posted quicker than I did. Thanks.
Alissa Margulies
Syncsort Mainframe Product Services
201-930-8260
zos_tech@syncsort.com
Alissa Margulies
Global moderator
 
Posts: 369
Joined: Tue Feb 26, 2008 11:15 pm
Location: USA
Has thanked: 1 time
Been thanked: 3 times

Re: Conversion of BI value

Postby enrico-sorichetti » Wed Aug 18, 2010 10:27 pm

nothing to be sorry Alissa
I was just suggesting an analogy to be researched, not a solution
You are the SYNCSORT expert :D
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 3003
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 164 times


Return to Syncsort/Synctool

 


  • Related topics
    Replies
    Views
    Last post