# MX\_CHKPPN

> [HTML Version](mx_chkppn.htm)

_Reviewed and revised April 2024_

**xcall MIAMEX, MX\_CHKPPN, dev, proj, prog, valid**

MX\_CHKPPN (MIAMEX 10) checks for the existence of the specified PPN on the specified device. 

**Parameters**

_dev_  ([String](string.md))  \[in\]

Must be set to a true (non-ersatz) device, including the trailing digit(s) but no colon, e.g. "DSK0"

_proj, prog_  ([Num](num.md))  \[in\]

Must be set to the two parts of the PPN. Note that for historical reasons, going back to when PPNs were limited to octal values, if passed as B1 variables, they are interpreted octally. In other words, if proj = 64 (decimal) and _prog_ = 99 (decimal), the equivalent PPN would be \[100,143\]. However, if _proj_ and _prog_ are any other types, they are interpreted decimally, the same _proj_ and _prog_ values would represent PPN \[64,99\].

_valid_  ([Num](num.md))  \[out\]

Returns zero if the directory does not exist; else non-zero.

**Comments**

Since A-Shell devices and PPNs map to host machine directories, this routine is equivalent to checking for the existence of the host machine directory which corresponds to the specified device and PPN according to the [DEVICE](device_sp.md)[sp](keyword-types.md) statements in miame.ini. 