Pass different datasets as parameter

In our codebase we have a dataset as a bridge between two different systems. Data is passed via an appserver call. When we want to add new fields or tables to the dataset, we need to change it on both sides in order to avoid errors like this:

1773669661009.png

Changing both sides while business is running is now almost a project in itself; we need to make sure downtime is as short as possible. Since the factory is running from 6:00 to 23:00 we are not very keen to do this outside of business hours :)

So what we do now is to have compilers on both sides ready, have commands at hand to trim the appservers and run it in one smooth operation.
If we don't screw up too much, business hardly notices.

For us, it's not chill, so I'd like to loosen this a bit. Our structure is basically like below. On the client sides:

Code:
/* Calling program
*/
DEFINE TEMP-TABLE ttData
  FIELD cKey     AS CHARACTER
  FIELD cValue   AS CHARACTER.
DEFINE DATASET dsData FOR ttData.

RUN c:\temp\getData.p (OUTPUT DATASET dsData).

FIND ttData.
MESSAGE ttData.cKey ttData.cValue VIEW-AS ALERT-BOX.

and on the server:
Code:
/* File : c:\temp\getData.p
*/
DEFINE TEMP-TABLE ttData
  FIELD cSection AS CHARACTER
  FIELD cKey     AS CHARACTER
  FIELD cValue   AS CHARACTER.
DEFINE DATASET dsData FOR ttData.

DEFINE OUTPUT PARAMETER DATASET FOR dsData.

CREATE ttData.
ASSIGN ttData.cKey   = 'Hello'
       ttData.cValue = 'World'.

I have been experimenting with DATASET-HANDLE, but I don't like the idea of changing all references to the dataset / temp-tables to dynamic ones.
Other option to pump data from a dynamic dataset to a static one, will result in a lot of overhead, which doesn't like a good route.

What are my best options here?
 
Back
Top