Use the Dataset By-Reference Delete (-dsetbyrefdelete) startup parameter to control whether the DELETE OBJECT statement can be used on a dataset handle passed BY-REFERENCE in the called procedure.

Operating system and syntax UNIX / Windows -dsetbyrefdelete
Use with Maximum value Minimum value Single-user default Multi-user default
Client Session
Note: This behavior is consistent with passing a TABLE-HANDLE BY-REFERENCE.
Note: Take care when using this startup parameter since the called procedure does not "own" the ProDataSet since it was passed by-reference. Ensure that the ProDataSet you are about to delete is not being used by any other procedure or method.
If you do not use -dsetbyrefdelete, you get the following error if you attempt to use the DELETE OBJECT statement in the called procedure:
Cannot delete a BY-REFERENCE PARAMETER dataset or table in the called procedure. (12327).