If is a nonterminal command statement that occurs only in command scripts. The statement adds conditional control to these scripts. It is common practice to use a single job script template for all the jobs in a migration set rather than separate scripts for each job. However, there are also common needs for slight variations in the translation configuration for different jobs. The Ifstatement specifies certain conditions for the inclusion of command statements.
The attributes of the Ifstatement are as follows:
Attribute
Description
Id
The statements within the scope of the If are processed only if the Identifier of the current storage area matches the specified value; otherwise the statements within the If are skipped.
Host
The statements within the scope of the If are processed only if the host name is present in the storage area; otherwise the statements within the If are skipped.
Lang
The statements within the scope of the If are processed only if the target language of the current script matches the specified value.
If multiple attributes are specified, then the conditions specified by each is checked as though the attributes where combined via an inclusive or.
The Ifstatement has no substatements as such. Any command script statements may occur within the statement. An example would be something like this
The If statement allows for general script templates to apply to more jobs in a migration set. It also helps eliminate "log noise" from things like skipping fixes, warning from refactoring commands, etc.