Status Table (Open ou close)

How to know the state of a TPS table
before remove this table in ABC


There is a built in function Status() that should do the trick!

STATUS (return file or window/report status)

STATUS(| file   |)
       | window |

STATUS Returns the passed file, window or report status.

file The label of a FILE statement.
window The label of a WINDOW, APPLICATION, or REPORT structure, or valid built-in variables TARGET, PRINTER, or SYSTEM.

The STATUS procedure returns zero (0) if the file is not open, and the file’s access mode if it is open. If the access mode is actually zero (Read Only / Any Access), 40h (Read Only / Deny None) is returned (see OPEN).

… etc, there is more detail in the help file.