DATASET PRIVATE-DATA

Posted by ericg on 19-Mar-2010 16:30

Hello. I am assigning a string to the PRIVATE-DATA attribute of a DATASET. But when passed as INPUT-OUTPUT DATASET to an external procedure, accessing the PRIVATE-DATE string has a null value. Is this not possible to pass values in PRIVATE-DATA to other procedures to be accessed? Thanks

All Replies

Posted by Admin on 19-Mar-2010 17:07

You are correct in that I don't believe private-data is passed.  We are using and OERA type framework and always pass two dataset.  The one with the data and the other one a context dataset for context and messages.  We would create a context record and assign a value and the receiving procedure reads that data.  You could also pass a variable with the dataset if you don't want a context.  The advantage of a context is that you can add new context as required and procedures that need them would read them.  You don't have to add new variables for new data to be passed.

Posted by ericg on 19-Mar-2010 17:30

" You could also pass a variable with the dataset if you don't want a context."

When you say variable, that would be a parameter variable?

I could just pass a temp-table in the dataset especially for messages, but

the private-data option seemed best because it would only be one string message.

Posted by Admin on 20-Mar-2010 02:19

Yes an input parameter.

If you pass the dataset by-reference the private-data should be available.  You can pass by-reference in the same session but you can't pass by-reference to an appserver or another machine.

In anycase a variable or temp-table or dataset context record is much cleared.  If I passed 12345 in private-data you wouldn't know what that was, while a variable or context customerNo with a value of 12345 is much clearer.  Any developer can easily see what you are passing without checking what private-data means.

This thread is closed