![]() |
Select all open files in system (OPEN)
OPEN This User Option will display all files currently open in any mode throughout the system, as well as those files not yet open, but assigned with a link name. The selection will take place using the Task File Table of all TSNs. The User Option can only be executed from TSOS, and uses SVC 79. This User Option can also be made available to non-TSOS users in a restricted form, if the system administrator has first started a CFS Holder task under TSOS (/ENTER CFS.S.LMSLIB(CFSHT) ). For further information, see page A1-.
In addition to the TSN and the Open mode, the number of IO's used for each file during a predefined time interval can be displayed.
Selection parameter: [S,] [I|O|E|N|PR|SEC[EX]|ALL] [,TSN=tsn] [,USER= user-id] [,POOL=isam-pool] [,LINK [=link]] [,D-IO[S]|A-IO[S] [><=x] [,INT= sec] [, RW] ]
S in addition to user tasks, files opened by system tasks will also be displayed. The S option alone is equivalent to IOEN,S. Specifying OPEN S will display all active and inactive TFT entries.
I all files opened as Input
O all files opened as Output, Outin, Inout, Update, Extend
E all files opened as Exec (loaded programs, SDF Syntax Files)
N all files assigned, but not yet open or no longer open (inactive TFT entry)
PR all files locked with a PRINT command (PR ...,LOCK=YES)
SEC all files reserved with a SECURE command, either shareable or exclusively
SECEX all files reserved exclusively with a SECURE command
SECEX is a subset of SEC (see above)
ALL abbreviation for the input IOPRSEC
Abbreviation for IOENPRSEC, if the parameter TNS= is specified.
Standard: IOSECPR
The options I O E N may be specified in any combination (e.g. IO / IOE / IOEN).
TSN=tsn
Display all TFT entries relating to the specified TSN. The description of a system task can also be specified for tsn. Example: TSN=M.
LINK The link names used to open the files will be displayed. Standard: No link names will be displayed.
link Only those files opened with the specified link name will be displayed. For example: LINK=ECERDLOD selects all loaded programs.
USER=userid
Specifying a userid (e.g. TSOS), will result in only tasks running under that particular userid being checked for open files.
POOL=isam-pool
Specifying a Pool Name will result in all NK-ISAM files linked to this pool being selected.
D-IO [><=x]
The number of IO's that have occured within a specified time period (Standard=30 seconds) for each file will be displayed in the AGE column of the file list. In contrast to the D-IOS option (see below), files which have been opened by more than one task will be displayed once for each task, together with the TSN and associated number of IO's. Files can be selected which have used more than, less than or exactly x IO's by using the suffix ><=x . Example: OPENS D-IO>0
D-IOS [><=x]
The number of IO's that have occured within a specified time period (Standard=30 seconds) for each file will be displayed in the AGE column of the file list. The total number of IO's performed will be displayed for those files which have been opened by more than one task. The TSN column will contain the value '****' in this case, since the IO value does not relate to a particular task. Files can be selected which have used more than, less than or exactly x IO's by using the suffix ><=x .
Example:
User Option: OPENS,D-IOS>0 and Sort-Option: AGE,D
The open files will be sorted in ascending order of used IO's.
INT=sec
Length of the time period for D-IO in seconds. Standard: INT=30.
In order to calculate the IO values CFS will be placed in a wait state for the duration of the waiting period.
RW In the first two columns the number of Read and Write IO's used by each file will be displayed, instead of the usual LASTP and TYP values.
If no selection condition is specified, all files opened in input or output mode will be displayed. The following files will not be displayed:
- those opened by system tasks
- those opened in EXEC mode (loaded programs, SDF syntax files)
- those assigned with a File command, but not yet opened
Output from the OPEN User Option:
In the User Option column of the file list, the TSN of the task which opened the file, or that which issued a File command will be displayed.
*REM in the TSN column indicates that the file was opened from another host. The own host must be defined as the Master for the shared pubset.
The mode in which the file was opened will be displayed in this column:
I Input
O Output
IO Inout
OI Outin
U Update
E Extend
EX Exec
R Reverse
_ Inactive TFT entry. The file is not open.
S File is reserved with a SECURE command as shareable
SE File is reserved exclusively with a SECURE command
PR File is printed with PRINT ...,LOCK=YES
An asterisk (*) in front of the mode indicates that the file is cataloged as SHARUPD=YES .
With open NK-ISAM files, the name of the ISAM pool will be displayed in the first column of the file list (LASTP).
Examples:
OPEN O
All files opened for ouput at the time of selection.
OPEN TSN=9011
All existing TFT entries for TSN 9011 at the time of selection.
OPEN TSN=M,LINK
All files opened by the system task M, together with their respective link names.
OPEN IOEN,LINK=CFSCMD
All active or inactive TFT entries with the link name CFSCMD.
OPEN USER=S43
All files opened by tasks running under userid S43.
OPEN POOL=$TASK01
All NK-ISAM files associated with pool $TASK01.
Notes:
If no SORT OPTION is specified, the files selected by the OPEN User Option will be listed first in TSN sequence, and then in the order in which the FILE command was issued. A file can appear in the list more than once if it was opened by different tasks.
Selecting files with the OPEN User Option can be combined with other selection conditions, particulary in the FILENAME-SELECT field. For example, to find all tasks which have opened a particular file, enter the fully qualified file name followed by the ,Q parameter in the FILENAME-SELECT field, and OPEN in the User Option. For further information, see page 4-.
After selecting files with the OPEN User Option, the S Action Code can be entered to issue a Status Command for the respective TSN.
USER OPTION : OPEN may not be specified with USER-ID : (JOIN).
IO evaluation with the D-IO option: The KDCMON program cannot be executed for the duration of the evaluation. Conversely, the D-IO option cannot be invoked during a KDCMON measurement run. A D-IO evaluation can also not be used by more than one user at a time. In this case a "KDCMON active" message will be displayed. If this message appears even though the KDCMON program is not loaded, the lock situation can be resolved by using the X-IO option instead of D-IO.
A file list created with D-IO can be sorted with the CFS SORT D-IO,D or SORT AGE,D command. This will display the list in descending order of number of used IO's. The same sort order can be achieved by using the SORT OPTION field in the selection mask. The sort criterion AGE,D should be specified here.
The procedure FILEIO in the CFS.USERLIB.BEISPIEL can be called to monitor IO traffic for a particular file or task. (DO $user-id.CFS.USERLIB.BEISPIEL(FILEIO),? ).
The OPEN User Option can also be used by users other than TSOS. The open files that can be displayed will then be restricted to the current userid. The contents of SAM or PAM files opened in write mode can be displayed by entering the Action Code D (Display). In order to utilise this facility, the system administrator must start a CFS-Holdertask under $TSOS: /ENTER $CFS.CFS.S.LMSLIB(CFSHT). For further information, see the inline description in the enter file.