eyad wrote:
Hi Mike,
Why haven't you considered the WCF proxies option? I'm also very interested to know how is it going so far with the Stored Procedure option. Has it been stable?
We might start doing something similar and I have few concerns with this regards:
1. First and foremost how are you creating those SP wrappers?
2. Are you using it for both data manipulation and fetching? You seemed to have issues with the blockfetch, did you manage to convert them to SQL result sets?
I would really appreciate your feedback.
Thanks in advance.
Eyad.
Hi,
I no longer work with Plex (thanks CA for your help in my career!) or for the company I was working with when I posted this.
However thinking back what we did was :-
a. For fetch functions create an SQLRPGLE wrapper program with some embedded SQL to SET RESULT SET for the output parameters.
You can use this for block fetches as well because you can set the result set based on a data structure - google this - I cannot remember the exact syntax.
It was a little clunky as I had to inspect the generated code and see what the generated name was of the data structure was (generally V00001 or something like that).
I had to edit the SQL source code for each wrapper so the patternisation was not perfect - it just meant you had to check the generated code for each wrapper.
N.B. the wrapper called the blockfetch and populated the fetcheddata into a local variable.
If you have output parameters as well as fetcheddata you can use output parameters on the SP.
b. For update functions I had to seperate the parameters into seperate variables in a wrapper function so the stored procedure could be set up with seperate parameters.
Make sure you define the SP with PACKED / ZONED correctly. This was a bit of a pain because some legacy update functions had many, many parameters with a single variable - grunt work!
Basic architecture was .net front end calls stored procedure created using CREATE PROCEDURE with input parameters and a single result set (where required). These SPs are linked to a Plex wrapper program generated in SQLRPGLE. The wrapper then calls the legacy PLEX programs and maps output to a result set with embedded SQL.
Because Stored Procedures are standard SQL objects they are handled in a standard manner by .net with no need for Plex .net runtime which was not at all stable in a web environment. It was quick and stable - good solution.