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: 1542
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: 1542
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 IEW2456E error when link-editing a C ... Senthilraj JCL & VSAM 0 Fri Oct 13, 2017 3:12 pm
No new posts Assembler Macro Copybook converted to... Ziquilix PL/I & Assembler 4 Tue Sep 26, 2017 3:07 am
No new posts Moving values to a variable of copybo... Vignesh Sid COBOL Programming 6 Wed Sep 06, 2017 1:04 pm
This topic is locked: you cannot edit posts or make replies. Extract all "IF" Statements... Adarsh Damodaran CLIST & REXX 1 Wed Sep 06, 2017 9:28 am
No new posts Updating the Trailer count in variabl... satheshbabur DFSORT/ICETOOL 6 Wed Aug 30, 2017 9:49 pm

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