Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Getting SQL code 100

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
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    Post subject: Getting SQL code 100
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7240

PostPosted: Tue Mar 12, 2013 2:04 pm    Post subject: Reply to: Getting SQL code 100
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: 269
Location: Mumbai

PostPosted: Tue Mar 12, 2013 2:07 pm    Post subject:
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    Post subject:
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: 269
Location: Mumbai

PostPosted: Tue Mar 12, 2013 2:58 pm    Post subject:
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    Post subject:
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: 269
Location: Mumbai

PostPosted: Tue Mar 12, 2013 3:44 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts PL/I code tuning/Performance improvement Virendra Shambharkar PL/I & Assembler 4 Mon Dec 05, 2016 11:57 am
No new posts What is the code in CLIST to enable t... jackzhang75 CLIST & REXX 1 Fri Dec 02, 2016 3:02 am
No new posts IDEAL - Code Retrieval yugendran CA Products 0 Fri Nov 25, 2016 3:27 pm
This topic is locked: you cannot edit posts or make replies. Need to code a Rexx PGM sundaram.naveen CLIST & REXX 18 Thu Oct 06, 2016 6:45 pm
No new posts Need Help in understanding what is th... mainakdalal PL/I & Assembler 9 Mon Oct 03, 2016 8:03 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us