Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

TO GET THE CONTENT OF S9(09) COMP FIELD

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
a1javeed

New User


Joined: 10 Dec 2005
Posts: 20
Location: KUWAIT

PostPosted: Wed Jun 14, 2006 7:06 pm    Post subject: TO GET THE CONTENT OF S9(09) COMP FIELD
Reply with quote

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
View user's profile Send private message

IQofaGerbil

Active User


Joined: 05 May 2006
Posts: 183
Location: Scotland

PostPosted: Wed Jun 14, 2006 8:57 pm    Post subject: Re: TO GET THE CONTENT OF S9(09) COMP FIELD
Reply with quote

example of what you see and what the value really is?
Back to top
View user's profile Send private message
prasadvrk

Active User


Joined: 31 May 2006
Posts: 200
Location: Netherlands

PostPosted: Thu Jun 15, 2006 5:04 pm    Post subject:
Reply with quote

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
View user's profile Send private message
a1javeed

New User


Joined: 10 Dec 2005
Posts: 20
Location: KUWAIT

PostPosted: Thu Jun 15, 2006 6:15 pm    Post subject: Re: TO GET THE CONTENT OF S9(09) COMP FIELD
Reply with quote

Thank u very much
that's what i wanted to know icon_biggrin.gif
Back to top
View user's profile Send private message
manolera

New User


Joined: 16 Jun 2006
Posts: 1

PostPosted: Fri Jun 16, 2006 9:27 pm    Post subject: Decoding numeric field
Reply with quote

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
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Fri Jun 16, 2006 11:19 pm    Post subject:
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts READ A PACKED "NEGATIVE" FI... jdesouza CA Products 3 Tue May 02, 2017 11:43 pm
No new posts Alter &DATENS field in HEADER1 Angad DFSORT/ICETOOL 4 Mon Apr 24, 2017 11:49 am
No new posts SORT VSAM file with each field one by... maxsubrat DFSORT/ICETOOL 6 Tue Mar 14, 2017 1:07 pm
No new posts IMS DB-How to update a record (a sing... Nic Clouston IMS DB/DC 9 Thu Mar 09, 2017 4:38 pm
No new posts outrec field outside range Danielle.Filteau SYNCSORT 10 Sat Mar 04, 2017 2:37 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us