When a given task equation list, compiler task equation list, task declaration, or task assignment statement includes two or more library equations that apply to the same internal library, the WFL compiler uses the following rules to decide which of the specified library attribute assignments to use. These rules differ according to whether the intname used is an identifier or a string primary.
If the intname used is an identifier, then the following rules apply:
-
If a library equation includes an asterisk (*) before the library attribute assignments, then its library attribute assignments are merged with any that have been specified for the library in a previous library equation.
-
If a library equation does not include the asterisk, all task attribute assignments specified in previous library equations are discarded, and only the ones given in the latest library equation are used.
If the intname used is a string primary, then the following rules apply:
-
The library equation cannot contain an asterisk; if it does, a syntax error is given.
-
If the string primary evaluates to the same internal library name as was specified in a previous task equation, a run-time error is given.
Examples
In the following example, L1 is an identifier that specifies an intname. Because the second library equation contains no asterisk, the first library equation is discarded, and the value specified for the TITLE attribute is not used.
RUN (TEST)OBJECT/CALC; LIBRARY L1(TITLE = TEST/L1); LIBRARY L1(LIBPARAMETER = "TEST1");
In the following example, L1 is still an identifier that specifies an intname. However, because the second library equation includes the asterisk, the attributes from both library equations are merged.
RUN (TEST)OBJECT/CALC; LIBRARY L1(TITLE = TEST/L1); LIBRARY L1(*, LIBPARAMETER = "TEST1");