Does anybody know a convenient way to find out if I can get an exclusive lock on table, before a batch job is launched? We are using 9.1.3, and both Base and SPDE. Since SPDE apparently doesn't support the LOCK statement, and the OPEN function just open tables in input mode, I don't know what to do.
You may want to experiment with using LIBNAME / FILENAME and interrogating automatic variables SYSFILRC or SYSLIBRC. Also the parameter WAIT=nn and the SAS OPTIONS FILEMSGS may influence SAS behavior when unsuccessful.
Since our concern is locking on individual objects, I don't think SYSLIBRC will be useful, neither SYSFILRC (which tells whether a physical location/file exists or not). I might be helped with FILEMSGS in some way, but unfortunately we are in UNIX (Solaris), not z/os. I'm not sure how I am intend to use WAIT in this situation.