Status

From Br Wiki
Jump to: navigation, search

The Status (ST) command provides current information about the system. STATUS FILES prints the coordinates of a window file if a window is open. The starting and ending rows and columns are displayed. STATUS displays the number of lines read for each active procedure.

Parameters

When no parameters are entered, STATUS displays the WSID number, time, date and names of the active program and all active procedures. If no program or procedures currently exist in memory, STATUS displays the release number of the current Business Rules.

  1. Status [qualifier] -P option causes scrolling to pause after a full screen of information has been displayed. (Press <CR> for the next screen.) When the STATUS command's -P parameter is used, a digit is accepted after the first scroll (and on subsequent scrolls) to identify the number of additional lines to scroll. Pressing <ENTER> still causes an entire screen to scroll.
  2. Status [qualifier] >file-ref parameter redirects the status information to a file or to the printer.


Syntax

STATUS [<qualifier>] [{-P|>[>]<file name>}]

Status.png

Qualifiers

Following is a list of valid qualifers used with the STATUS command.

Status All

Provides complete status information. Specifying STATUS ALL is equivalent to specifying STATUS MEMORY FILES SUBSTITUTE.

Status Attributes

All Attribute settings.

Status Break

Displays all debug settings.

Status BTree_Verify

lists files being monitored

Status Colors

Shows what COLOR statements are in effect.

Status Config

Displays a list of all configurable options and their values. This includes OPTION statements, screen attributes as well as all other values that can be configured by use of the CONFIG command. Included are values that BR sets by default, in addition to those specifically overridden by the programmer or user. Most config options applied.

Status Dim

Lists all duplicate Dimmed variables as well as variables that have been used in the program but not specifically dimensioned.

Status Env

All Env settings plus ENV$("STATUS") values are output.

Output from this keyword may be filter restricted by a string argument as in:

STATUS ENV "color".

The qualifier string is case insensitive irrespective of whether it is enclosed in single or double quote marks. The string may include multiple comma separated arguments and each argument beginning with a tilde (~) implies negation. Example:

STATUS ENV "color,~printer" 

This will output all of the ENV$ strings that have the word "color" and don't have the word "printer" embedded in them:

ENV$("COLOR.NORMAL") is "#F0F0F0"
ENV$("COLOR.NORMALTEXT") is "#000000"
ENV$("COLOR.HIGHLIGHT") is "#3399FF"
ENV$("COLOR.HIGHLIGHTTEXT") is "#FFFFFF"
ENV$("COLOR.EDIT") is "#FFFFFF"
ENV$("COLOR.EDITTEXT") is "#000000"
ENV$("COLOR.3DLIGHT") is "#FFFFFF"
ENV$("COLOR.3DDARK") is "#A0A0A0"
ENV$("COLOR.3DREALLYDARK") is "#696969"
ENV$("STATUS.COLORS") is ""

This filter capability can be useful for searching for ENV$() string specifications that should be used in programs to reference specific environmental values.

Status Files

Displays the status of all open files and drive statements. Also displays the current record number, the position of all outstanding record locks, share status, type of open, record length, key length, key file starting positions (including separate listings for each field and split key), a list of reserved files, and a list of all shared drives. It also indicates when a btree2 index is running with VERIFY ON. It shows all four parameters of the drive statement.

Status Fonts

Lists installed fonts that are suitable for use with BR.

Status Keyboard

The keyboard remapping table.

Status Library

The STATUS command with the "LIBRARY" parameter instructs Business Rules to display complete information about all library linkages and all libraries that are currently loaded resident, present or as-needed. When this parameter is used, Business Rules displays a screen such as the following:

Program ID C:\\BR417\\ASNLIB.BR
Current Line =  42
C:\\BR417\\MAIN.BR       MAIN    ACTIVE  RUN  3
   FNMAIN1      C:\\BR417\\MAIN.BR
   FNRESLIB1     C:\\BR417\\RESLIB.BR
   FNPRELIB1     C:\\BR417\\PRELIB.BR
   FNASNLIB1     C:\\BR417\\ASNLIB.BR
   FNRESLIB2     C:\\BR417\\RESLIB.BR
   FNRESLIB3     C:\\BR417\\RESLIB.BR
   FNRESLIB4     C:\\BR417\\RESLIB.BR
   FNRESLIB5     C:\\BR417\\RESLIB.BR
C:\\BR417\\ASNLIB.BR      LIBRARY   ACTIVE  Exit  2
C:\\BR417\\PRELIB.BR      LIBRARY   LOADED  END  2
C:\\BR417\\RESLIB.BR      RESIDENT  ACTIVE  END  5
   FNMAIN1      C:\\BR417\\MAIN.BR
   FNRESLIB1     C:\\BR417\\MAIN.BR
   FNPRELIB1     C:\\BR417\\PRELIB.BR
   FNASNLIB1     C:\\BR417\\ASNLIB.BR

