View previous topic :: View next topic
|
Author |
Message |
cvadlamudi
New User
Joined: 19 Apr 2007 Posts: 68 Location: India
|
|
|
|
Hi,
Can anyone explain the procedure, how the COMP data can be viewed in a file.
Ex : for Comp-3 we will go for HEX ON and we can view the data in the file.
How the COMP data can be viewed in a file ? |
|
Back to top |
|
|
murmohk1
Senior Member
Joined: 29 Jun 2006 Posts: 1436 Location: Bangalore,India
|
|
|
|
Use fileaid. |
|
Back to top |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
|
|
HEX ON will allow you to view it but you will still be seeing the binary value....
Use Window's calculator to convert it from HEX to DECIMAL.... |
|
Back to top |
|
|
Aaru
Senior Member
Joined: 03 Jul 2007 Posts: 1287 Location: Chennai, India
|
|
|
|
Quote: |
Ex : for Comp-3 we will go for HEX ON and we can view the data in the file. |
You can display the packed decimal fields using SORT/OUTREC/Edit masks.
Code: |
OUTREC FIELDS=(1,8,PD,M4) |
The above code is just an example. |
|
Back to top |
|
|
cvadlamudi
New User
Joined: 19 Apr 2007 Posts: 68 Location: India
|
|
|
|
Its Good working.. Thanks a lot CICS Guy |
|
Back to top |
|
|
stodolas
Active Member
Joined: 13 Jun 2007 Posts: 632 Location: Wisconsin
|
|
|
|
CICS Guy: I got tripped up by this a few weeks back, I had a comp field with a value of FFFFFFFFFFFFFECA. The field was PIC S(9). What is the decimal value? |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
-310
zero your calculator.
hex mode
enter ffff
minus feca
+ 1
equals
dec mode |
|
Back to top |
|
|
stodolas
Active Member
Joined: 13 Jun 2007 Posts: 632 Location: Wisconsin
|
|
|
|
That's what I ended up doing, I hadn't had to use the 2's complement since school. It threw me for a second because I took the straight hex value and did the windows calc thing and I got a huge number, but I knew it was a DB2 error. I used the windows calculator -> binary flipped the bits +1. |
|
Back to top |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
|
|
stodolas wrote: |
CICS Guy: I got tripped up by this a few weeks back, I had a comp field with a value of FFFFFFFFFFFFFECA. The field was PIC S(9). What is the decimal value? |
Since the highest bit (for the calculator) is on, just a simple +/- key produces the hex 136 (decimal 310)..... |
|
Back to top |
|
|
vasanthkumarhb
Active User
Joined: 06 Sep 2007 Posts: 275 Location: Bang,iflex
|
|
|
|
Hi All,
You can check FIle Aid, instead of complex calculations.....
Regard's
Vasanth. |
|
Back to top |
|
|
stodolas
Active Member
Joined: 13 Jun 2007 Posts: 632 Location: Wisconsin
|
|
|
|
Addition and subtraction are not complex and File-Aid isn't available in every shop. It's better to know how to do it for cases where the data isn't stored in a file, like when you are tracing a program and watching memory to see a value. |
|
Back to top |
|
|
|