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
 
Can pass 'AND' or 'OR' operation thru cobol variable

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
cmsmoon

New User


Joined: 17 Jun 2010
Posts: 75
Location: Chennai

PostPosted: Tue Jan 24, 2012 7:22 pm    Post subject: Can pass 'AND' or 'OR' operation thru cobol variable
Reply with quote

HI All,

I want to form query in cobol program .In that query I would like to pass the condition ( AND , OR ) thru some cobol variable..How to to pass the variable and how declare that variable

Example

Select R_NO, C_NAME,C_AGE from PERSONAL where
R_NO = '74' and C_NAME ='RAJA;

Select R_NO, C_NAME,C_AGE from PERSONAL where
R_NO = '74' WS-AND-OR C_NAME ='RAJA;

This WS-AND-OR variable value passed some 'AND" or 'OR' ..

CAn you please let me is possible to pass value for AND and OR operators
Back to top
View user's profile Send private message

Pandora-Box

Moderator


Joined: 07 Sep 2006
Posts: 1544
Location: Andromeda Galaxy

PostPosted: Tue Jan 24, 2012 7:27 pm    Post subject:
Reply with quote

You can do that provided you are building a Dynamic Sql cobol program
Back to top
View user's profile Send private message
cmsmoon

New User


Joined: 17 Jun 2010
Posts: 75
Location: Chennai

PostPosted: Tue Jan 24, 2012 7:30 pm    Post subject:
Reply with quote

premkrishnan wrote:
You can do that provided you are building a Dynamic Sql cobol program


Sorry!!! The program have not dynamic query!!!!

Without using Dynamic SQL
Back to top
View user's profile Send private message
Pandora-Box

Moderator


Joined: 07 Sep 2006
Posts: 1544
Location: Andromeda Galaxy

PostPosted: Tue Jan 24, 2012 7:44 pm    Post subject:
Reply with quote

Have two queries in two para if the variable is or execute the query with or else execute query with and icon_smile.gif
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 Utility for search operation Gopalakrishna551 TSO/ISPF 11 Wed Jan 03, 2018 11:07 am
No new posts KSDS and Index file in cobol deepak14450 COBOL Programming 9 Fri Dec 22, 2017 9:36 am
No new posts Moving a COMP-3 Variable to a Numeric... ajayachander COBOL Programming 2 Thu Dec 14, 2017 5:46 pm
This topic is locked: you cannot edit posts or make replies. Cobol to fetch the content by using s... arunc55 COBOL Programming 4 Fri Nov 17, 2017 1:25 pm
No new posts VBS and VB, COBOL syntax is the same ... natt.sut COBOL Programming 3 Sun Nov 12, 2017 6:36 am

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