Page 1 of 1

How to execute SQL statements in REXX?

PostPosted: Thu May 24, 2012 8:29 am
by crazystorm
I wanna write a REXX script to invoke DB2 to run some query statements and return the results. Is it possible for REXX to do so? or this can only be implemented by calling COBOL/PLI programs? Can someone help on this and provide a REXX program sample? Thanks a lot!

Re: How to execute SQL statements in REXX?

PostPosted: Thu May 24, 2012 11:31 am
by NicC
Search the forum. What do you think the search facility is for? This sort of question was asked within the last month. Why should we repeat ourselves? If you used the forum properly you would have known without needing to ask.

EDIT: I just check when the topic was last discussed - it was the one immediately before this. Put your glasses on.

Re: How to execute SQL statements in REXX?

PostPosted: Thu May 24, 2012 7:46 pm
by dick scherrer
Hello,

For what it is worth - the "search" for this forum appears to throw away search Arguments that are less than 4 characters - which means that searching for db2 rexx returns all of the rexx hits . . .

Re: How to execute SQL statements in REXX?

PostPosted: Thu May 24, 2012 8:17 pm
by Akatsukami
crazystorm wrote:I wanna write a REXX script to invoke DB2 to run some query statements and return the results. Is it possible for REXX to do so? or this can only be implemented by calling COBOL/PLI programs? Can someone help on this and provide a REXX program sample? Thanks a lot!

Despite the limitation of search argument length that Mr. Scherrer points out, I suggest that you begin by searching for (or Googling on) DSNREXX, IBM's Rexx/SQL interface. You may also inquire of your co-workers (if you can tolerate the risk of seeing the backs of their throats as their jaws drop in incomprehension) as to whether your shop indeed uses DSNREXX (mine doesn't; we have Open Software's RXTASQL interface, which we routinely use).

As I seldom if ever use the more widely-available DSNREXX -- and as you haven't offered me my usual billing rate -- I won't be writing code for you, although I'll answer questions to the best of my ability.

Re: How to execute SQL statements in REXX?

PostPosted: Thu May 24, 2012 8:40 pm
by NicC
Try this in google:
rexx db2 dsnrexx
and do not go past the first 4 items on the first page