Quantcast
Channel: Visual COBOL
Viewing all articles
Browse latest Browse all 5819

Forum Post: Possible to use a variable for database?

$
0
0
I have a COBOL program and I want to use it with table A or table B, as both have the same structure and similar data, but I don't want to repeat every SQL stmt for both..  Instead of the next two selects, for example, I would like to use one select stmt with the tablename a variable.: 2000-get-record section. EXEC SQL Select * from A where x = z END-EXEC. OR 2100-get-record section. EXEC SQL Select * from B where x = z END-EXEC.   .

Viewing all articles
Browse latest Browse all 5819

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>