AnsweredAssumed Answered

Reuse of ADS transactions with SQL wrapper.

Question asked by liam.dutton on Jun 23, 2012
Latest reply on Jun 25, 2012 by liam.dutton
Hi,

I'm currently working on a POC for this piece of work.

Progress so far has been pretty good. I've created a SQL procedure around a new dialog, made a copy of an existing premap (amended so that screen handling is removed) and associated it with the new dialog. This has been successful, and have managed to use a SELECT command to retrieve data from the premap.

Obviously, the above is not true reuse of the existing ADS code, and would require extra maintenance if any changes were made the existing ADS dialog/premap, as these would have to be reflected in the amended SQL associated premap.

So, to see if true reuse could be achieved I did the following :

1) create a new SQL procedure
2) create a new Dialog, which is associated with the above procedure.
3) Create a new Premap, associated with the above dialog, and INCLUDEd the existing premap into a subroutine.
4) amended the existing premap to ignore screen related commands if the user defined transaction code being passed is set to 'SQL'.

The current process seems to work to a point (tracked through ADSALIVE), but not completely, as when I hit the end of the INCLUDEd Premap (usually when the DISPLAY is actioned), the process ends, without returning back to the subroutine, then back to the new premap. from here I can then MOVE the data from the map fields back into the SQL defined fields. I've tried a RETURN (both with and without a CONTINUE) within the modified existing premap.

The restriction is that the existing premap has to still work in its own right as a part of existing ADS dialog.

Would be grateful for any suggestions/view/experience of how I could achieve this last step!

Thanks,
Liam Dutton.

Outcomes