TN3270 DEBUG Syntax: Difference between revisions
No edit summary |
No edit summary |
||
Line 2: | Line 2: | ||
The TN3270 DEBUG command can be issued from the Model 204 command prompt or in a procedure: | The TN3270 DEBUG command can be issued from the Model 204 command prompt or in a procedure: | ||
TN3270 DEBUG {[[TN3270 DEBUG Syntax#TN3270 DEBUG ON|ON]]|[[TN3270 DEBUG Syntax#TN3270 DEBUG OFF|OFF]]|[[ | TN3270 DEBUG {[[TN3270 DEBUG Syntax#TN3270 DEBUG ON|ON]]|[[TN3270 DEBUG Syntax#TN3270 DEBUG OFF|OFF]]|[[TN3270 DEBUG WAIT|WAIT]]|SUSPEND|RESUME|CLIENTCOMMAND|STATUS} | ||
*<span class="f_ListBul1">[[TN3270 DEBUG Syntax#TN3270 DEBUG ON|ON]] starts a </span><var>TN3270 Debugger</var><span class="f_ListBul1"> session (it requires additional parameters). It can also be used for [[debug_webthreads_siriusdeb.html|debugging Janus Web threads]]. </span> | *<span class="f_ListBul1">[[TN3270 DEBUG Syntax#TN3270 DEBUG ON|ON]] starts a </span><var>TN3270 Debugger</var><span class="f_ListBul1"> session (it requires additional parameters). It can also be used for [[debug_webthreads_siriusdeb.html|debugging Janus Web threads]]. </span> | ||
*<span class="f_ListBul1">[[TN3270 DEBUG Syntax#TN3270 DEBUG OFF|OFF]] stops a debugging session.</span> | *<span class="f_ListBul1">[[TN3270 DEBUG Syntax#TN3270 DEBUG OFF|OFF]] stops a debugging session.</span> | ||
*<span class="f_ListBul1">[[ | *<span class="f_ListBul1">[[TN3270 DEBUG WAIT|WAIT]] is an alternative to ON for starting a debug session ([[TN3270 DEBUG WAIT|see the next section for details]])</span> | ||
*<span class="f_ListBul1">[[TN3270 DEBUG Syntax#TN3270 DEBUG SUSPEND|SUSPEND]] and [[TN3270 DEBUG Syntax#TN3270 DEBUG RESUME|RESUME]] discontinue (temporarily) and resume a debugging session, respectively </span> | *<span class="f_ListBul1">[[TN3270 DEBUG Syntax#TN3270 DEBUG SUSPEND|SUSPEND]] and [[TN3270 DEBUG Syntax#TN3270 DEBUG RESUME|RESUME]] discontinue (temporarily) and resume a debugging session, respectively </span> | ||
*<span class="f_ListBul1">[[TN3270 DEBUG Syntax#TN3270 DEBUG CLIENTCOMMAND|CLIENTCOMMAND]] sends a command to the Debugger Client. </span> | *<span class="f_ListBul1">[[TN3270 DEBUG Syntax#TN3270 DEBUG CLIENTCOMMAND|CLIENTCOMMAND]] sends a command to the Debugger Client. </span> | ||
Line 12: | Line 12: | ||
=== TN3270 DEBUG ON === | === TN3270 DEBUG ON === | ||
<span class="f_Para">To initiate a </span><var>TN3270 Debugger</var><span class="f_Para"> session from the mainframe, you issue TN3270 DEBUG ON from the </span>< | <span class="f_Para">To initiate a </span><var>TN3270 Debugger</var><span class="f_Para"> session from the mainframe, you issue TN3270 DEBUG ON from the </span><var>Model 204</var><span class="f_Para"> command prompt or within a BATCH2 input stream or procedure. The command requires the parameters described below that identify the network ports and the workstation used in your debugging session. The values of these parameters are established during product installation: </span> | ||
<p class="syntax"><span class="f_Syntax" style="font-size: 16px;">TN3270 DEBUG ON [janClientPort] [pcHost] [pcPort] [workerPort]</span></p> | <p class="syntax"><span class="f_Syntax" style="font-size: 16px;">TN3270 DEBUG ON [janClientPort] [pcHost] [pcPort] [workerPort]</span></p> | ||
Line 20: | Line 20: | ||
|width="50%"| '''''janClientPort''''' | |width="50%"| '''''janClientPort''''' | ||
|width="50%"| | |width="50%"| | ||
<span class="f_DefListDD">The name of the Janus client socket port that [[Define and start a client socket port (TN3270 Debugger only)|is defined]] for the </span>< | <span class="f_DefListDD">The name of the Janus client socket port that [[Define and start a client socket port (TN3270 Debugger only)|is defined]] for the </span><var>TN3270 Debugger</var><span class="f_DefListDD"> to use to contact the Debugger Client workstation. </span> | ||
<span class="f_DefListDD">The default value is an asterisk (*), which means to use a Janus port whose definition includes the MASTER parameter. Such a port can be accessed on a Debugger connection request without specifying its port name on the </span><span class="f_Para">TN3270</span><span class="f_DefListDD"> DEBUG ON command.</span> | <span class="f_DefListDD">The default value is an asterisk (*), which means to use a Janus port whose definition includes the MASTER parameter. Such a port can be accessed on a Debugger connection request without specifying its port name on the </span><span class="f_Para">TN3270</span><span class="f_DefListDD"> DEBUG ON command.</span> | ||
Line 42: | Line 42: | ||
| <span class="term">'''workerPort'''</span><span class="f_DefListDD"> </span> | | <span class="term">'''workerPort'''</span><span class="f_DefListDD"> </span> | ||
| | | | ||
<span class="f_DefListDD">The port number in your Online that [[ | <span class="f_DefListDD">The port number in your Online that [[Define and start the Debugger Server port|is defined]] for worker threads. This can be the same port number that provides worker threads for the </span><span class="f_Product">Janus Debugger,</span><span class="f_DefListDD"> as well.</span> | ||
<span class="f_DefListDD">The </span><var>Model 204</var><span class="f_DefListDD"> User 0 parameter SDEBWRKP sets the default value of this port. Valid values for this parameter, which is also resettable by the system manager, range from 0 to 65535. If 0, no default is set, and the parameter's value must be explicitly specified in the </span><span class="f_Para">TN3270</span><span class="f_DefListDD"> DEBUG ON command. A </span><span class="f_Monospace">VIEW SDEBWRKP</span><span class="f_DefListDD"> command returns the current setting of SDEBWRKP.</span> | <span class="f_DefListDD">The </span><var>Model 204</var><span class="f_DefListDD"> User 0 parameter SDEBWRKP sets the default value of this port. Valid values for this parameter, which is also resettable by the system manager, range from 0 to 65535. If 0, no default is set, and the parameter's value must be explicitly specified in the </span><span class="f_Para">TN3270</span><span class="f_DefListDD"> DEBUG ON command. A </span><span class="f_Monospace">VIEW SDEBWRKP</span><span class="f_DefListDD"> command returns the current setting of SDEBWRKP.</span> | ||
Line 94: | Line 94: | ||
=== TN3270 DEBUG OFF === | === TN3270 DEBUG OFF === | ||
<span class="f_Para">TN3270 DEBUG OFF stops a debugging session. The command is issued as is from </span><span class="f_ListBul2">the </span>< | <span class="f_Para">TN3270 DEBUG OFF stops a debugging session. The command is issued as is from </span><span class="f_ListBul2">the </span><var>Model 204</var><span class="f_ListBul2"> command prompt (or from your BATCH2 stream or a procedure); it </span><span class="f_Para">has no additional parameters. </span> | ||
<span class="f_Para">After issuing the command, you should receive this response in </span><var>Model 204</var><span class="f_Para">:</span> | <span class="f_Para">After issuing the command, you should receive this response in </span><var>Model 204</var><span class="f_Para">:</span> | ||
Line 102: | Line 102: | ||
<span class="f_Para">On the Debugger Client, </span><span class="f_Monospace">Online has disconnected</span><span class="f_Para"> displays in the Status bar.</span> | <span class="f_Para">On the Debugger Client, </span><span class="f_Monospace">Online has disconnected</span><span class="f_Para"> displays in the Status bar.</span> | ||
<span class="f_ListNum1">You can also turn off the </span><span class="f_Product">TN3270 Debugger </span><span class="f_Para">by logging off of </span>< | <span class="f_ListNum1">You can also turn off the </span><span class="f_Product">TN3270 Debugger </span><span class="f_Para">by logging off of </span><var>Model 204</var><span class="f_Para"> (any logoff is an implied TN3270 DEBUG OFF). </span> | ||
<span class="f_Para">The </span><span class="term">turnOffDebugging</span><span class="f_Para"> [[Introducing the configurable components#Commands|mappable command]] for a Client button, hot key, or macro is equivalent to TN3270 DEBUG OFF. This alternative lets you turn off the Debugger at any time during the debugging of a program, and it provides even more flexibility than using a procedure to issue TN3270 DEBUG OFF.</span> | <span class="f_Para">The </span><span class="term">turnOffDebugging</span><span class="f_Para"> [[Introducing the configurable components#Commands|mappable command]] for a Client button, hot key, or macro is equivalent to TN3270 DEBUG OFF. This alternative lets you turn off the Debugger at any time during the debugging of a program, and it provides even more flexibility than using a procedure to issue TN3270 DEBUG OFF.</span> | ||
Line 132: | Line 132: | ||
<span class="f_CodeExample">TN3270 DEBUG CLIENTCOMMAND 'macro mymacro %s' </span></p> | <span class="f_CodeExample">TN3270 DEBUG CLIENTCOMMAND 'macro mymacro %s' </span></p> | ||
<span class="f_Para">If the </span>< | <span class="f_Para">If the </span><var>TN3270 Debugger</var><span class="f_Para"> is not currently in a session, issuing TN3270 DEBUG CLIENTCOMMAND has no effect and receives a harmless message. </span> | ||
<span class="f_Para">You can also execute Client commands and macros from the [[ | <span class="f_Para">You can also execute Client commands and macros from the [[Using the DebuggerTools class methods#ClientCommand method|clientCommand]] and [[Using the DebuggerTools class methods#command method|command]] methods of the DebuggerTools class. </span> | ||
=== TN3270 DEBUG RESUME === | === TN3270 DEBUG RESUME === | ||
Line 146: | Line 146: | ||
<span class="f_Para">You can use TN3270 DEBUG OFF (or the </span><span class="f_Monospace">[[turnOffDebugging command|turnOffDebugging]]</span><span class="f_Para"> mappable Client command) to turn off debugging for a thread for which debugging is resumed. </span> | <span class="f_Para">You can use TN3270 DEBUG OFF (or the </span><span class="f_Monospace">[[turnOffDebugging command|turnOffDebugging]]</span><span class="f_Para"> mappable Client command) to turn off debugging for a thread for which debugging is resumed. </span> | ||
<span class="f_Notes">After a successful </span><span class="f_Para">TN3270</span><span class="f_Notes"> DEBUG RESUME, the Client restores any [[ | <span class="f_Notes">After a successful </span><span class="f_Para">TN3270</span><span class="f_Notes"> DEBUG RESUME, the Client restores any [[Running only to listed procedures|White List]] or [[Running to a specific procedure|Run Until]] processing that was active prior to the</span><span class="f_ListBul1"> </span><span class="f_Para">TN3270</span><span class="f_ListBul1"> DEBUG SUSPEND</span><span class="f_Notes">. </span> | ||
=== TN3270 DEBUG STATUS === | === TN3270 DEBUG STATUS === | ||
<span class="f_Para">TN3270 DEBUG STATUS provides a simple status report about the worker threads for </span><var>TN3270 Debugger</var><span class="f_Para"> sessions, </span>< | <span class="f_Para">TN3270 DEBUG STATUS provides a simple status report about the worker threads for </span><var>TN3270 Debugger</var><span class="f_Para"> sessions, </span><var>Janus Debugger</var><span class="f_Para"> sessions, or both for a given </span><vavr>Model 204</var><span class="f_Para"> Online. </span> | ||
<span class="f_Para">The command is issued as is from </span><span class="f_ListBul2">the </span>< | <span class="f_Para">The command is issued as is from </span><span class="f_ListBul2">the </span><var>Model 204</var><span class="f_ListBul2"> command prompt (or at the end of your BATCH2 stream); it </span><span class="f_Para">has no arguments. After issuing the command, you receive a display like the following: </span> | ||
<p class="syntax"><span class="f_CodeExample">*** Janus/TN3270 Debugger status: Total workers=12 </span> | <p class="syntax"><span class="f_CodeExample">*** Janus/TN3270 Debugger status: Total workers=12 </span> | ||
Line 168: | Line 168: | ||
{| | {| | ||
| <span class="f_DefListDD">'''Total workers''' </span> | | <span class="f_DefListDD">'''Total workers''' </span> | ||
| <span class="f_DefListDD">The number of workers created with the [[ | | <span class="f_DefListDD">The number of workers created with the [[Set Model 204 system parameters|DEBUGMAX]] User 0 parameter </span> | ||
|- | |- | ||
| <span class="f_DefListDD">'''Janus Debugger Sessions'''</span> | | <span class="f_DefListDD">'''Janus Debugger Sessions'''</span> | ||
| <span class="f_DefListDD">Worker threads currently being used for </span>< | | <span class="f_DefListDD">Worker threads currently being used for </span><var>Janus Debugger</var><span class="f_DefListDD"> sessions, if any </span> | ||
|- | |- | ||
| <span class="f_DefListDD">'''TN3270 Debugger Sessions'''</span> | | <span class="f_DefListDD">'''TN3270 Debugger Sessions'''</span> | ||
| <span class="f_DefListDD">Worker threads currently being used for </span>< | | <span class="f_DefListDD">Worker threads currently being used for </span><var>TN3270 Debugger</var><span class="f_DefListDD"> sessions</span> | ||
|- | |- | ||
| <span class="f_DefListDD">'''Total Active Sessions''' </span> | | <span class="f_DefListDD">'''Total Active Sessions''' </span> | ||
| < | | <var>Janus Debugger</var><span class="f_DefListDD"> Sessions + </span><var>TN3270 Debugger</var><span class="f_DefListDD"> Sessions </span> | ||
|- | |- | ||
| <span class="f_DefListDD">'''Draining''' </span> | | <span class="f_DefListDD">'''Draining''' </span> | ||
Line 186: | Line 186: | ||
|- | |- | ||
| <span class="f_DefListDD">'''Session HWM'''</span> | | <span class="f_DefListDD">'''Session HWM'''</span> | ||
| <span class="f_DefListDD">The greatest value that the number of concurrent users has reached, per Debugger product (</span>< | | <span class="f_DefListDD">The greatest value that the number of concurrent users has reached, per Debugger product (</span><var>Janus Debugger</var><span class="f_DefListDD"> and </span><var>TN3270 Debugger</var><span class="f_DefListDD">) since the Online was started. </span> | ||
|} | |} | ||
[[Category:Debugger Home]] | [[Category:Debugger Home]] |
Revision as of 03:35, 19 November 2022
The TN3270 DEBUG command can be issued from the Model 204 command prompt or in a procedure:
TN3270 DEBUG {ON|OFF|WAIT|SUSPEND|RESUME|CLIENTCOMMAND|STATUS}
- ON starts a TN3270 Debugger session (it requires additional parameters). It can also be used for debugging Janus Web threads.
- OFF stops a debugging session.
- WAIT is an alternative to ON for starting a debug session (see the next section for details)
- SUSPEND and RESUME discontinue (temporarily) and resume a debugging session, respectively
- CLIENTCOMMAND sends a command to the Debugger Client.
- STATUS produces a report about usage of the Janus Debugger and the TN3270 Debugger.
TN3270 DEBUG ON
To initiate a TN3270 Debugger session from the mainframe, you issue TN3270 DEBUG ON from the Model 204 command prompt or within a BATCH2 input stream or procedure. The command requires the parameters described below that identify the network ports and the workstation used in your debugging session. The values of these parameters are established during product installation:
TN3270 DEBUG ON [janClientPort] [pcHost] [pcPort] [workerPort]
where:
janClientPort |
The name of the Janus client socket port that is defined for the TN3270 Debugger to use to contact the Debugger Client workstation. The default value is an asterisk (*), which means to use a Janus port whose definition includes the MASTER parameter. Such a port can be accessed on a Debugger connection request without specifying its port name on the TN3270 DEBUG ON command. This port must be started. |
pcHost |
The workstation running the Debugger Client. This may be an IP number or a DNS name, as described during product installation. The default value is a period (.), which means to use the IP address of the machine from which the TN3270 session was initiated. |
pcPort |
The workstation port number on which the Debugger Client is listening. As described during product installation, this is typically 8081. The Model 204 User 0 parameter SDEBGUIP sets the default value of this port. Valid values for this parameter, which is also resettable by the system manager, range from 0 to 65535. If 0, no default is set, and the parameter's value must be explicitly specified in the TN3270 DEBUG ON command. A VIEW SDEBGUIP command returns the current setting of SDEBGUIP. Note: As shown in an example below, to omit an explicit specification of pcPort (letting it default to the setting of SDEBGUIP) but still provide an explicit value for workerPort, use an asterisk (*) for the missing pcPort specification to indicate the respective position of the parameter values. |
workerPort |
The port number in your Online that is defined for worker threads. This can be the same port number that provides worker threads for the Janus Debugger, as well. The Model 204 User 0 parameter SDEBWRKP sets the default value of this port. Valid values for this parameter, which is also resettable by the system manager, range from 0 to 65535. If 0, no default is set, and the parameter's value must be explicitly specified in the TN3270 DEBUG ON command. A VIEW SDEBWRKP command returns the current setting of SDEBWRKP. |
For example:
TN3270 DEBUG ON DEBCLIENT 198.242.244.235 8081 3226
After issuing the command, you receive a message similar to this:
*** MSIR.0915: Debugging is on; client is 198.242.244.235 port 8081, sessionID: 00000069D812279
If you had set the workstation and worker port numbers with the SDEBGUIP and SDEBWRKP User 0 parameters, as revealed by a VIEW command:
VIEW SDEBGUIP,SDEBWRKP SDEBGUIP 8081 TN3270 DEBUG DEFAULT GUI PORT NUMBER SDEBWRKP 3226 TN3270 DEBUG DEFAULT WORKER PORT NUMBER
The previous DEBUG ON command could be simplified:
TN3270 DEBUG ON DEBCLIENT 198.242.244.235
In this case, you receive different confirmation messages:
*** MSIR.0942: TN3270 Debugger GUI port defaulted to 8081 *** MSIR.0942: TN3270 Debugger Worker port defaulted to 3226 *** MSIR.0915: Debugging is on: client is 198.242.244.235 port 8081, sessionID: sessionID: 00000069D812279
You can also use asterisks to indicate that the port defaults are to be taken. These two commands are equivalent:
TN3270 DEBUG ON DEBCLIENT 198.242.244.235 * * TN3270 DEBUG ON DEBCLIENT 198.242.244.235
You receive an error message if you use either of the above commands without having set the default port values. To take the GUI port default but specify a value for the worker port, you must use an asterisk in the GUI port position:
TN3270 DEBUG ON DEBCLIENT 198.242.244.235 * 3226
You can further simplify the connection command by taking advantage of the janClientPort and pcHost parameter defaults. If the DEBCLIENT port is defined with the MASTER parameter, and SDEBGUIP and SDEBWRKP are as above, these commands are equivalent:
TN3270 DEBUG ON * . TN3270 DEBUG ON
On the Debugger Client, Connection from Online displays in the Status bar after the DEBUG ON command is issued. This indicates that the Debugger is "on" and awaiting the next program to debug.
After the command runs successfully, any User Language program you initiate from the Model 204 command line will appear in the Source Code tab of the Debugger Client GUI for debugging.
TN3270 DEBUG OFF
TN3270 DEBUG OFF stops a debugging session. The command is issued as is from the Model 204 command prompt (or from your BATCH2 stream or a procedure); it has no additional parameters.
After issuing the command, you should receive this response in Model 204:
*** MSIR.0913: TN3270 Debugger is now off
On the Debugger Client, Online has disconnected displays in the Status bar.
You can also turn off the TN3270 Debugger by logging off of Model 204 (any logoff is an implied TN3270 DEBUG OFF).
The turnOffDebugging mappable command for a Client button, hot key, or macro is equivalent to TN3270 DEBUG OFF. This alternative lets you turn off the Debugger at any time during the debugging of a program, and it provides even more flexibility than using a procedure to issue TN3270 DEBUG OFF.
TN3270 DEBUG SUSPEND
TN3270 DEBUG SUSPEND immediately discontinues the debugging of the current request, but preserves the connection from the Online thread to the Debugger Client (that is, debugging is inactive but in a state where it can be readily reactivated). Debugging can continue if a TN3270 DEBUG RESUME command is issued from the command line or in an included procedure.
Issuing TN3270 DEBUG SUSPEND has no effect and receives a harmless error message in either of these cases:
- Debugging is not currently active for this thread (via TN3270 DEBUG ON or TN3270 DEBUG RESUME).
- Debugging is already suspended (via TN3270 DEBUG SUSPEND).
Once you suspend debugging, the current program (if any) executes immediately, and the Debugger continues in the suspended state until you issue a TN3270 DEBUG RESUME or a TN3270 DEBUG OFF command. While debugging is suspended, you can execute Model 204 commands from the command line as usual; the difference between debugging being suspended and being off is that the Client remains in a "waiting" state.
TN3270 DEBUG CLIENTCOMMAND
TN3270 DEBUG CLIENTCOMMAND lets you specify a command or macro to be invoked by the Client. The single parameter of TN3270 DEBUG CLIENTCOMMAND is the command or macro you want to send, specified without regard for case:
TN3270 DEBUG CLIENTCOMMAND command
If command is preceded by a keyword or followed by parameter(s), such a "clause" must be quoted. See the examples below.
If command is not qualified by the keyword command or macro, the Debugger Client searches first for a macro named command, then for a Client command named command. You can use the command or macro keyword to search exclusively for a specified command or exclusively for a specific macro. The macro search is restricted to the Client installation folder or the designated macro folder.
Three examples follow:
TN3270 DEBUG CLIENTCOMMAND clearWatch TN3270 DEBUG CLIENTCOMMAND 'addwatch %watchthis' TN3270 DEBUG CLIENTCOMMAND 'macro mymacro %s'
If the TN3270 Debugger is not currently in a session, issuing TN3270 DEBUG CLIENTCOMMAND has no effect and receives a harmless message.
You can also execute Client commands and macros from the clientCommand and command methods of the DebuggerTools class.
TN3270 DEBUG RESUME
TN3270 DEBUG RESUME lets you resume debugging that was previously suspended with TN3270 DEBUG SUSPEND. When you issue TN3270 DEBUG RESUME (from the command line or in a procedure) while debugging is suspended, the Debugger immediately returns to normal debugging mode.
Issuing TN3270 DEBUG RESUME has no effect and receives a harmless error message in either of these cases:
- Debugging is already active for this thread (via TN3270 DEBUG ON or TN3270 DEBUG RESUME).
- Debugging is currently off (via TN3270 DEBUG OFF or because it has yet to be initiated for this thread via TN3270 DEBUG ON).
You can use TN3270 DEBUG OFF (or the turnOffDebugging mappable Client command) to turn off debugging for a thread for which debugging is resumed.
After a successful TN3270 DEBUG RESUME, the Client restores any White List or Run Until processing that was active prior to the TN3270 DEBUG SUSPEND.
TN3270 DEBUG STATUS
TN3270 DEBUG STATUS provides a simple status report about the worker threads for TN3270 Debugger sessions, Janus Debugger sessions, or both for a given <vavr>Model 204 Online.
The command is issued as is from the Model 204 command prompt (or at the end of your BATCH2 stream); it has no arguments. After issuing the command, you receive a display like the following:
*** Janus/TN3270 Debugger status: Total workers=12 *** Janus/TN3270 Debugger status: Janus Debugger Sessions=3 *** Janus/TN3270 Debugger status: TN3270 Debugger Sessions=1 *** Janus/TN3270 Debugger status: Total Active Sessions=4 *** Janus/TN3270 Debugger status: Draining=0 *** Janus/TN3270 Debugger status: Available=8 *** Janus/TN3270 Debugger status: Janus Debugger Session HWM=5 *** Janus/TN3270 Debugger status: TN3270 Debugger Session HWM=1
where:
Total workers | The number of workers created with the DEBUGMAX User 0 parameter |
Janus Debugger Sessions | Worker threads currently being used for Janus Debugger sessions, if any |
TN3270 Debugger Sessions | Worker threads currently being used for TN3270 Debugger sessions |
Total Active Sessions | Janus Debugger Sessions + TN3270 Debugger Sessions |
Draining | Workers that are transitioning from Active to Available |
Available | Total workers: (Total Active Sessions + Draining) |
Session HWM | The greatest value that the number of concurrent users has reached, per Debugger product (Janus Debugger and TN3270 Debugger) since the Online was started. |