PLBLinux Program Execution
Most of the supplied utilities (those with an extension of .plc), plbcmp and all programs compiled by plbcmp require the PL/B runtime to execute. plb is executed as follows:
or
or
Parameters:
-r
An option that indicates a ROLLOUT return or rollback.
-e
An option that displays the expiration date for timestamped runtimes.
options
One or more of the options listed below.
plc
The name of a previously compiled program.
...
Other information that is placed into the S$CMDLIN system variable.
Note the following:
Valid {options} are as follows:
|
Option |
Meaning |
|
b |
force screen controls S0 through S9 to update screen |
|
d |
initiate the interactive, on-line debugging mode |
|
cgi <filename> |
normally used to access CGI data that has been stored into the <filename> by a PWS server which has accepted a REST request to be processed. This option causes the <filename> file CGI data to be preloaded into memory before a PL/B program starts executing. After the PL/B program starts executing, the RUNTIME object method 'CgiString' can be used to retrieve the data using CGI keywords. |
|
e |
display user count information for all runtimes and expiration time for time stamped runtimes.
Specialized Licensed User Count data in condensed form is available as follows:
'-e0' - The current authorized user license count is given. Example of output for command 'plb -e0': 64 User License!
'-e1' - The current user-client count in use. Example of output for command 'plb -e1': 2 User-clients used!
'-e2' - The current user-client count available for use. Example of output for command 'plb -e2': 62 User-clients available!
'-e3' - The current summary of all user license counters. Example of output for command 'plb -e3': 64 User License!, 2 User-clients used!, 62 User-clients available! |
|
g |
allocate memory for global data area (Default is 65536 bytes) |
|
ms |
override number of subwindows that can be saved (Default is 10) |
|
n |
disable the effect the Linux hangup signal {SIGHUP(2)} has on an executing program |
|
s {sd} |
override the default screen definition file selection |
|
t |
sets the wait time in seconds to receive a complete function key |
|
p {pd} |
override the default printer device/file |
|
q |
causes the runtime to start program execution in a quiet mode. The PLB runtime does not output the Sunbelt runtime greeting\banner when the quiet mode option is used. Also, see the runtime 'PLB_QUIET' keyword. |
The PLB runtimes support specialized internal debugging capabilities that record PLB program execution data. There are two data collection formats that are generated depending on the debug option '-dN' that is specified.
A. Special Internal Runtime Debugging
The first internal debugging data collection format is invoked using the '-dN' options where the N can be a 0, 1, 2, 3, or 4 value. This type of internal debugging data should ONLY need to be collected upon request by Sunbelt personnel where the resulting debug data is to be analyzed by Sunbelt personnel. In general, this form of internal debugging allows Sunbelt personnel to determine the PLB program flow and the exact PLB instructions that are being executed for some PLB program scenario being evaluated. The following descriptions apply when using the form of internal debugging:
|
Option |
Meaning |
|
d0 |
This option identifies that the runtime internal debugging is turned off. This is the default behavior when the '-dN' option is not specified. |
|
d1 |
This option is reserved for Sunbelt use. |
|
d2 |
This option invokes runtime internal debugging level 2 to create and store runtime administrative data into a single file named as follows. When this runtime debug option is invoked, the PLB runtime requires that an end-user start the program execution by responding to an appropriate debug start dialog for a Windows runtime or a key input for a Linux runtime.
'plbwin.log' - Windows runtime
'plb.log' - Linux runtime
'plbwin_NNNN.log' - Windows Plbserve runtime where NNNN is a process or thread ID of the runtime.
'plb_NNNN.log' - Linux Plbserve runtime where NNNN is a process or thread ID of the runtime. |
|
d3 |
This option invokes runtime internal debugging level 3 that records both runtime administrative data as described for '-d2' along with additional PLB program execution data that is captured in a snapshot of PLB program instruction codes. Like the '-d2' option, this '-d3' debug option requires the end-user to start the PLB internal debugging session manually the same as described in the '-d2' option. When this '-d3' debug option is used, the PLB runtime captures and stores program codes into alternating log files named as follows. These log files are limited to a size of '100,000' bytes resulting in a maximum program execution window of '200,000' program instruction codes that can be analyzed by the Sunbelt personnel.
'plbwin1.log' and 'plbwin2.log' - Windows runtime program debug log files.
'plb1.log' and 'plb2.log' - Linux runtime program debug log files.
'plbwin1_NNNN.log' or 'plbwin2_NNNN.log' - Windows Plbserve runtime program logfiles where NNNN is a process or thread ID of the runtime child task.
'plb1_NNNN.log' or 'plb2_NNNN.log' - Linux Plbserve runtime runtime program log files where NNNN is a process or thread ID of the runtime child task. |
|
d4 |
This option invokes runtime internal debugging the same as described for the '-d3' option except the end-user is NOT required to manually start the debugging session. |
Note:
These runtime internal debugging options are only intended to capture information that can be analyzed by Sunbelt personnel when evaluating some end-user scenario that requires details not available otherwise.
The PLB runtime keyword named 'PLB_DEBUG={type}' causes the runtimes to automatically invoke internal runtime debugging. See the description of this keyword for more details. The '-d2', '-d3', or '-d4' options override the 'PLB_DEBUG' keyword setting when both the keyword and command line option is being used.
Starting with changes made in release 9.5C, any log files are created by default in the directory location specified by the 'PLB_SYSTEM' keyword.
Also, implemented in release 9.5C, additional internal runtime keywords have been implemented to expand the debugging flexibility. These runtime keywords should only be used in special debugging scenarios.
PLB_DEBUGLOGFILESIZE=NNNNNNNNN - This keyword changes the default internal log file size from '100,000' to some other size. The 'NNNNNNNNN' can be specified with a value of '65535' to '500000000'. The 'NNNNNNNNN' value applies to each program log file created as described for the '-d3' option.
PLB_DEBUGLOGNAME={name} - This keyword specifies a user defined log file {name} to be used in place of 'plbwin' or 'plb' as described for the '-d2' and '-d3' debug options. In this case, the {name} does not contain the path.
PLB_DEBUGLOGPATH={path} - This keyword specifies a user defined {path} where the log files as described for the '-d2' and '-d3' options are to be created. In this case, the {path} is used instead of the pathspecified by the 'PLB_SYSTEM' keyword for the location of internal debug log files.
The PLB internal runtime debugging may be changed at the discretion of the Sunbelt personnel to allow special internal debugging data to be collected and analyzed when resolving end-user issues.
B. Runtime Profiling
A second internal debugging data collection format is implemented to generate runtime program data such that an end-user can execute a PLB profile analyzer program when evaluating PLB performance issues. The profile internal debugging can be invoked using the '-dN' options where the N can be a 5, 6, 7, or 8 value. The PLB profiling data is stored in binary format to allow as much data as possible to be collected while minimizing the profile data file size. The following descriptions apply when using the form of profile debugging:
|
Option |
Meaning |
|
d5 |
This option enables the runtime data collection of PLB program instruction codes and times that allow a PLB profiling program to analyze the performance of PLB instructions and logic. The '-d5' option, requires the end-user to start the PLB profile debugging session manually using a dialog for a Windows runtime and a keyed response for a Linux runtime. When the '-d5' option is used, a profile data file is created as follows. There is no limit on the profile data file size.
'profile_NNNN.log' - Windows runtime profile log file where NNNN is a process or thread ID of the runtime task that is executing. |
|
d6 |
This option enables the runtime profiling data the same as described for the '-d5' option with the exception that the debugging session is started without end-user manual interaction. |
|
d7 |
This option enables the runtime profiling data the same as described for the '-d5' option except it is only used for the PLB Application Server (plbserve). This profile debug option allows an expanded 'plbserve' data format to be collected and analyzed for the Application Server programs. |
|
d8 |
This option enables the runtime profiling data the same as described for the '-d7' option with the exception that the debugging session is started without end-user manual interaction. |
Any of the options are accepted in either upper or lower case.
If {plc} is not specified, plb searches the current directory then each one in the PLB_PATH environment variable list, if specified, (i.e., the Search Paths) for the default ANSWER and MASTER files specified by the screen definition file in use.
If the -d option is specified, plb searches the PLB_SYSTEM directory for the file sundbug.plc. If unable to locate it, error U11 occurs. Once located, it then searches the Search Paths for the code program ({plc}) and its symbol table. If a valid symbol file is not found, the message `Symbol table not found or invalid. Debugger disabled' is displayed.
If {scrndef} is specified with the -s option, it is used instead of the screen definition name built by appending .def to the user's TERM entry.
If {prtdev} is specified with the -p option, it is used in place of the default printer device/file in the screen definition file (see makedef).
If the -r option is used, the screen definition file, printer device/file and program in use at the time of the ROLLOUT are re-used and cannot be overridden. The rollfile used for the return cannot be overridden and is named PORT####.ROL, where #### is the current port number.
Any Linux special command line capabilities, such as redirection or command line expansion of wildcards, remain in effect during the initial loading of plb.
See Also: Compiler and Runtime Options
![]() |