Loading

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

Related Posts




blog comments powered by Disqus

There's 1 Comment So Far

  •   Anil Kumar
    September 5th, 2012 at 12:03 pm

    Hey, this is really helpful.
    Many thanks.

Share your thoughts, leave a comment!