Other OutSystems sites...
OutSystems Website
About Agility Blog
OutSystems Network
Login
Signup
Forums
Academy
Forge
Ideas
Forums
›
Technology & Integration
›
Outsystems and DB2 on System I, ISeries, AS/400
Outsystems and DB2 on System I, ISeries, AS/400
Eamonn Foley
Rank: #3110
Posted on 2012-06-01
thumbs_up_ico
0
thumbs_down_ico
0
reply
post_link_ico
Hi, I'm new to outsystems and was looking for some information on connecting to DB2 on the Iseries/SystemI/As400.
I've searched the boards, but there never really seems to be anyone who has it working and it willing to share.
We have a huge amount of business logic being powered on the platform and I'm looking to give the system a facelift without having to rewrite everything.
So if you have tips, suggestions, horror stories it would give me some ideas what I'm getting myself into.
Eamonn
Paulo Ramos
Rank: #5
Posted on 2012-06-03
thumbs_up_ico
2
thumbs_down_ico
0
reply
post_link_ico
Hi Eamonn,
In order to connect your OutSystems app to your AS400 database, you can setup a DB link from MS SQL Server to AS400. Then, you have two alternatives for accessing the data (see below).
Instructions below assume you have a SQL Server / .Net installation, but they can be adapted to different settings.
Setup the linked server
First, go to SQL Server, and setup a linked server to the AS400 database. You may have to setup a specific DB provider - get help from your DB Admin if needed. See also Paulo Silva's message on this topic:
http://www.outsystems.com/NetworkForums/ViewTopic.aspx?Topic=Hub-Server-supported-platforms
Once this is done, you have two options for accessing the data.
A. Import entities
A1. Go to IS, click File > Import > Import Entities from Database...
A2. Search and select the tables to import.
A3. Publish the extension.
A4. In ServiceStudio (SS), use Add/Remove References to select the entities from the extension you have just published. You can now use them in queries.
B. Use Openquery
B1. Go to IS, and create an action for retrieving your data (ex:
GetData
); add the relevant input / output parameters.
B2. Click Edit Source Code .NET to open Visual Studio. Add code for accessing the data - use Openquery:
OPENQUERY ( linked_server ,'query' )
More info here:
http://msdn.microsoft.com/en-us/library/ms188427.aspx
B3. Publish the extension.
B4. In ServiceStudio (SS), use Add/Remove References to select the actions from the extension you have just published.
B5. Repeat for other tables, adding new actions to your API...
What option is the best?
Solution A is more
friendly
, because you can use the referenced entities in your queries, as if they were local entities.
Solution B uses an API (actions) instead. You won't see the entities in SS,
but...
this solution is potentially much better in terms of performance.
In the end, you may want to follow a mixed approach.
Use option A for small tables, where performance is not an issue.
Use option B when you need to retrieve lots of data and option A has performance issues.
Hope this helps.
Cheers,
Paulo Ramos
Paulo Ramos
Rank: #5
Posted on 25 Feb
thumbs_up_ico
2
thumbs_down_ico
0
reply
post_link_ico
Just wanted to add another option for connecting to a DB2 database... this Forge component does it through a IBM DLL (IBM.Data.DB2.iSeries):
http://www.outsystems.com/forge/384/db2-iseries-connector/
Quick Reply
Notify me by email when someone answers to my post
attachment
Choose File
No file chosen
Submit
Login to reply
Something on your mind?
Login to Start a Discussion
Top Forums Posters
Gonçalo Martins
Davide Marquês
Ricardo Silva
Statler & Waldorf
Fábio Silva
Richard Pearson
Justin James
Robert Chanphakeo
Kilian Hekhuis
Miguel Grilo
See leaderboard
Online Training
On-demand video lessons to help you learn at your own pace.
Learn More