How to code the db2 queries using rexx, and also plz send some link and examples using db2 queries?



How to code the db2 queries using rexx, and also plz send some link and examples using db2 queries?..

Answer / Ravinder Rawat

For coding DB2 queries in REXX, you can refer to the SQLASSIST library documentation: https://www.ibm.com/support/knowledgecenter/en/SSEPGG_10.5.0/com.ibm.db2.le.rte.ref.doc/doc/r0003896.html
Here's an example of a simple REXX program that connects to a database and executes a query:

[...] (See the previous answer for the code)

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More REXX Interview Questions

How do I access data held on the JES spool?

3 Answers   TCS,


what is uni-rexx?

1 Answers   IBM,


I have one input file and some 40 tables, I want to read input file and compare the input file value with the table value if it is present then we have to update with new value, this should be repeated for all 40 tables and we are reading only one input file, for this is there any REXX program or job or routine to accomplish above requirement. components of the requirements; 1. One input file 2. 40 DB2 tables 3. we have to read from the input file and compare with table value, if present then update with new value (this should be recurssive for all 40 tables for every record of input file). 4. quick help is appreciated.

1 Answers  


What are various loop types supported by rexx?

1 Answers  


how to pass parms to ispf edit macro?

1 Answers   IBM,


Can I cleanly uninstall oorexx?

1 Answers   IBM,


What does the sample library of uni-rexx consist of?

1 Answers  


What do unusual return codes such as -3 and 0196 mean?

2 Answers  


I am tryin to select one records(SQL) using Rexx.Here is the code ADDRESS DSNREXX "EXECSQL FETCH C1 USING DESCRIPTOR :TBSQLDA" IF SQLCODE = 0 THEN DO LINE = '' DO I = 1 TO TBSQLDA.SQLD LINE = LINE TBSQLDA.I.SQLDATA END I SAY LINE END ADDRESS DSNREXX "EXECSQL CLOSE C1" ADDRESS DSNREXX 'DISCONNECT' i am getting the following errors and also i dont know wr to see the ouput.Can anyone please hlep me in solving this? 28 +++ ADDRESS DSNREXX 'DISCONNECT' Error running DB2REXX, line 28: Incomplete DO/SELECT/IF

2 Answers   Syntel,


can I port my existing applications from the mainframe or os/2? Will there be extensive changes required to do this?

1 Answers   IBM,


have you already used rexx - even for limited purposes? Do you need to maintain a high level of productivity during your transition to unix?

1 Answers   IBM,


Suppose if there are a set of statements and each has a word “value” in it, if I want to display all these statements so that the word “value” is aligned, then how do I code this in rexx?

1 Answers  


Categories