Code segmentation keywords
The Transformation Language provides keywords to specify when code is executed.
Refer to Example 1: student-score distribution for an example of how to use of these keywords.
- global {job_parameters }
Use this syntax to declare a set of global variables whose values are supplied by osh parameters. Values cannot be set with the Transformation Language. A warning message is issued if a value is missing.
- initialize {statements }
Use this syntax to mark a section of code you want to be executed once before the main record loop starts. Global variables whose values are not given through osh parameters should be defined in this segment.
- mainloop {statements }
Use this syntax to indicate the main record loop code. The
mainloopsegments is executed once for each input record. - finish {statements}
Use this syntax to mark a section of code you want to be executed once after the main record loop terminates.