View previous topic :: View next topic |
Author |
Message |
vijayakumar Beginner
Joined: 28 Jul 2006 Posts: 17 Topics: 9
|
Posted: Wed Oct 25, 2006 8:03 am Post subject: Query Problem in accessing Database |
|
|
Hi
I am getting efficiency problem while running this db2 query in cobol program it takes more time to run. This query will fetch the columns based on the matching keys present in the table and file.
In the table the key is INTEGER and in the file the key is defined as s9(15) comp-3.
Code: |
EXEC SQL
SELECT
DATE_OF_BIRTH
FIRSTNAME
SURNAME
into hostvariables
FROM table name
WHERE table-KEY = :W00-file-KEY
with UR
|
In the table the Integer key(INDEX) field contains 10 digits and i tried to move s9(15) comp-3 to s9(9) comp and it causes truncation of digits.
Is there any other solution to overcome this problem.
Regards
vijay |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
Posted: Wed Oct 25, 2006 8:25 am Post subject: |
|
|
vijayakumar,
Define a working storage fiels Ws-file-KEY as
Code: |
WS-file-KEY PIC 9(18)
|
and move the s9(15) comp-3 variable to WS-file-key
Hope this helps...
Cheers
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
 |
|
|