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
 

 

Declaring DB2 float variables in Easytrieve

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
gvel19

New User


Joined: 20 Jul 2008
Posts: 19
Location: Schenactady, US

PostPosted: Tue Sep 23, 2008 5:18 pm    Post subject: Declaring DB2 float variables in Easytrieve
Reply with quote

Hi,

If a DB2 TABLE has a FLOAT variable then how do we declare them in a ezytrieve to retrieve those fields.

Thanks,
Vel
Back to top
View user's profile Send private message

zero

New User


Joined: 01 Dec 2007
Posts: 21
Location: Hyderabad

PostPosted: Wed Sep 24, 2008 2:55 pm    Post subject: Reply to: Declaring DB2 float variables in Easytrieve
Reply with quote

Hi Vel,
Generally floating point fields are defined in Ezt like this :

Percent W 3 P 2

here, "percent" is the field name.
"W" says that it is a working storage field. Here, "S" Can also be used.
"S" for Static.

"3" is the No. of bytes allocated for this field.
"P" says it is "Packed"
"2" is the No. of digits after Decimal Point.

if a field is of type Packed decimal, then, two digits can be stored in a Byte. that means, 4 bits are used to store a digit.

A packed decimal also stores sign (Positive or Negative) using 4 bits.

in the above example, we defined it to be 3 bytes. that means, 24 bits.
here, 4 bits are used for sign.
remaining, 20 bits are stored for Value. so, we can store 5 digits in the above field.

we mentioned 2 decimal places. So, we can store nos. like,
120.34, 987.45 and so on.

Define your field based on the Field in your table.

Hope this will help,
...
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 -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts UNIT=AFF for Easytrieve code gandikk JCL & VSAM 7 Wed Jul 12, 2017 11:42 pm
No new posts READ A PACKED "NEGATIVE" FI... jdesouza CA Products 3 Tue May 02, 2017 11:43 pm
No new posts Easytrieve report shalem CA Products 4 Sun Feb 26, 2017 9:08 am
No new posts DB2 9.1.0 not move values to Host-Var... Miguel Fernandez DB2 8 Wed Jan 25, 2017 8:24 pm
No new posts DB2 9.1.0 not move values to Host-Var... Miguel Fernandez DB2 0 Wed Jan 25, 2017 8:23 pm


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