How to execute SQL statements in REXX?



IBM's flagship relational database management system

How to execute SQL statements in REXX?

Postby crazystorm » Thu May 24, 2012 8:29 am

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!
User avatar
crazystorm
 
Posts: 12
Joined: Wed Feb 16, 2011 2:50 pm
Has thanked: 1 time
Been thanked: 0 time

Re: How to execute SQL statements in REXX?

 

Re: How to execute SQL statements in REXX?

Postby NicC » Thu May 24, 2012 11:31 am

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.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 2751
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 110 times

Re: How to execute SQL statements in REXX?

Postby dick scherrer » Thu May 24, 2012 7:46 pm

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 . . .
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6304
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 92 times

Re: How to execute SQL statements in REXX?

Postby Akatsukami » Thu May 24, 2012 8:17 pm

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.
"You have sat too long for any good you have been doing lately ... Depart, I say; and let us have done with you. In the name of God, go!" -- what I say to a junior programmer at least once a day
User avatar
Akatsukami
Global moderator
 
Posts: 1056
Joined: Sat Oct 16, 2010 2:31 am
Location: Bloomington, IL
Has thanked: 6 times
Been thanked: 51 times

Re: How to execute SQL statements in REXX?

Postby NicC » Thu May 24, 2012 8:40 pm

Try this in google:
rexx db2 dsnrexx
and do not go past the first 4 items on the first page
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 2751
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 110 times


Return to DB2

 


  • Related topics
    Replies
    Views
    Last post