14.03.2014 Views

Scripting Guide - SAS

Scripting Guide - SAS

Scripting Guide - SAS

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Appendix A JSL Syntax Reference 589<br />

Conditional and Logical Functions<br />

IfMin(expr1, result1, expr2, result2, ... )<br />

Description<br />

Evaluates the first of each pair of arguments and returns the evaluation of the result expression (the<br />

second of each pair) associated with the minimum of the expressions. If more than one expression is the<br />

minimum, the first minimum is returned. If all expressions are missing and a final result is not specified,<br />

missing is returned. If all expressions are missing and a final result is specified, that final result is<br />

returned. The test expressions must evaluate to numeric values, but the result expressions can be<br />

anything.<br />

Returns<br />

The result expression associated with the minimum of the expressions<br />

IfMZ(condition, result, condition, ..., )<br />

IfV3(condition, result, condition, ..., )<br />

Description<br />

Logical If with version 3.x behavior, which treats missing values as 0; used automatically when opening<br />

v3 data tables.<br />

Interpolate(x, x1, y1, x2, y2)<br />

Interpolate(x, xmatrix, ymatrix)<br />

Description<br />

Linearly interpolates the y-value corresponding to a given x-value between two points (x1, y1), and (x2,<br />

y2) or by matrices xmatrix and ymatrix. The points must be in ascending order.<br />

Match(a, value1, result1, value2, result2, ...)<br />

Description<br />

If a is equal to value1, then result1 is returned. If a is equal to value2, result2 is returned, and<br />

so on.<br />

MatchMZ(a, value1, result1, value2, result2, ...)<br />

MatchV3(a, value1, result1, value2, result2, ...)<br />

Description<br />

Match with version 3.x behavior, which treats missing values as 0; used automatically when opening v3<br />

data tables.<br />

Not(a)<br />

!a<br />

Description<br />

Logical Not.<br />

Returns<br />

0 (false) if a>0.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!