Author |
Message |
Topic: Float BIN to String Conversion in PL1 |
atakella
Replies: 5
Views: 609
|
Forum: Application Programming Posted: Fri Jul 01, 2011 12:11 am Subject: Float BIN to String Conversion in PL1 |
Hi,
I saw the link and tried using UNSPEC. However, all I get is raw bits as you mentioned.
From FLOAT BIN(53) I could get BIT(128) of raw bits.
But I am not sure how can I evaluate and convert ... |
Topic: Float BIN to String Conversion in PL1 |
atakella
Replies: 5
Views: 609
|
Forum: Application Programming Posted: Wed Jun 29, 2011 12:50 am Subject: Float BIN to String Conversion in PL1 |
Hi Kolusu,
Can you elaborate more on UNSPEC function? Also, how to evaluate that field?
Otherwise, any previous posts from forums?
I googled but couldn't locate meaningful info on UNSPEC or any c ... |
Topic: Handling Float through Easytrieve |
atakella
Replies: 13
Views: 20816
|
Forum: Application Programming Posted: Tue Jun 28, 2011 11:35 am Subject: Handling Float through Easytrieve |
But that is what I tested initially(see my code snippet posted on (14th June).
And I was getting 16 digits after decimal point. And 16th digit is either 1 or 2 numbers added or substracted.
.... ... |
Topic: Handling Float through Easytrieve |
atakella
Replies: 13
Views: 20816
|
Forum: Application Programming Posted: Tue Jun 28, 2011 5:23 am Subject: Handling Float through Easytrieve |
Apologies for late reply. I was on vacation.
1. It was my typo error. I did check for minus symbol"-" only in the actual piece of code
2. I masked the working storage field because I a ... |
Topic: Float BIN to String Conversion in PL1 |
atakella
Replies: 5
Views: 609
|
Forum: Application Programming Posted: Mon Jun 27, 2011 11:46 pm Subject: Float BIN to String Conversion in PL1 |
Hi,
I have a float datatype (Double Precision) column defined in DB2 table. Corresponding PL1 DCLGEN copybook declaration is as below:
5 WS-DATA1-NR BIN FLOAT (53)
5 WS-DATA2-NR ... |
Topic: Handling Float through Easytrieve |
atakella
Replies: 13
Views: 20816
|
Forum: Application Programming Posted: Tue Jun 14, 2011 9:22 pm Subject: Handling Float through Easytrieve |
Just to add above, I couldn't define numeric as 20 bytes. The max I could define for numeric is 18 bytes
System throws error for WS-DATA1-NUM W 20 N |
Topic: Handling Float through Easytrieve |
atakella
Replies: 13
Views: 20816
|
Forum: Application Programming Posted: Tue Jun 14, 2011 9:17 pm Subject: Handling Float through Easytrieve |
Please find the declaration I have used.
WS-DATA1-ALP W 20 A
WS-DATA1-ALP-SIGN WS-DATA1-ALP 1 A 0
WS-DATA1-ALP-WHOLE WS-DATA1-ALP +1 3 N
... |
Topic: Handling Float through Easytrieve |
atakella
Replies: 13
Views: 20816
|
Forum: Application Programming Posted: Tue Jun 14, 2011 12:39 am Subject: Handling Float through Easytrieve |
Thanks a lot. With the link given, I was able to transform string expression of float value to numeric and then to Packed Decimal and finally to DB2 table as FLOAT(Double Precision).
However, one t ... |
Topic: Handling Float through Easytrieve |
atakella
Replies: 13
Views: 20816
|
Forum: Application Programming Posted: Sun Jun 12, 2011 11:55 pm Subject: Handling Float through Easytrieve |
Tried....
.........
.........
IP-DATA1-ALPHA 155 20 A
IP-DATA2-ALPHA 175 20 A
........
........
WS-DATA1-DEC W 10 P 15
WS-DATA2-DEC W 10 P 15
........
........
JOB ... |
Topic: Handling Float through Easytrieve |
atakella
Replies: 13
Views: 20816
|
Forum: Application Programming Posted: Sun Jun 12, 2011 11:10 am Subject: Handling Float through Easytrieve |
I am sorry if I carried the impression of loading data to DB2 through easy trieve using LOAD CARD. It's basically updation of couple of fields on existing DB2 record. And those two fields are Float da ... |
Topic: Handling Float through Easytrieve |
atakella
Replies: 13
Views: 20816
|
Forum: Application Programming Posted: Sat Jun 11, 2011 1:24 pm Subject: Handling Float through Easytrieve |
Hi all,
I have this requirement of loading 20 byte data in the form of
(-123.456988231876000) from PS file into DB2 column which is defined as FLOAT datatype.(Double Precision occupies 8 bytes)
... |
|