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

how to execute join query in cobol programming


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
sahanawaj

New User


Joined: 04 Dec 2007
Posts: 2
Location: Mumbai

PostPosted: Fri Dec 07, 2007 12:43 pm
Reply with quote

Hi
i have written a cobol programming which is given below

EXEC SQL
SELECT C_INT_ISIN
,C_ITD_NINTRPDT
,C_ITD_RDDT
,C_INT_INSSTTS
,C_ITD_SHUTIND
,C_INT_INSTYPID
INTO :C-INT-ISIN
,:C-ITD-NINTRPDT
,:C-ITD-RDDT
,:C-INT-INSSTTS
,:C-ITD-SHUTIND
,:C-INT-INSTYPID
FROM CS_INSTRU_T , CS_INSTRUDETLS_T
WHERE .C_INT_INSTRUID = C_ITD_INSTRUID
AND C_INT_INSTRUID = :WS-ACP-INSTRUID
END-EXEC.


But during executing that program,it is giving sqlcode =00030N

Please can any body help me whats wrong with this query


Hi! This is your First post in our Forums! So please be sure to 1) Use meaningful and descriptive Topic Title 2) Try to post your query in the relevant forum category 3) Make sure your query is not already posted and solved in our forums, Use the Search facility and avoid Reposts! If you are following the above rules, delete this message and post your query here!
Back to top
View user's profile Send private message
ulfnsc

New User


Joined: 15 Jan 2004
Posts: 19
Location: Stockholm, SWEDEN

PostPosted: Fri Dec 07, 2007 4:52 pm
Reply with quote

Hi sahanawaj
-305....
Check your return code, it will tell you what output host variable
need to have a indicator variable.
Back to top
View user's profile Send private message
rpuhlman

New User


Joined: 11 Jun 2007
Posts: 80
Location: Columbus, Ohio

PostPosted: Fri Dec 07, 2007 5:09 pm
Reply with quote

Move SQLCODE to a working storage field, such as
Code:
01  WS-SQLCODE  PIC  -----9.
and then display WS-SQLCODE. Reply back here with the edited SQLCODE or look it up in the manual.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Fri Dec 07, 2007 9:46 pm
Reply with quote

Hello,

If there could be more than 1 "details" row per INSTRU row, you will need to use a CURSOR.
Back to top
View user's profile Send private message
sahanawaj

New User


Joined: 04 Dec 2007
Posts: 2
Location: Mumbai

PostPosted: Tue Dec 11, 2007 1:34 pm
Reply with quote

dick scherrer wrote:
Hello,

If there could be more than 1 "details" row per INSTRU row, you will need to use a CURSOR.


but INSTRUID is the primary key of that two tables
Back to top
View user's profile Send private message
dr_te_z

New User


Joined: 08 Jun 2007
Posts: 71
Location: Zoetermeer, the Netherlands

PostPosted: Tue Dec 11, 2007 4:37 pm
Reply with quote

Are there any columns with NULLS allowed?
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 -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts COBOL -Linkage Section-Case Sensitive COBOL Programming 1
No new posts COBOL ZOS Web Enablement Toolkit HTTP... COBOL Programming 0
No new posts Execute secondary panel of sdsf with ... CLIST & REXX 1
No new posts Calling DFSORT from Cobol, using OUTF... DFSORT/ICETOOL 5
Search our Forums:

Back to Top