18.08.2013 Views

LINC Programming Reference Manual - Public Support Login - Unisys

LINC Programming Reference Manual - Public Support Login - Unisys

LINC Programming Reference Manual - Public Support Login - Unisys

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.

DO.WHEN (DW)<br />

Syntax<br />

DO.WHEN (DW)<br />

The DO.WHEN; command creates a condition that controls the execution of logic. This<br />

logic is delimited by an END; END.EXIT; or END.NO.PRINT; command which must follow<br />

the DO.WHEN; condition.<br />

To create a compound condition involving several DO.WHEN; statements, you can use the<br />

AND and OR logical connectors. In compound conditions, the OR connectors are<br />

evaluated first. Compound conditions require only one END; END.NO.PRINT; or<br />

END.EXIT; command, as they create a single logical condition.<br />

You can use the ELSE; command to handle reverse conditions.<br />

Caution<br />

On OS 2200 based <strong>LINC</strong> Systems, DO.WHEN; commands with more than 50<br />

conditions will cause COBOL compilation errors when compiling your system.<br />

DDDBDD DD DBDDDDDDDBDBD D <br />

3 3 33<br />

DY @D DY@D DD <br />

DDDDDDD DDDDDDBDDDDDDDBDDDDDDDDDDDDDDDDDDD4<br />

3 3<br />

DDDDDDDDDDDDDDDDDDDDDDDDDDY CD DBDDDDDDDDDD <br />

3 3<br />

@D DDY<br />

The relation value represents a relational operator, which must be delimited with spaces.<br />

Valid relational operators for the DO.WHEN; command are shown in the following table.<br />

Relation Description<br />

= Equal<br />

> Greater than<br />

< Less than<br />

NOT = Not equal to<br />

NOT > Less than or equal to<br />

NOT < Greaterthanorequalto<br />

v 1-111

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

Saved successfully!

Ooh no, something went wrong!