M Statements

PSL supports most M commands, even when not part of the official PSL specification, by simply copying the code from the PSL source to the M target routine. Nevertheless, there are a number of situations where PSL provides better means to achieve the functionality. The following list provides a translation of M commands to recommended PSL constructs:

M Command

Recommended PSL Equivalent

B (break)

Copied.

C (close)

Instantiate an IO object and use IO.close().

D (do)

do statement

NOTE: PSL does not support the "M dotted syntax". Use statement blocks (in curly braces) instead.

E (else)

else statement

F (for)

for statement

G (goto)

If reference data types are in scope as well, a compile time error will occur.

If only primitive data types are in scope, the command will be copied. However, it is strongly recommended that you review the code segment and rewrite it to not use the M GOTO command at all.

H (halt)

Copied.

H (hang)

Copied.

I (if)

if statement

J (job)

Copied.

K (kill)

Argumentless KILL produces a compile time error.

Although all other variations are copied, it is strongly recommended that you restrict the M KILL command to nodes or subtrees of M arrays. Allow the PSL compiler to handle object scope through type statements and formallists.

L (lock)

Copied.

N (new)

Although the compiler will copy this statement, it is strongly recommended that you replace the M NEW command with one or more PSL type statements.

O (open)

Instantiate an IO object, and use IO.open().

Q (quit)

quit statement

R (read)

Instantiate an IO object, and use IO.read().

S (set)

set statement

TCOMMIT

Invoke Runtime.commit().

TROLLBACK

Invoke Runtime.rollback().

TSTART

Invoke Runtime.start().

U (use)

Instantiate an IO object. The object implementation encapsulates the USE.

V (view)

Copied.

W (write)

Although PSL has a write statement, instantiate an IO object and use IO.write() to encapsulate all other device-related operations.

X (xecute)

Copied (possibly with warning).

ZBREAK

Copied.

ZMESSAGE

Copied.

ZPRINT

Copied.

ZSHOW

Copied.

ZWITHDRAW

Copied.

ZWRITE

Copied.