2 3 2 Range of Values Examples

LANSA Technical

2.3.2 Range of Values Examples

These examples illustrate the use of the range of values rule facility:

Example 1

Field being checked:

Name Type Len Dec

POSTCD

A

4

 

 

Range of values:

  From Value To Value Comments

 

Or

Or

'2000'

'3000'

'4000'

'2900'

'3900'

'4900'

Check post code is in NSW, VIC or QLD. Post code is numeric.

 

Example 2

Field being checked:

Name Type Len Dec

POSTCD

S

4

0

 

Range of values:

  From Value To Value Comments

 

Or

Or

2000

3000

4000

2900

3900

4900

Check post code is in NSW, VIC or QLD. Post code is numeric.

 

Example 3

Field being checked:

Name Type Len Dec

AMOUNT

P

5

2

 

Range of values:

From Value To Value Comments

0.01

999.99

Check that AMOUNT is positive.

 

Example 4

Field being checked:

Name Type Len Dec

AMOUNT

P

5

2

 

Range of values:

From Value To Value Comments

-999.99

-0.01

Check that AMOUNT is negative.

 

Example 5

Field being checked:

Name Type Len Dec

PERIOD

A

2

 

 

Range of values:

From Value To Value Comments

*LASTPER

*NEXTPER

Check PERIOD using site defined system variables *LASTPER and *NEXTPER.

 

Ý 2.3 Range of Values Checks