March 2018
Beginner to intermediate
514 pages
13h 11m
English
The Call control statement is used to call subroutines. Call also accepts parameters that are sent to the subroutines. The Call syntax is shown as follows:
Call subroutineName(Parameter 1, Parameter 2, Parameter n);
The following script shows the complete example of a subroutine and the call of it:
Sub LoadYear(UserYear)Table:LOAD *Inline[Year201520162017]where Year = $(UserYear);END SubCall LoadYear(2017);
In the preceding example, the code within the subroutine will only populate the Year field with 2017 data.
As of way of organizing our script, we can have one section per main subroutine—for instance, the load of the fact table—and then one last section where we call all the different subroutines. Within the main subroutines ...
Read now
Unlock full access