IF ... END-IF

<< Click to Display Table of Contents >>

Navigation:  Scripts (Batch Interface) > Syntax > Statements >

IF ... END-IF

Previous pageReturn to chapter overviewNext page

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:

 

clip0091

 

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')