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 Protection Exception while move 0 to ... Kevin Vaz CICS 10 Tue Oct 18, 2016 4:19 pm
No new posts Easytrieve - Report writing - Only 1 ... Abhi Nature CA Products 2 Wed Sep 14, 2016 11:40 am
No new posts DB2 FLOAT precision soundarr DB2 4 Fri Jul 15, 2016 9:47 pm
No new posts Is it possible to pass variables of s... Csongor CLIST & REXX 2 Fri Jun 10, 2016 7:33 pm
No new posts RACF Easytrieve Plus macro Susan Jackson CA Products 0 Fri Jun 03, 2016 8:25 pm


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