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
 

 

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: 1537
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: 1537
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 XML Parse for COBOL 5.2 Bhanu Praveen COBOL Programming 1 Sat Jul 08, 2017 8:58 pm
No new posts Dynamic output file creation in cobol... smileheal COBOL Programming 7 Thu Jun 15, 2017 10:53 pm
No new posts Search utility(3.14) using JCl and Cobol RKS3 COBOL Programming 12 Sat Jun 10, 2017 10:24 pm
No new posts Can I traverse a STEM variable? chong.zhou CLIST & REXX 5 Wed May 31, 2017 3:54 pm
No new posts COBOL DB2 program - zIIP eligible vasanthz COBOL Programming 7 Wed May 31, 2017 5:12 am


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