The Meaning of
Inside VESOFT covers
tips and techniques you can use with VESOFTs products,
And his fine oratory may be summed up in a single quote: It depends upon what the meaning of the word is is.
Which brings us to the MPEX hints for this month (I know you are still looking for the link!). If you remember, last month we talked about file attribute variables. I covered a lot, but that was just the proverbial tip of the iceberg. And trust me, when were done, there will still be a lot of berg that you wont have seen. MPEX is that powerful and that diverse that theres no way I can cover all of it.
Our topic for the month is IS and how it is used in file attribute variables. There is a series of variables that allow you to do a Boolean test of certain attributes of a file. (One of my favorite typographical errors in a college course catalog described a course that taught Boolean logic, except Boolean was spelled with a b where the l should have been.)
When it comes to IS, maybe the easiest one to understand is the ISPRIV variable. %LISTF @.@.DEV(ISPRIV) will give you all of the privileged files in the DEV account. This means any database files along with any of the AIF files, tpi files included in the database, etc.
If you need to find only the fixed length files:
You also can look for variable length (ISVARIABLE) or undefined (ISUNDEFINED). You can differentiate between ASCII (ISASCII) and binary (ISBINARY) along with finding KSAM (ISKSAM) and KSAMXL (ISKSAMXL). Files with or without carriage control can be cut out of the pack with ISCCTL or ISNOCCTL.
In an example I cited last month, looking for job streams, we used:
%LISTF @.@jo@.@(ISSTD and (CODE=or CODE=EDTDT) and RECSIZE<256)
The command, run in a job, looks for files that have a code of blank or EDTDT with a record size less than 256 and are standard files (ISSTD) a standard file is a file that is neither a message file (ISMSG) nor a circular file (ISCIR) nor a RIO file (ISRIO) nor a KSAM/KSAMXL.
You can look for specific executable files by their type ISCMPROG for compatibility mode executables, ISNMPROG for native mode executables and ISEXECUTABLE for all those NM and CM files along with SL, XL and NL files.
The friendship between VEsoft and Robelle shows up again with the variables ISQEDIT for QEDIT format files (code=111) and ISJUMBO for QEDIT jumbo files.
MPEX plays well with POSIX too. Using ISDIR will give you a directory or account), ISLINK finds link files, ISHIDDEN gives you hidden files, ISBYTESTREAM for byte stream files and ISXLSPOOLFILE for NM spool files.
Down in the realm of security, you can examine files for the condition ISRELEASED or ISSECURED. And ISBOSS is true if the executing user is SM or AM of the files account. IS even has a cousin in the purview of security HAS. If a file has an ACD, then it has a true condition for HASACD.
The attribute variables carry over into jobs and sessions as well. Jobs carry the attributes of ISEXEC (executing), ISSUSP (suspended), ISWAIT (waiting), ISINIT (being initialized) and ISSCHED (scheduled). If a session has issued the command SET MSG=OFF (best example is running a VIEW/3000 or QUICK screen), then the attribute is ISQUIET. If a job has issued the command SET STDLIST=DELETE, then look for the condition ISSTDLISTDELETE. If a job is restartable, then ISRESTARTABLE is the attribute of the moment.
You can even get into the act with spool files (although well talk more about spool file attributes next month). If a spool file is ready, the Boolean variable is SPOOL.ISREADY and if it is open SPOOL.OPENED and if active SPOOL.ACTIVE. The state of locked gives us a SPOOL.ISLOCKED true condition and deferred is SPOOL.ISDEFERRED. If a spool file has had SPSAVE set, then the condition is SPOOL.SPSAVE.
Next month, well look at more uses for the spool file attributes along with uses for dataset attributes.
Steve Hammond, a systems analyst for a trade association in Washington, DC, regularly splits his vote between the Bull Moose and Mugwump parties.
Copyright The 3000 NewsWire. All rights reserved.