My company is also looking at replacing DDS with DDL, but DDL is a different mind-set. We put DDL source in a script because you have multiple SQL statements to run when creating a table (for example). We usually store and forget these scripts once they've been run once as they did the job. All future updates to files/access paths/views/etc. are achieved through a separate script containing some form of ALTER statement instead.
Using the compile command as Buck mentioned is really easy, but I found that RDi had little idea what was wrong with your SQL script if it failed (and you'd have to load a spooled file to view error messages, which, IMO, is not a great thing within RDi.)
So I knocked together a small wrapper app around the RUNSQLSTM command so that I could parse the spooled file created by the command and return an event file to RDi, which shows the errors and lines in error just like compiling RPGLE or CLLE. It works really well at the moment, but I haven't let others loose on it yet.
I think a purpose tool like IBM Data Studio might do a better job than my wrapper app, but I didn't like having a project in the data studio perspective that seemed unrelated to anything I had setup in RDi to control the rest of the project. (We have no source control tools, project management tools and our helpdesk request tool was written in 1985 and hasn't changed since. I have to make RDi really work hard so I can stay sane these days!)
-Paul.
-----Original Message-----
From: WDSCI-L [mailto:wdsci-l-bounces@xxxxxxxxxxxx] On Behalf Of Buck Calabro
Sent: 25 February 2015 20:36
To: wdsci-l@xxxxxxxxxxxx
Subject: Re: [WDSCI-L] DDL in RDi
On 2/25/2015 3:25 PM, Jim Diephuis wrote:
I created a user action that runs the RUNSQLSTMT when selected. It
only shows up when the source member type is sql.
Jim Diephuis
-----Original Message-----
From: WDSCI-L [mailto:wdsci-l-bounces@xxxxxxxxxxxx] On Behalf Of Dan
Pankowski
Sent: Wednesday, February 25, 2015 1:55 PM
To: wdsci-l@xxxxxxxxxxxx
Subject: [WDSCI-L] DDL in RDi
Hello,
We're moving from dds to ddl. My question is how do you create and
edit DDL and then compile in RDi.
We have been adding members to qsqlsrc source file and running the
runsqlstm command on the green screen, but I'd to do all development
in RDi.
It works in the Arcad skipper plugin, but we don't have all of our
applications in Arcad yet.
An alternative to User Actions is a compile command.
I just tried it out in 9.1.1 with a .sql member type.
Compile > Work with compile commands...
Click Add... next to Source type at the top.
New member type: SQL, OK
Label:runsqlstm
Command:runsqlstm srcfile(&L/&F) srcmbr(&N) commit(*none) naming(*sys) Click Create at the bottom, then Close
Now all my .sql members have a compile option that will be invoked with Ctrl-Shift-C (or the icon). Results are visible in the Commands Log view.
--
--buck
As usual I have slaughtered many electrons in vain.
--
This is the Rational Developer for IBM i / Websphere Development Studio Client for System i & iSeries (WDSCI-L) mailing list To post a message email: WDSCI-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit:
http://lists.midrange.com/mailman/listinfo/wdsci-l
or email: WDSCI-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives at
http://archive.midrange.com/wdsci-l.
---------------------------------------------------------------------------------------
This email has been scanned for email related threats and delivered safely by Mimecast.
For more information please visit
http://www.mimecast.com
---------------------------------------------------------------------------------------
As an Amazon Associate we earn from qualifying purchases.