View previous topic :: View next topic
|
Author |
Message |
dilpreet
New User
Joined: 18 Mar 2008 Posts: 34 Location: INDIA
|
|
|
|
SELECT COURSE_PACKAGE_ID
INTO :COURSE-PACKAGE-MASTER-TABLE.COURSE-PACKAGE-ID
FROM COURSE_PACKAGE_MASTER
WHERE COURSE_PACKAGE_ID = 'AXIOM11'
AND COURSE_PACKAGE_EXPIRATION_DATE IS NOT NULL
AND (COURSE_PACKAGE_EXPIRATION_DATE = :CURRENT-DATE-IN
OR COURSE_PACKAGE_EXPIRATION_DATE < :CURRENT-DATE-IN)
I am executing this query in SPUFI where it returns a row successfully with SQLCODE = 0
The same query when run in cobolDB2 program gives sqlcode = 100
Field declaration in Table is
COURSE_PACKAGE_ID VARCHAR X(20)
COURSE_PACKAGE_EXPIRATION_DATE nullable date field
Please suggest your views |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
Have your researches uncovered what a "100" means? |
|
Back to top |
|
|
chandan.inst
Active User
Joined: 03 Nov 2005 Posts: 275 Location: Mumbai
|
|
|
|
Check population of your host variables in CObol program..
Just Put some display statements to check if your query getting correct values as input to the query
Regards,
Chandan |
|
Back to top |
|
|
dilpreet
New User
Joined: 18 Mar 2008 Posts: 34 Location: INDIA
|
|
|
|
I have debugged the program and values are populating correctly.Is there anything that Nullable date field cannot be compared . I may be missing something here |
|
Back to top |
|
|
chandan.inst
Active User
Joined: 03 Nov 2005 Posts: 275 Location: Mumbai
|
|
|
|
Can you please provide your spufi details as well as debugging snapshot?
So that we will also get clear idea how is it working at spufi and Cobol |
|
Back to top |
|
|
dilpreet
New User
Joined: 18 Mar 2008 Posts: 34 Location: INDIA
|
|
|
|
Can anyone confirm the date field that is defined as NULLABLE COLUMN as YES . Can this field be used in where clause for comparing with dates. |
|
Back to top |
|
|
chandan.inst
Active User
Joined: 03 Nov 2005 Posts: 275 Location: Mumbai
|
|
|
|
If Host variable populated correctly then Yes.. |
|
Back to top |
|
|
|