Passing a dataset as a parameter

Posted by scott_auge on 27-May-2016 00:29

OK, I am trying to pass a dataset as a parameter

{datsetdefinedhere.i}

run MyProgram (input-output dataset mydataset by-reference)

When I do so, it says "You may not empty temp-table ... when TRACKING-CHANGES is true."

I am not doing a mydataset:empty-dataset in MyProgram so I am like Grrr.

MyProgram has it defined as:

{datsetdefinedhere.i}

define input-output parameter dataset for mydataset.

Is this possible?  It seems ridiculous one cannot pass a dataset to another program.

Posted by scott_auge on 27-May-2016 01:12

Ah ha!  It is defined in an include and there are includes in the includes... which "empty temp table ..." .

Put a conditional compile around them and it works!

Problem solved, just shoddy coding.

All Replies

Posted by marian.edu on 27-May-2016 00:42

afraid passing datasets as parameters are perfectly possible, using by-reference is always welcome only you have to be aware you work on the same object and in your case there might well be temp-tables in it that have tracking-changes turned on so you kinda need to handle that :)


if you’re not doing any empty-table on any of it’s temp-tables then there might be a call to fill using empty mode instead of append, just a guess though 
 
Marian Edu

Acorn IT 
+40 740 036 212

Posted by scott_auge on 27-May-2016 01:12

Ah ha!  It is defined in an include and there are includes in the includes... which "empty temp table ..." .

Put a conditional compile around them and it works!

Problem solved, just shoddy coding.

This thread is closed