View previous topic :: View next topic
|
Author |
Message |
a1javeed
New User
Joined: 10 Dec 2005 Posts: 20 Location: KUWAIT
|
|
|
|
Hi
I have created a sequential file , in which i have a field defined as S9(09) COMP .When i tried to find the content of the field thru editing the file using UTILITIES of TSO it shows some different values than the actual one(when i put HEX ON ).Can anybody tell me ,How can i know the actual content of the field?
thanx |
|
Back to top |
|
|
IQofaGerbil
Active User
Joined: 05 May 2006 Posts: 183 Location: Scotland
|
|
|
|
example of what you see and what the value really is? |
|
Back to top |
|
|
prasadvrk
Active User
Joined: 31 May 2006 Posts: 200 Location: Netherlands
|
|
|
|
You should know how to read the data in binary format . e.g.
1 in S9(04) COMP will be stored as 0000
0001
10 will be stored as 0000
000A
(A here means 10 )
16 will be stored as 0001
0000
32 will be stored as 0002
0000
42 will be stored as 0002
000A
Basically the numbers here are represented in hex format where the base is 16 not 2
So if you follow this convention, I hope you will find your data matching |
|
Back to top |
|
|
a1javeed
New User
Joined: 10 Dec 2005 Posts: 20 Location: KUWAIT
|
|
|
|
Thank u very much
that's what i wanted to know |
|
Back to top |
|
|
manolera
New User
Joined: 16 Jun 2006 Posts: 1
|
|
|
|
We are downloading a file from the mainframe to Unix, in binary format.
We are able to decode text fields as well as packed numbers.
We are facing problems with a field described as "Numeric (signed), expressed in units of 1. PIC S9(13).".
We find that the first 12 characters are a valid number.
We expect the 13th character to be a digit or the sign (+/-), but we actually find the following ten values:
"","A","B","C","D","E","F","G","H","I".
We are not sure how to interpret these values.
We are speculating that there is a mapping like the one shown below, where "B" is "+2" and "N" is "-4", but we would like to have some confirmation.
Code: |
Sign: |+|+|+|+|+|+|+|+|+|+|-|-|-|-|-|-|-|-|-|-|
Digit: |0|1|2|3|4|5|6|7|8|9|0|1|2|3|4|5|6|7|8|9|
Result:||A|B|C|D|E|F|G|H|I|J|K|L|M|N|O|P|Q|R|S|
|
|
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
PIC S9(13) is a 13-byte signed ZD field that is stored internally like this (hex):
zdzdzdzdzd...zdsd
z is the zone -> usually F
d is a digit -> 0-9
s is the sign indicator -> usually C or F for plus or D for minus.
So that last byte is usually one of the following:
C0-C9, D0-D9, F0-F9
That's why you see the characters you see (e.g. C1 = 'A'). |
|
Back to top |
|
|
|