How can Net Express be used for remote debugging of multiple simultaneous sessions of applications running under IBM TX Series?

How can Net Express be used for remote debugging of multiple simultaneous sessions of applications running under IBM TX Series?

Problem:

Is it possible to have multiple remote debugging sessions running simultaneously using Net Express 5.1 on the local computer and Server 5.1 running on the remote computer when applications to be debugged are running under control of IBM TX Series?

Resolution:

If you wish to have multiple remote debugging sessions running simultaneously then you need to call CBL_DEBUG_START in your application to be debugged and pass it a unique id. Although this call is not documented in Net Express, it is however supported. It is documented under Server Express and Visual COBOL.

There is a problem with using this approach for debugging programs that run under the TX Series Windows service in that it will hang when the call to CBL_DEBUG_START is made. This has been fixed in Net Express 5.1 wrappack 8, hotfix 3.

Use the following as an example of how to use CBL_DEBUG_START:

On remote computer:
1. start animserv port(51000)

On local computer:
1. Net Express Animate settings set to debug remotely, name of server and port number 51000 specified.
2. Net Express Animate settings do NOT set wait for animatable attachment option which is used when using CBL_DEBUGBREAK.
3. Start Net Express Animate at and enter in field:   
     %XUSER1    
where %X is required and is followed by the unique id that you are setting in the CBL_DEBUG_START call.

On remote computer:
1. Run the COBOL application under TX Series that has a call to CBL_DEBUG_START in it

When the CBL_DEBUG_START is encountered, if someone is waiting for the ID it specifies then it will debug, otherwise it will carry on running (depending on the flags)

The following is a sample where one program used USER1 as an id and the other used USER2.

       id division.
       program-id.   testdebug2.
       working-storage section.
       01 field1      pic x(5).
       01 any-key     pic x.
       01 flags       pic x(4)  comp-5 value 1.
       01 ws-time-out pic s9(9) comp-5 value -1.
       01 identifier  pic x(6)  value z"USER2".
       01 status-code pic x(4)  comp-5 value 0.
       procedure division.

           call "CBL_DEBUG_START"
              using by value flags
                             ws-time-out
                    by reference identifier
              returning     status-code
           end-call

           display "testdebug2"
           move all "a" to field1
           display field1
           accept any-key
           stop run.

 

DISCLAIMER:

Some content on Community Tips & Information pages is not officially supported by Micro Focus. Please refer to our Terms of Use for more detail.
Top Contributors
Version history
Revision #:
1 of 1
Last update:
‎2013-05-30 11:06
Updated by:
 
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.