MC Press Online Forum
Welcome, Guest
Please Login or Register.    Lost Password?
TechTip: RUNSQLSTM Is Bigger and Better in V6R1 (1 viewing) (1) Guest
Go to bottom Post Reply Favoured: 0
TOPIC: TechTip: RUNSQLSTM Is Bigger and Better in V6R1
#121834
DougCMH (User)
Expert Boarder
Posts: 115
graphgraph
User Offline Click here to see the profile of this user
TechTip: RUNSQLSTM Is Bigger and Better in V6R1 7 Months, 1 Week ago Karma: 0  
This thread discusses the Content article: TechTip: RUNSQLSTM Is Bigger and Better in V6R1

Oh look! REXX!

I sometimes think REXX is a better alternative to RUNSQLSTM. REXX has all along allowed a mixture of SQL and CL, not to mention it's own syntax. And, it allows parameters, unlike RUNSQLSTM. It makes for a more dynamic solution.

Not sure about performance, but REXX has been pretty danged fast for me.
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#121835
JohndeCoville (User)
Junior Boarder
Posts: 27
graphgraph
User Offline Click here to see the profile of this user
Re:TechTip: RUNSQLSTM Is Bigger and Better in V6R1 7 Months, 1 Week ago Karma: -1  
RUNSQLSTM is a great idea that is "Dead on Arrival" when placed into practice. V6 does not look as if it is in meaningful "Upgrade Mode." I would like to see COMMON resolutions and a lot, a lot of customer comment, feedback and the above-mentioned resolutions tied-in with IBM announcements.

Finally, some upgrades are announced but not the ones that are relevant to the central thrust of SQL development in the Information technology Industry. Many basic SQL commands do not work on RUNSQLSTM.

I notice from some responses how fragmented the user-base is. Many products announced, for example, do not support REXX or CODE400. Key upgrades have been deprecated for Domino IFS support from the System i. We see a ghetoization of current users where cutting-edge development is being done in windows and the scatter-shot IBM approach in the i-World is missing the point: IBM has to become integrated, focused. I hope Bill Zeitler's managers can get the upgrade paths into focus. With that, then maybe more IBM clients will stay current with the new Releases. V6 is irrelevant in my shop.

Thank you,

--John deCoville, Pinal County Government
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#121836
tlaza (User)
Fresh Boarder
Posts: 1
graphgraph
User Offline Click here to see the profile of this user
Re:TechTip: RUNSQLSTM Is Bigger and Better in V6R1 7 Months, 1 Week ago Karma: 0  
What I would like to see is the ability to code an SQL statement directly in the CL command using a literal or a variable. I realize this probably wouldn't work for complicated queries. But it would be nice to to code a short, relatively simple SQL statement without having to maintain a script in a different location. This would be helpful in situations where I need to create a temporary work file or insert records into an existing work file and then print a report from it.
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#121837
strongdl (User)
Fresh Boarder
Posts: 4
graphgraph
User Offline Click here to see the profile of this user
Re:TechTip: RUNSQLSTM Is Bigger and Better in V6R1 7 Months, 1 Week ago Karma: 0  
To execute CL commands in a select statement, we set up an SQL function to call the QCMDEXC API. I developed it on company time, so I'll just post this exerpt to get you started. The return value in my function is an error code, in case one is sent, or the statement executed if it was successful.

CREATE FUNCTION ROUTINES.QCMDEXC (
...

BEGIN
DECLARE CMDLEN DEC ( 15 , 5 ) ;
SET RETCMD = CMD ;
SET CMDLEN = LENGTH ( TRIM ( CMD ) ) ;
CALL QCMDEXC ( CMD , CMDLEN ) ;
...

To execute the function you do something like:

select QCMDEXC('DLTF '||trim(ODOBLM)||'/'||trim(ODOBNM)) from DLTLIST
 
Report to moderator   Logged Logged  
 
Last Edit: 2008/04/28 14:34 By strongdl.
  The administrator has disabled public write access.
#121843
efnkay (User)
Junior Boarder
Posts: 39
graphgraph
User Offline Click here to see the profile of this user
Re:TechTip: RUNSQLSTM Is Bigger and Better in V6R1 7 Months ago Karma: 1  
Other than maintaining the script member (without compiling) which is one sell-point for RUNSQLSTM...You do have the DECLARE GLOBAL TEMPORARY TABLE stmt which can and does use a SELECT statement to create temporary files (in Qtemp) and the script can have multiple SQL stmts...You can create a temp table, populated or not, insert into it, update it, delete from it...Am I missing anything you can do in interactive SQL otherwise...???
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
Go to top Post Reply
Powered by FireBoardget the latest posts directly to your desktop
   MC-STORE.COM