IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Getting SQL code 100


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
dilpreet

New User


Joined: 18 Mar 2008
Posts: 34
Location: INDIA

PostPosted: Tue Mar 12, 2013 1:06 pm
Reply with quote

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
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Tue Mar 12, 2013 2:04 pm
Reply with quote

Have your researches uncovered what a "100" means?
Back to top
View user's profile Send private message
chandan.inst

Active User


Joined: 03 Nov 2005
Posts: 275
Location: Mumbai

PostPosted: Tue Mar 12, 2013 2:07 pm
Reply with quote

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
View user's profile Send private message
dilpreet

New User


Joined: 18 Mar 2008
Posts: 34
Location: INDIA

PostPosted: Tue Mar 12, 2013 2:44 pm
Reply with quote

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
View user's profile Send private message
chandan.inst

Active User


Joined: 03 Nov 2005
Posts: 275
Location: Mumbai

PostPosted: Tue Mar 12, 2013 2:58 pm
Reply with quote

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
View user's profile Send private message
dilpreet

New User


Joined: 18 Mar 2008
Posts: 34
Location: INDIA

PostPosted: Tue Mar 12, 2013 3:34 pm
Reply with quote

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
View user's profile Send private message
chandan.inst

Active User


Joined: 03 Nov 2005
Posts: 275
Location: Mumbai

PostPosted: Tue Mar 12, 2013 3:44 pm
Reply with quote

If Host variable populated correctly then Yes..
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts run rexx code with jcl CLIST & REXX 15
No new posts Compile rexx code with jcl CLIST & REXX 6
No new posts REXX code to expand copybook in a cob... CLIST & REXX 2
No new posts VSAM return code 23 - for a Random read COBOL Programming 4
No new posts Monitoring production job progress. N... JCL & VSAM 4
Search our Forums:

Back to Top