attribute := expression : DEPRECATED [ ( message ) ] ;
attribute | The name of the Attribute. |
expression | The definition of the attribute. |
message | Optional. The text to append to the warning if the attribute is used. |
The DEPRECATED service displays a warning when the attribute is used in code that instantiates a workunit or during a syntax check. This is meant to be used on attribute definitions that have been superseded.
When used on a structure attribute (RECORD, TRANSFORM, FUNCTION, etc.), this must be placed between the keyword END and its terminating semi-colon.
Example:
personRecord := RECORD
STRING UID;
STRING first_name;
STRING last_name;
STRING address;
STRING city;
STRING state;
STRING zip;
END;
person := DATASET([{'923','James','Jones','123 Elm Street','Hollywood','FL','33022'},
{'924','Sally','Jones','22 Main Street','Tampa','FL','33604'},
{'925','Jose','Gomez','111 Biscaya Lane','Miami','FL','33101'},
{'926','Adam','Wesson','77 Sunset Blvd','Boston','MA','02108'},
{'927','Evelyn','Murray','740 SW 10th Street','Boston ','MA','02116'},
{'928','Joe','Yung','7511 Simson Avenue','Chicago','IL','60131'}], personRecord);
OldSort := SORT(person,first_name) : DEPRECATED('Use NewSort instead.');
NewSort := SORT(person,-first_name);
OUTPUT(OldSort);
//produces this warning:
// Definition OldSort is marked as deprecated. Use NewSort instead.