The /SET LABEL/ packet can be used to set a label to include on every row of every subsequent report defined in the REPCONFIG
file. The label text can be either the text that appears in the packet, or the label can be defined by an environment variable.
This feature facilitates combining multiple reports from separate SMOKE runs into a single report more easily. For example,
if the packet is used to create state reports for all sectors run through SMOKE, then those state reports could be concatenated,
the file headers removed (except for the first header), and the individual sectors would be idenfified by the labels on the
rows.
The syntax for the packet is as follows:
/SET LABEL/ <label>
where <label> is limited to 200 characters and is one of the following:
a string of text that will appear near the beginning of every data line of the report. The only invalid string is the word "OFF" in capital letters.
Example: /SET LABEL/ NonEGU Point
In this example, all subsequent reports will contain a new column called "Label" and every value in the entire report will be "NonEGU Point".
an environment variable designated by <label> starting with a dollar sign.
Example: /SET LABEL/ $RUN_ID
In this example, Smkreport will attempt to evaluate the environment variable RUN_ID
from the shell running Smkreport. If RUN_ID
is a defined environment variable (e.g., the shell had set RUN_ID
to "oarea"), then all subsequent reports will contain a new column called "Label" and every value in the entire report will
be "oarea".
If the environment variable is not defined, set to blank, or otherwise invalid, the instruction will behave like the /SET LABEL/ OFF case below.
the word "OFF".
Example: /SET LABEL/ OFF
This syntax turns off use of the label in all subsequent reports until a new valid /SET LABEL/ packet is found.