GLOBAL( expression [, FEW | MANY ] )
expression | The expression to evaluate at a global scope. |
FEW | Optional. Indicates that the expression will result in fewer than 10,000 records. This allows optimization to produce a significantly faster result. |
MANY | Optional. Indicates that the expression will result in many records. |
Return: | GLOBAL may return scalar values or record sets. |
The GLOBAL function evaluates the expression at a global scope, similar to what the GLOBAL workflow service does but without the need to define a separate attribute.
Example:
IMPORT doxie;
besr := doxie.best_records;
ssnr := doxie.ssn_records;
//**** Individual record defs
recbesr := RECORDOF(besr);
recssnr := RECORDOF(ssnr);
//**** Monster record def
rec := RECORD, MAXLENGTH(doxie.maxlength_report)
DATASET(recbesr) best_information_children;
DATASET(recssnr) ssn_children;
END;
nada := DATASET([0], {INTEGER1 a});
rec tra(nada l) := TRANSFORM
SELF.best_information_children := GLOBAL(besr);
SELF.ssn_children := GLOBAL(ssnr);
END;
EXPORT central_records := PROJECT(nada, tra(left));
See Also: GLOBAL Workflow Service