Arithmetic and Logical operators in Easytrieve

Arithmetic operations:

* Assignment
 WS-TEMP = 10
* Addition
 WS-TEMP = WS-TEMP + 2
* Subtraction
 WS-TEMP = WS-TEMP - WS-TEMP2
* Multiplication
 WS-TEMP = 10 * -5
* Division
 WS-TEMP = WS-TEMP / 5

Logical operators:

Equal IF WS-NUMBER EQ 12345
Not Equal IF WS-NUMBER NE 11111
Checking range A through B IF WS-NUMBER EQ 11111 THRU 22222
Checking a variable for Numeric IF WS-NUMBER2 NUMERIC
Checking for Zeros IF WS-NUMBER NOT ZEROS

One thought on “Arithmetic and Logical operators in Easytrieve”

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.