attr := DATASET( WORKUNIT( [ wuid , ] namedoutput ), struct );
This form allows you to use as a DATASET the result of an OUTPUT with the NAMED option within the same workunit, or the workunit specified by the wuid (workunit ID). This is a feature most useful in the Rapid Data Delivery Engine.
Example:
//Named Output DATASET in the same workunit: a := OUTPUT(Person(per_st='FL') ,NAMED('FloridaFolk')); x := DATASET(WORKUNIT('FloridaFolk'), RECORDOF(Person)); b := OUTPUT(x(per_first_name[1..4]='RICH')); SEQUENTIAL(a,b); //Named Output DATASET in separate workunits: //First Workunit (wuid=W20051202-155102) contains this code: MyRec := {STRING1 Value1,STRING1 Value2, INTEGER1 Value3}; SomeFile := DATASET([{'C','G',1},{'C','C',2},{'A','X',3}, {'B','G',4},{'A','B',5}],MyRec); OUTPUT(SomeFile,NAMED('Fred')); // Second workunit contains this code, producing the same result: ds := DATASET(WORKUNIT('W20051202-155102','Fred'), MyRec); OUTPUT(ds);