Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 7314

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 Speed-up/reduce CPU use of code prino PL/I & Assembler 0 Tue Sep 26, 2017 12:05 am
This topic is locked: you cannot edit posts or make replies. how to code for GDG in Rexx cvnlynn CLIST & REXX 13 Wed Aug 09, 2017 9:13 pm
This topic is locked: you cannot edit posts or make replies. rexx code to create a ps file Bharath Vikraman CLIST & REXX 4 Mon Aug 07, 2017 10:30 am
No new posts I want to retire TRX and use only Rex... Abhinav Sharma CLIST & REXX 6 Sat Jul 29, 2017 2:53 am
No new posts UNIT=AFF for Easytrieve code gandikk JCL & VSAM 7 Wed Jul 12, 2017 11:42 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us