Debugger Client Beta documentation: Difference between revisions

From m204wiki
Jump to navigation Jump to search
m (misc cleanup)
Line 1: Line 1:
==Introduction==
==Introduction==
This page describes any beta versions of the Janus/Tn3270 Debugger Workstation Client that
This page describes any beta versions of the Janus/TN3270 Debugger Workstation Client that
are available.
are available.  
 
==Build 63, Tag 1 Beta==
==Build 63, Tag 1 Beta==
===Run Until/White list/Black list with Daemons===
===Run Until/White list/Black list with Daemons===
When used with Model 204 Version 7.6 and up, Build 63 performs the  
When used with Model 204 Version 7.6 and up, Build 63 performs the  
procedure name matching for RUN UNTIL, White Lists and Black Lists on
procedure name matching for RUN UNTIL, White Lists and Black Lists on
DAEMONS as well as the main/master level.  Prior to this feature, matching
DAEMONS as well as the main/master level.  Prior to this feature, matching
only occurred at the main/master level. For example RUNUNTIL ''desiredProc'' will now stop
only occurred at the main/master level. For example, <code>RUNUNTIL ''desiredProc''</code> will now stop if a DAEMON includes ''desiredProc''.
if a DAEMON includes ''desiredProc''.


===HTTP PAC File URLs===
===HTTP PAC file URLs===
The Janus Debugger Client supports Proxy Auto Config (PAC) files, to
The Janus Debugger Client supports Proxy Auto Config (PAC) files, to
provide a method to control which web requests are routed through the Janus
provide a method to control which web requests are routed through the Janus
Debugger Client when Internet Explorer (IE) is used.  IE references PAC files
Debugger Client when the Internet Explorer (IE) browser is used.  IE references PAC files
with a URL.  Prior to Build 63, only file mode URLs are supported (file:), which
with a URL.  Prior to Build 63 of the Client, only file-mode URLs are supported (<code>file://</code>), which requires the PAC files generated by the Debugger Client to be stored on the local file system of the workstation running the Debugger Client.  As of version 11, IE is deprecating the use of file URLs for PAC files and wants HTTP (<code>http://</code>) URLs to be used.  Eventually file URLs will not be supported at all, hence the need for this feature.
requires the PAC files generated by the debugger client to be stored on the local file
 
system of the workstation running the debugger client.  As of version 11, IE is deprecating the use of file URLs for
The client has been modified to upload the PAC files generated in the existing "New Pac" or "Merged Pac"  modes to an HTTP server.  It had also been modified to set the PAC URL in IE to an HTTP-style URL that points to the PAC that was generated and uploaded.
PAC files and wants http (http:) URLs to be used.  Eventually file URLs will not be supported at
all, hence the need for this feature.


The client has been modified to upload the PAC files generated in the existing "New Pac" or "Merged Pac"  modes to
an HTTP server.  It had also been modified to set the PAC URL in IE to an http style URL that points to the PAC
that was generated and uploaded.
====HTTP Server requirements/setup for PAC files====
====HTTP Server requirements/setup for PAC files====
Before changing client settings you must provide an HTTP (Web) server which will hold
Before changing Client settings, you must provide an HTTP (Web) server to hold the PAC files.   
the PAC files.   
Any web server that supports HTTP PUT and GET may be used. This document provides an example of how to set up a Janus Web Server to handle HTTP-based PAC files. Note that the PAC files are temporary: when the Client starts, a new PAC is generated and uploaded. This prevents the
Any web server that supports HTTP PUT and GET may be used. This
problem of HTTP PAC files being out of date, since they are based on workstation-based configuration files which can change at any time.
document provides an example of how to set up a Janus Web Server to handle HTTP based PAC files. Note that
the PAC files are temporary; when the client starts, a new PAC is generated and uploaded. This prevents the
problem of http PAC files being out of date since they are based on workstation based configuration files which
can change at any time.


The following SOUL program takes one command line argument, a TCP/IP port number, and creates a Janus
The following SOUL program takes one command line argument, a TCP/IP port number, and creates a Janus Web server for uploading and serving PAC files:
Web server for uploading and serving PAC files:
<p class="code">begin
<p class="code">begin
   variables are undefined
   variables are undefined
Line 116: Line 107:
   %worker:run(%workForDaemon):print
   %worker:run(%workForDaemon):print
end</p>
end</p>
Since the PAC files are temporary, the are stored in a memory file (not persistent between runs).  This also means  
Since the PAC files are temporary, they are stored in a memory file (not persistent between runs).  This also means that this procedure does not need any disk files, DD cards, etc. The PAC files are stored as Model 204 procedures. The PAC file procedures created by the Client (see the following sections), have names based on the IP number of the Client workstation to avoid conflicts.
that this procedure does not need any disk files, DD cards, etc. The PAC files are stored as Model 204 procedures.
The PAC file procedures created by the client (see the following sections), have names based on the IP number of the
client workstation to avoid conflicts.


====DebuggerConfig.xml changes====
====DebuggerConfig.xml changes====
Once the HTTP server is set up to accept and serve PAC files, the debugger client configuration
Once the HTTP server is set up to accept and serve PAC files, the Debugger Client configuration
must be updated to identify it. This is done with the new httpPacURL tag in debuggerConfig.xml.
must be updated to identify it. This is done with the new <var>httpPacURL</var> tag in the debuggerConfig.xml file:
<p class="code"><debuggerConfig version="1.0">
<p class="syntax"><debuggerConfig version="1.0">
     <httpPacURL>http://''pacServerHost'':''pacServerPort''/pacman</httpPacURL></p>
     <httpPacURL>http://''pacServerHost'':''pacServerPort''/pacman</httpPacURL></p>
Where:
Where:
* pacServerHost is the host name or IP number of the PAC Janus Web Server described above.
<ul>
* pacServerPort is the port number passed the to SOUL program shown above.
<li><var class="term">pacServerHost</var> is the host name or IP number of the PAC Janus Web Server described above. </li>
 
<li><var class="term"> pacServerPort</var> is the port number passed the to SOUL program shown above. </li>
</ul>


When the debugger client is started, and '''httpPacURL''' is specified in the configuration, it is validated.
When the Debugger Client is started, and <code>httpPacURL</code> is specified in the configuration, it is validated.
Validation consists HTTP PUT and GET of a test file. If there is a problem with httpPacURL an error is displayed
Validation consists of HTTP PUT and GET of a test file. If there is a problem with <var>httpPacURL</var>, an error is displayed in the Audit tab.
in the audit tab.


====Preferences UI changes====
====Preferences UI changes====
Once the server has been set up and the client configuration includes '''httpPacURL''', the HTTP Pac feature may be enabled via preferences:
Once the server has been set up and the client configuration includes <code>httpPacURL</code>, you enable the HTTP Pac feature through user preferences:
* Start the client
<ol>
* Select File->preferences
<li>Start the client. </li>
* Select newPac or mergedPac for an IE Mode, the "PAC Options" button will be enabled
 
* Push the PAC Options button
<li>Select <code>File > preferences</code>. </li>
* You can then select file:// or http:// mode for the PAC URL.
 
As an alternative, you can use the setIEMode command which has been enhanced to support this feature.
<li>Select <code>newPac</code> or <code>mergedPac</code> for an IE Mode; this enables the <b>PAC Options</b> button. </li>
 
<li>Click the <b>PAC Options</b> button. </li>
 
<li>Select <code>file://</code> or <code>http://</code> mode for the PAC URL. </li>
</ol>
 
As an alternative, you can use the <var>setIEMode</var> command, which is enhanced to support this feature.


====SetIeMode command changes====
====SetIeMode command changes====
If a setIEMode command specifies a PAC mode (newPac or mergedPac) then you may
If a <var>setIEMode</var> command specifies a PAC mode (newPac or mergedPac), you may
specify file or http to control which type of PAC URL is used. File is the default.
specify <code>file</code> or <code>http</code> to control which type of PAC URL is used. <code>file</code> is the default:
<p class="code">setIeMode {none|proxy|newPac|mergedPac} [<u>file</u>|http]</p>
<p class="code">setIeMode {none|proxy|newPac|mergedPac} [<u>file</u>|http]</p>


====ShowIE command changes====
====ShowIE command changes====
ShowIE output has been enhanced to display URL info for any PAC file in use by the debugger client.
<var>ShowIE</var> output has been enhanced to display URL info for any PAC file in use by the Debugger Client. For example:  
For example:  
<p class="code">Current ie mode: mergedPac
<p class="code">Current ie mode: mergedPac
Current ie settings
Current ie settings
Line 169: Line 165:


====RetryHTTPPac command====
====RetryHTTPPac command====
If you have an error on the validation of the HTTP PAC server when you bring up the client, and then fix the HTTP Server, you can issue the RetryHTTPPAC command from the client as an alternative to restarting the client.
If you have an error on the validation of the HTTP PAC server when you bring up the client, and then fix the HTTP Server, you can issue the <var>RetryHTTPPAC</var> command from the client as an alternative to restarting the client.


====&&currentPacFile function added====
====&&currentPacFile function added====
The &&currentPacFile function returns the URL of the PAC file in use or "" if none.  The URL returned could bee either a file: or http: style URL.
The <var>&&currentPacFile</var> function returns the URL of the PAC file in use or <code>""</code> if none.  The URL returned could be either a <code>file:</code> or <code>http:</code> URL.
<p class="code">Command: echo &&currentPacFile
<p class="code">Command: echo &&currentPacFile
Macro message:
Macro message:
Line 178: Line 174:


====Other new commands====
====Other new commands====
As part of developing and testing the HTTP URL support, 3 additional commands were added which may also be of general use:
As part of developing and testing the HTTP URL support, three additional commands were added which may also be of general use:
*<code>httpPutFile ''file url''</code> -- Do an HTTP PUT file upload for the file and URL specified
<ul>
*<code>httpPutString ''string url''</code> -- Do an HTTP PUT file upload for the string and URL specified
<li><code>httpPutFile ''file url''</code> &mdash; Do an HTTP PUT file upload for the file and URL specified </li>
*<code>httpGet ''file url''</code> -- Do an HTTP GET for the URL specified, display in console
 
<li><code>httpPutString ''string url''</code> &mdash; Do an HTTP PUT file upload for the string and URL specified </li>
 
<li><code>httpGet ''file url''</code> &mdash; Do an HTTP GET for the URL specified, display in console </li>
</ul>

Revision as of 17:53, 29 May 2015

Introduction

This page describes any beta versions of the Janus/TN3270 Debugger Workstation Client that are available.

Build 63, Tag 1 Beta

Run Until/White list/Black list with Daemons

When used with Model 204 Version 7.6 and up, Build 63 performs the procedure name matching for RUN UNTIL, White Lists and Black Lists on DAEMONS as well as the main/master level. Prior to this feature, matching only occurred at the main/master level. For example, RUNUNTIL desiredProc will now stop if a DAEMON includes desiredProc.

HTTP PAC file URLs

The Janus Debugger Client supports Proxy Auto Config (PAC) files, to provide a method to control which web requests are routed through the Janus Debugger Client when the Internet Explorer (IE) browser is used. IE references PAC files with a URL. Prior to Build 63 of the Client, only file-mode URLs are supported (file://), which requires the PAC files generated by the Debugger Client to be stored on the local file system of the workstation running the Debugger Client. As of version 11, IE is deprecating the use of file URLs for PAC files and wants HTTP (http://) URLs to be used. Eventually file URLs will not be supported at all, hence the need for this feature.

The client has been modified to upload the PAC files generated in the existing "New Pac" or "Merged Pac" modes to an HTTP server. It had also been modified to set the PAC URL in IE to an HTTP-style URL that points to the PAC that was generated and uploaded.

HTTP Server requirements/setup for PAC files

Before changing Client settings, you must provide an HTTP (Web) server to hold the PAC files. Any web server that supports HTTP PUT and GET may be used. This document provides an example of how to set up a Janus Web Server to handle HTTP-based PAC files. Note that the PAC files are temporary: when the Client starts, a new PAC is generated and uploaded. This prevents the problem of HTTP PAC files being out of date, since they are based on workstation-based configuration files which can change at any time.

The following SOUL program takes one command line argument, a TCP/IP port number, and creates a Janus Web server for uploading and serving PAC files:

begin variables are undefined local subroutine closeFile(%iFile is string len 8 input) * Close the file whose name is passed. Messages surpressed. %rc is float $resetn('MSGCTL', 6, %rc) $close('FILE ' with %iFile) $resetn('MSGCTL', 0, %rc) end subroutine local function openFile(%iFile is string len 8 input) is float * Open the file whose name is passed and return 0 for success or * non-zero for failure. Messages surpressed. %rc is float $resetn('MSGCTL', 6, %rc) openc file %iFile $resetn('MSGCTL', 0, %rc) return $status end function * Get and validate the command line argument: port number %args is object stringlist %args = %(system):arguments:unspace:parseLines(', ') %portNumber is float if (%args:count eq 0) then print 'No port number specified' stop elseif (%args:count > 1) then print 'Too many arguments' stop elseif (%args(1) is not like '/2-5(#)') then print 'Invalid port number' stop else %portNumber = %args(1) end if %pacRepo is string len 8 initial('JDPACREP') %worker is object daemon auto new %workForDaemon is object Stringlist auto new * See if the memory file for a PAC repository is there, if not create it if (%(local):openFile(%pacRepo) eq 0) then printText Memory file {%pacRepo} already present  %(local):closeFile(%pacRepo) else printText creating memory file {%pacRepo} text to %workForDaemon = new ALLOCATE {%pacrepo} WITH MEMORY PAGES=300 CREATE {%pacrepo} PARAMETER BSIZE=1, DSIZE=250 END OPENC {%pacrepo} IN {%pacrepo} INITIALIZE CLOSE {%pacrepo} end text %worker:run(%workForDaemon):print end if * Set up a simple Janus web server with web rules for loading * serving and listing PAC files generated bythe debugger client. %portName is string len 8 initial('JDPACSRV') * Get rid of any earlier one, so this script can be rerun as needed text to %workForDaemon = new JANUS DRAIN {%portName} JANUS DELETE {%portName} end text %worker:run(%workForDaemon) * Create the server and its rules text to %workForDaemon = new * Create a web server JANUS DEFINE {%portName} {%portNumber} WEBSERV 20 TRACE 7 * Allow upload of PAC files via HTTP PUT of a URL of format /pacman/xxx.js JANUS WEB {%portName} ON PUT /PACMAN/*.JS OPEN FILE {%pacRepo} RECV *.JS BASE64 JANUS WEB {%portName} ALLOW PUT /PACMAN/*.JS * Provide HTTP GET access for URLs of format /pacman/xxx.js JANUS WEB {%portName} ON GET /PACMAN/*.JS OPEN FILE {%pacRepo} - SEND *.JS BINARY EXPIRE +0 * Start the web server JANUS START {%portName} end text %worker:run(%workForDaemon):print end

Since the PAC files are temporary, they are stored in a memory file (not persistent between runs). This also means that this procedure does not need any disk files, DD cards, etc. The PAC files are stored as Model 204 procedures. The PAC file procedures created by the Client (see the following sections), have names based on the IP number of the Client workstation to avoid conflicts.

DebuggerConfig.xml changes

Once the HTTP server is set up to accept and serve PAC files, the Debugger Client configuration must be updated to identify it. This is done with the new httpPacURL tag in the debuggerConfig.xml file:

<debuggerConfig version="1.0"> <httpPacURL>http://pacServerHost:pacServerPort/pacman</httpPacURL>

Where:

  • pacServerHost is the host name or IP number of the PAC Janus Web Server described above.
  • pacServerPort is the port number passed the to SOUL program shown above.

When the Debugger Client is started, and httpPacURL is specified in the configuration, it is validated. Validation consists of HTTP PUT and GET of a test file. If there is a problem with httpPacURL, an error is displayed in the Audit tab.

Preferences UI changes

Once the server has been set up and the client configuration includes httpPacURL, you enable the HTTP Pac feature through user preferences:

  1. Start the client.
  2. Select File > preferences.
  3. Select newPac or mergedPac for an IE Mode; this enables the PAC Options button.
  4. Click the PAC Options button.
  5. Select file:// or http:// mode for the PAC URL.

As an alternative, you can use the setIEMode command, which is enhanced to support this feature.

SetIeMode command changes

If a setIEMode command specifies a PAC mode (newPac or mergedPac), you may specify file or http to control which type of PAC URL is used. file is the default:

setIeMode {none|proxy|newPac|mergedPac} [file|http]

ShowIE command changes

ShowIE output has been enhanced to display URL info for any PAC file in use by the Debugger Client. For example:

Current ie mode: mergedPac Current ie settings ...Proxy flags=(5) ...Proxy server=() ...Proxy bypass=() ...Proxy autoConfigUrl=(http://pacServerHost:pacServerPort/pacman/PAC.10.111.2.82.JS) ...Raw flag byte=(05) ...Read from registry key=(HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings) Generated New Pac file: c:\debugger\stateFiles\debuggerInternalPac.js Added: 54 web servers from the configuration. Generated Pac File: Pac file shown here pacURLMode: http <== New line httpPacUrl='http://pacServerHost:pacServerPort/pacman/' <== New line httpPac upload filename: 'PAC.10.111.2.82.JS' <== New line

RetryHTTPPac command

If you have an error on the validation of the HTTP PAC server when you bring up the client, and then fix the HTTP Server, you can issue the RetryHTTPPAC command from the client as an alternative to restarting the client.

&&currentPacFile function added

The &&currentPacFile function returns the URL of the PAC file in use or "" if none. The URL returned could be either a file: or http: URL.

Command: echo &&currentPacFile Macro message: http://pacServerHost:pacServerPort/pacman/PAC.10.111.2.82.JS

Other new commands

As part of developing and testing the HTTP URL support, three additional commands were added which may also be of general use:

  • httpPutFile file url — Do an HTTP PUT file upload for the file and URL specified
  • httpPutString string url — Do an HTTP PUT file upload for the string and URL specified
  • httpGet file url — Do an HTTP GET for the URL specified, display in console