<< Click to Display Table of Contents >> IF ... END-IF |
![]() ![]() ![]() |
Allows you to control what statements are executed inside of SCAN block.
if expression
...
end-if
Supported operators are: =, >, <, >=, <=, <>
Expression can contain brackets, operators, AND and OR commands and NOT.
Values must be enclosed by apostrophes.
Field must equal a column name of the scanned result set and must be coded exactly as you see it in the program:
In this sample field can be one of Client, Environm, System, PredKey, SuccKey, Clnt, JobPlan, Obj-Type, ...
The value must be enclosed in apostrophes.
Example:
scan=''
if (Client = 'CLIENT' and Object = 'SYNC.USED')
...
end-if
end-scan
Caution:
In the past it was allowed to type a column name that contained spaces like this:
if (Programmers Name = 'John')
This is not possible now. If you want to use a column having spaces you must replace them by underscores:
If (Programmers_Name = 'John')