DB2 Decimal to easytrieve eq'lant variable.
Select messages from
# through # FAQ
[/[Print]\]

MVSFORUMS.com -> Application Programming

#1: DB2 Decimal to easytrieve eq'lant variable. Author: naren_ab PostPosted: Mon Jan 27, 2003 11:08 am
    —
Hi, can anyone tell me, what should be the datatype used for a varibale in easytrieve so that it can take decimal value from DB2 table. and also let me know, how can i suppress leading zeroes.
I tried to use N, A, in easytrieve did not help me much also i tried to mask.
still no luck.

Thanx

#2:  Author: kolusuLocation: San Jose PostPosted: Mon Jan 27, 2003 12:37 pm
    —
Naren_ab,


If the column on db2 table is defined as

COL1 DECIMAL(11,02)

Then the equivalent cobol declaration is

COBOL-COL PIC S9(9)V9(2) USAGE COMP-3.

similarly the equivalent easytrieve declaration is

EZT-COL 006 P 2

S9(9)v9(2) occupies a total 6 ( 9 + 2 + 1 sign / 2)

so in easytrieve you define it as total of 6 bytes with type "P" (packed) and with 2 for decimals. if you don't have any decimals then define it as 0

Hope this helps...

cheers

kolusu

#3:  Author: naren_ab PostPosted: Thu Jan 30, 2003 5:35 pm
    —
Thanks a bunch.. Very Happy



MVSFORUMS.com -> Application Programming


output generated using printer-friendly topic mod. All times are GMT - 5 Hours

Page 1 of 1

Powered by phpBB © 2001, 2005 phpBB Group