In the above display, the top "Program ID" line identifies the lowest level program, which is currently active and the "Current Line" line identifies which line of the program is active. In this example, three programs are actually active (MAIN, RESLIB and ASNLIB), but because ASNLIB is the lowest level (MAIN has called a library function in RESLIB, which has in turn called a function in ASNLIB), it is the name that is displayed.

The remaining lines of the display list all programs that are currently active or that are currently identified as resident, present or as-needed libraries. Note that each program listing consists of two parts:

1) The Program Name line, which is the main line that identifies the program, and
2) The Library Linkage table, which is a list of linked library functions.

Each of these portions of the display are described in greater detail below:

PROGRAM NAME LINE - The STATUS LIBRARY display's Program Name lines are displayed in "library precedence" order, which is that the most recently loaded libraries are displayed first. This is in accordance with Business Rules search order for library functions when an unnamed LIBRARY statement is executed.

Note, however, that although as-needed libraries are also listed in last loaded/first displayed order, they are not searched when an unnamed LIBRARY statement is executed.

Program Name lines consists of information that is presented in five columns.

1) The first column is the program name.
2) The second column identifies how the program is loaded. The entries that may appear in this column and their meanings are shown in the following table:
Entry in column 2 Meaning
MAIN Specified program is the main program
RESIDENT Specified program is a library program that is loaded resident
LIBRARY Specified program is a library is a library program that is loaded present or as-needed


The third column identifies the current status of the program. The entries that may appear in this column and their meanings are shown in the following table:

Entry in column 3 Meaning
ACTIVE The specified program is active
NOT LOADED A LIBRARY statement naming the specified program has been executed, but the library will not be loaded until the first function call to that library.
LOADED The resident or present library is currently loaded into memory, but not currently active.
RELEASED The as needed library is not currently loaded.


The fourth column identifies when global variables will be cleared for the specified library. The entries that may appear in this column and their meanings are shown in the following table:

Entry in column 4 Meaning
RUN Global Variables will be cleared when a main program is started or re-started.
END Global Variables will be cleared when the main program ends.
Exit Global Variables will be cleared each time the library is exited (after each function call to the library). This entry will appear for as needed libraries, and for resident libraries that have been identified with the LIBRARY statement's RELEASE keyword.
RETAIN Global Variables will be retained regardless of main program status. This entry will appear for resident libraries that include an OPTION RETAIN statement


The fifth and last column identifies the total number of active library links to this program. The number displayed here will always coincide with the number of times that the specified library appears in all of the library link tables that STATUS LIBRARY displays. For example, in the sample display shown above, MAIN is shown to have a total of three library links. One of these links is from the MAIN program itself (as demonstrated by the first entry in the linkage table under the MAIN listing). The remaining two links are from the RESLIB program (note that the first two entries in RESLIB's linkage table refer to the MAIN program).

The STATUS LIBRARY display's Library Linkage table lists each library function link that has been established by the topic program. The first column in this table names the function, and the second column names the library program where the function is defined.

Status Locks

A STATUS LOCKS command displays the LOGIN_NAME and WSID of each session that has the FILE$ file open. This can help a person determine who has a locked file or record. Also STATUS LOCKS FileName displays who has the FileName file open.

Status Memory

Displays the total number of memory bytes available, the total number of bytes being used for code, and the total number of bytes being used for data. On Linux systems, the amount listed for bytes available should be considered non-applicable.

Status Printer

All Printer statements.

Status Stacks

The STATUS command with the STACKS parameter instructs Business Rules to display complete information about how each of Business Rules memory stacks are being used. It is very useful for monitoring an application's memory usage. When this parameter is used, Business Rules displays a screen such as the following:

The first column in the STATUS STACKS listing identifies each of the stack areas that Business Rules uses. The Flow stack keeps track of GOSUBs and user-defined function calls. The For stack tracks FOR / NEXT loop processing. The RPN and work stacks are temporary storage areas, which are reduced for each function call level.

The second column identifies the maximum amount of memory area configured for use by the specified stack. See the FLOWSTACK, FORSTACK, RPNSTACK and WORKSTACK specifications in the BRConfig.sys chapter for more information on how to change the maximum configured area for a particular stack.

The third column identifies the amount of memory area currently being used by the specified stack.

The fourth column identifies the amount of memory area still available for use by the specified stack.

STATUS STACKS shows a function call trace.

Status Substitute

Displays a list of all active file name substitutions as specified by the BRConfig.sys file or CONFIG command.

Status Users

Displays the workstation ID's and names of all users on the network.