Page 52 - SAS_manual
P. 52

Example: IF, SELECT, WHILE
                       Multiple iterative:
                       Condition check will happen multiple times.
                       Example: DO LOOP, DO UNTIL, DO WHILE



               6.2 Single iterative:


               5.2.1 IF statements:

                       IF condition;          Sub setting IF
                       IF condition THEN action;
                       IF condition THEN DO;
                           Action1;
                           Action2;
                           …
                           ..
                           Action N;
                           End;
                   IF condition1 THEN action 1;
                       ELSE IF condition 2 THEN action 2;
                       ELSE IF condition 2 THEN action 2;
                       …………
                       ELSE action N;
               To construct expressions in statements, you can use these comparison operators:



                                            Operator            Comparison Operation

                                         =           eq      equal to
                                         ^=          ne      not equal to
                                         >           gt      greater than

                                         <            lt     less than
                                         >=          ge      greater than or equal to

                                         <=          le      less than or equal to
                                                     in      equal to one of a list




                                                Operator    Logical Operation




                                                    SAS HANDBOOK | VISIT:: http://nikhilanalytics.com  52
   47   48   49   50   51   52   53   54   55   56   57