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: 72
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: 1529
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: 72
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: 1529
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
This topic is locked: you cannot edit posts or make replies. Full Time COBOL Software Development ... shally Mainframe Jobs 0 Fri Jan 20, 2017 5:24 am
This topic is locked: you cannot edit posts or make replies. COBOL Software Development Lead at Fi... shally Mainframe Jobs 0 Fri Jan 20, 2017 5:21 am
No new posts Executing OO COBOL program invoking J... Virendra Shambharkar COBOL Programming 2 Tue Jan 10, 2017 6:37 pm
No new posts OO COBOL compile error Virendra Shambharkar COBOL Programming 3 Tue Jan 10, 2017 6:05 pm
No new posts Need Suggestion on COBOL program vickey_dw COBOL Programming 5 Thu Jan 05, 2017 10:55 pm


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