*ONECOUNTER (GETMODE)
The *ONECOUNTER list control returns one or more of the runtime counters. This keyword requires that the input variable contain the name of one or more runtime counters. The current values of the specified runtime counters are returned in the destination variable.
*ONECOUNTER={values}
Where:
{values}
A character string variable that recieves the runtime counter values.
Flags: EOS
Note:
The counters are 64 bit values that continually increment as instructions are executed by the runtime. If a counter overflows, the counter value rolls over to a zero value and continues incrementing. As a program executes, a given counters is always greater than or equal to the last value unless there is a rollover condition.
The EOS flag is set if the requested runtime counters are too large to fit into the destination variable and results in truncated or lost data.
The {values} variable must contain the name or names of the runtime counters that are returned. The format of the input {values} string is a follows:
Example of Returned Data:
An application may retrieve the counters at any time during the execution of a program.
The runtime counters are implemented for each PL/B program instance that is executed. The runtime does not count operations for multiple processes and place the results into a single counter. Since FORK causes a separate process to be invoked, a program can use the 'SETMODE *CLEARCOUNTERS' keyword to optionally zero the counters for a forked process. A forked process has runtime counters separate from the parent process and therefore does not cause a conflict.
A user application is responsible for retrieving, saving, and analyzing the runtime counter values.
The program can use the EXPLODE instruction to extract the counter data from the {values} data stream.
The application must write a generic routine to extract the counter data. The order of the counter name and value combinations may change for later releases.
For a 64 bit counter value, the largest required FORM variable size for any given counter value is twenty (20) characters.
The runtime counters are always active and cannot be disabled. However, the 'SETMODE *CLEARCOUNTERS' keyword zeros all of the runtime counters.
The counters that are maintained by the runtime are as follows:
|
Counter Name |
Operation Comments |
|
BATCH |
INSTRUCTION |
|
CLOSE |
CLOSE FILE |
|
CLOSEI |
CLOSE IFILE |
|
CLOSEA |
CLOSE AFILE |
|
DELETE |
DELETE FILE |
|
DELETEI |
DELETE IFILE |
|
DELETEDI |
DELETED IFILE |
|
DELETEDKI |
DELETEDK IFILE |
|
DELETEKI |
DELETEK IFILE |
|
DELETEA |
DELETE AFILE |
|
DELETEKA |
DELETEK AFILE |
|
ERASE |
INSTRUCTION |
|
EXECUTE |
INSTRUCTION |
|
FILEPI |
INSTRUCTION |
|
FINDDIR |
INSTRUCTION |
|
FINDFILE |
INSTRUCTION |
|
FLUSH |
INSTRUCTION |
|
FPOSIT |
FPOSIT FILE/AFILE/IFILE |
|
FPOSITA |
FPOSITA AFILE |
|
INSERTI |
INSERT IFILE |
|
INSERTA |
INSERT AFILE |
|
OPEN |
OPEN FILE |
|
OPENI |
OPEN IFILE |
|
OPENA |
OPEN AFILE |
|
OPENF |
OPEN FILELIST |
|
POSITEOF |
POSITEOF FILE/AFILE/IFILE |
|
PREPARE |
PREPARE FILE |
|
PREPAREI |
PREPARE IFILE |
|
PREPAREA |
PREPARE AFILE |
|
READ |
READ FILE |
|
READLK |
READLK FILE |
|
READI |
READ IFILE |
|
READKEY |
READKEY IFILE |
|
READKP |
READKP IFILE |
|
READKPLK |
READKPLK IFILE |
|
READKSLK |
READKSLK IFILE |
|
READKS |
READKS IFILE |
|
READLKI |
READLK IFILE |
|
READA |
READ AFILE |
|
READLKA |
READLK AFILE |
|
READKG |
READKG AFILE |
|
READKGLK |
READKGLK AFILE |
|
READKGP |
READKGP AFILE |
|
READKGPLK |
READKGPLK AFILE |
|
RENAME |
INSTRUCTION |
|
REPOSIT |
REPOSIT FILE |
|
REPOSITA |
REPOSITA AFILE |
|
UNLOCK |
INSTRUCTION |
|
UPDATE |
UPDATE FILE |
|
UPDATETAB |
UPDATETAB FILE |
|
UPDATEI |
UPDATE IFILE |
|
UPDATEA |
UPDATE AFILE |
|
WEOF |
WEOF FILE |
|
WRITE |
WRITE FILE |
|
WRITETAB |
WRITETAB FILE |
|
WRITEI |
WRITE IFILE |
|
WRITEA |
WRITE AFILE |
|
CHAIN |
CHAIN INSTRUCTION |
|
FORK |
FORK INSTRUCTION |
|
ROLLOUT |
ROLLOUT INSTRUCTION |
|
SPLOPEN |
SPLOPEN INSTRUCTION |
|
SPLOPENPF |
SPLOPEN PFILE |
|
SPLCLOSEPF |
SPLCLOSE PFILE |
|
SPLCLOSE |
INSTRUCTION |
|
PRINTPF |
PRINT PFILE |
|
PRINTSPL |
PRINT (SPLOPEN) |
|
|
|
|
RELJOB |
RELJOB INSTRUCTION |
|
RELEASE |
RELEASE INSTRUCTION |
See Also: List Controls (GETMODE), GETMODE
![]() |