View previous topic :: View next topic
|
Author |
Message |
muhammad
New User
Joined: 25 Oct 2007 Posts: 19 Location: hyderabad
|
|
|
|
DECLARE CONTACT-CSR CURSOR FOR
SELECT X.CONTACT_FIRST_NM,
X.CONTACT_LAST_NM,
X.CONTACT_EMAIL_ADDR
FROM CONTACT_TABLE X
WHERE X.REF_NUM = : WS-TEMP-NUM
i declared the above cursor in Working Storage section...
I want to move some value in WS-TEMP-NUM and then fetch the cursor...
Its giving compilation error that WS-TEMP-NUM is not a valid host variable.. need help pls... |
|
Back to top |
|
|
Craq Giegerich
Senior Member
Joined: 19 May 2007 Posts: 1512 Location: Virginia, USA
|
|
|
|
muhammad wrote: |
DECLARE CONTACT-CSR CURSOR FOR
SELECT X.CONTACT_FIRST_NM,
X.CONTACT_LAST_NM,
X.CONTACT_EMAIL_ADDR
FROM CONTACT_TABLE X
WHERE X.REF_NUM = : WS-TEMP-NUM
i declared the above cursor in Working Storage section...
I want to move some value in WS-TEMP-NUM and then fetch the cursor...
Its giving compilation error that WS-TEMP-NUM is not a valid host variable.. need help pls... |
Is ws-temp-num defined? What are the definitions of X.REF_NUM and WS-TEMP-NUM? |
|
Back to top |
|
|
muhammad
New User
Joined: 25 Oct 2007 Posts: 19 Location: hyderabad
|
|
|
|
yeah.. it is defined...
05 WS-REF-NUM-DIV PIC 9(07)
and in the table, REF_NUM is Decimal(7,0) !!!! |
|
Back to top |
|
|
muhammad
New User
Joined: 25 Oct 2007 Posts: 19 Location: hyderabad
|
|
|
|
yeah.. it is defined...
05 WS-TEMP-NUM PIC 9(07)
and in the table, REF_NUM is Decimal(7,0) !!!! |
|
Back to top |
|
|
Craq Giegerich
Senior Member
Joined: 19 May 2007 Posts: 1512 Location: Virginia, USA
|
|
|
|
muhammad wrote: |
yeah.. it is defined...
05 WS-TEMP-NUM PIC 9(07)
and in the table, REF_NUM is Decimal(7,0) !!!! |
DB2 doesn't use unsigned numbers and the cobol equivalent of decimal is COMP-3, try this.
05 WS-TEMP-NUM PIC S9(7) COMP-3. |
|
Back to top |
|
|
muhammad
New User
Joined: 25 Oct 2007 Posts: 19 Location: hyderabad
|
|
|
|
k.. now iam getting SQL -805 |
|
Back to top |
|
|
Craq Giegerich
Senior Member
Joined: 19 May 2007 Posts: 1512 Location: Virginia, USA
|
|
|
|
Look it up in the manual. It is at the top of page 'IBM MANUALS". |
|
Back to top |
|
|
star_dhruv2000
New User
Joined: 03 Nov 2006 Posts: 87 Location: Plymouth, MN USA
|
|
|
|
-805 I think is program name not found in plan .. You need to properly BIND your program ...
Cheers |
|
Back to top |
|
|
acevedo
Active User
Joined: 11 May 2005 Posts: 344 Location: Spain
|
|
|
|
DBRM OR PACKAGE NAME NOT FOUND IN PLAN. |
|
Back to top |
|
|
|