Highlighted
Absent Member.
Absent Member.
5317 views

cbl_debugbreak not working

Jump to solution

[Migrated content. Thread originally posted on 07 June 2011]

Hi,

I am using the cbl_debugbreak call in the code.

I have created an executable which I am testing , how ever the code does not seem to stop at the call , what could be missing ? the idy file is in the same directory as well.

This used to work effortlessly in Netexpress 3.1 how ever in 5.1 it seems to ignore it.

I am developing a transaction monitor service application executable using fujitsu UTM .

Thanks for your help.

PTeng
0 Likes
1 Solution

Accepted Solutions
Highlighted
Absent Member.
Absent Member.

RE: cbl_debugbreak not working

Jump to solution
Hello Chris,

I have created an incident recently. Meanwhile I have managed as a workaround to do everything as a Nx5.1 project and I am able to debug when I start the TP monitor from NetExtress using appropriate command line parameters.

I am using Fujitsu Universal Transaction Monitor (UTM).

Thanks Again
PTeng

View solution in original post

0 Likes
14 Replies
Highlighted
Absent Member.
Absent Member.

RE: cbl_debugbreak not working

Jump to solution
Hi,
It could be a registry issue. Can you check you have an entry in

HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Micro Focus\NetExpress\5.1\COBOL\5.1\Config (if you're not running on a 64bit OS you should omit the Wow6432Node)

You should have dynamic_debug_cmd_ptrace with a value of "C:\nx51\Base\BIN\Mfnetx.exe" /JITP:%%P%lX%%%lX (obviously the path will be different)

Keith
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: cbl_debugbreak not working

Jump to solution
Hello Keith,

I have the below registry node

HKEY_LOCAL_MACHINE\SOFTWARE\Micro Focus\NetExpress\5.1\COBOL\5.1\Config with key and value

dynamic_debug_cmd_ptrace = "C:\Program Files\Micro Focus\Net Express 5.1\Base\BIN\Mfnetx.exe" /JITP:%%P%lX%%%lX

I do not have the entry HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Micro Focus\NetExpress\5.1\COBOL\5.1\Config

Thanks
-PTeng
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: cbl_debugbreak not working

Jump to solution
Thats a shame. I could only get it to fail on my machine by removing that entry...
You could check the setting of 'error handling' in the Animate options dialog. You could also try coding an error in your program - eg. call a nonexistent program - as this should trigger the same mechanisms.
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: cbl_debugbreak not working

Jump to solution
hello again,

Not sure where is the Animate "error handling" options, in fact one of the condition in the code that I am trying to debug is that a cobol code (in form of a .dll) that I am trying to invoke is giving a run time error 173 although the dll is in the same directory. One more thing I would like to mention is that If I build a stand alone .exe composed of a single cobol program with a cbl_debugbreak in, it triggers the animator window, how ever when the executable that I am testing is composed of a c code object (generated from visual studio) and cobol objects generated from Netexpress 5.1 it does not seem to work. Could it be any other setting / environment variable ?
0 Likes
Highlighted
Micro Focus Expert
Micro Focus Expert

RE: cbl_debugbreak not working

Jump to solution
Are you compiling this as a 64-bit executable using P64 directive?

You might try starting the IDE and selecting Wait for animatible attachment from Animate Settings and then press start animating.

When cbl_debugbreak is hit it should start.
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: cbl_debugbreak not working

Jump to solution
Hello,

Its a 32 bit code.
I did try "wait for animatable attachment" option too, but that too did not help.
Could it be to do with any of my environment variables ?

-Pteng
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: cbl_debugbreak not working

Jump to solution
The RETURN-CODE is set to 000000001 after the call (obviously indicating that the call failed), how ever the rest of the program code executes successfully.
0 Likes
Highlighted
Micro Focus Expert
Micro Focus Expert

RE: cbl_debugbreak not working

Jump to solution
Is this application running under control of a Windows Service under Windows 7?
There are some issues with doing this because Microsoft changed Windows so that Windows Services can no longer interact with the desktop and therefore cbl_debugbreak will not work.

I have seen this problem with trying to use cbl_debugbreak to debug a DB2 stored procedure under Windows 7. It will not work because DB2 is running as a Windows Service...
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: cbl_debugbreak not working

Jump to solution
Hello Chris,

No its not a windows service, but will eventualy run as a windows service once the testing is over. Its windows 2003 server in my case. Are there any settings that I am missing. It used to run under Nx3.1 and once I uninstalled Nx3.1 and started with Nx5.1 it stopped to work. Are there any env variables that I may be missing. Here are my settings ... Also I have compiled with the ANIM directive.

ALLUSERSPROFILE=C:\Documents and Settings\All Users
APPDATA=C:\Documents and Settings\pteng\Application Data
CLASSPATH=.;C:\openUTM-JConnect\lib\jconnect.jar;C:\PROGRA~1\IBM\SQLLIB\java\db2java.zip;C:\PROGRA~1\IBM\SQLLIB\java\db2jcc.jar;C:\PROGRA~1\IBM\SQLLIB\java\sqlj.zip;C:\PROGRA~1\IBM\SQLLIB\java\db2jcc_license_cu.jar;C:\PROGRA~1\IBM\SQLLIB\bin;C:\PROGRA~1\IBM\SQLLIB\java\common.jar;C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE;
CLIENTNAME=GBC8828C
COBCPY=.;C:\COPYBOOKS;C:\openUTM-Server\copy-cobol85
COBPATH=C:\Program Files\Micro Focus\Net Express 5.1\Base\Bin
CommonProgramFiles=C:\Program Files\Common Files
COMPUTERNAME=XXXX-DL140-1
ComSpec=C:\WINDOWS\system32\cmd.exe
DB2INSTANCE=DB2
EDITOR=NOTEPAD
FP_NO_HOST_CHECK=NO
HOMEDRIVE=C:
HOMEPATH=\Documents and Settings\pteng
INCLUDE=C:\Program Files\Microsoft SDKs\Windows\v7.0A\Include;C:\PROGRA~1\IBM\SQLLIB\INCLUDE;C:\PROGRA~1\IBM\SQLLIB\LIB;C:\openUTM-Server\include;C:\Program Files\Micro Focus\Net Express 5.1\Base\INCLUDE;C:\COPYBOOKS
JV-FUNC-COUNT=00378
JV-FUNC-SIZE=00210
JV-FUNCCNT=00378
JV-FUNCSIZ=00210
JV-FUNCVER=002
JV-ROLE-COUNT=00068
JV-ROLE-SIZE=00057
JV-ROLESIZ=00057
JV-ROLEVER=001
KDCS_C_DEBUG=YES
LANG=en
LIB=C:\Program Files\Microsoft SDKs\Windows\v7.0A\Lib;C:\Program Files\Microsoft Visual Studio 10.0\VC\lib;C:\Program Files\Micro Focus\Net Express 5.1\Base\Lib;C:\PROGRA~1\IBM\SQLLIB\LIB;C:\openUTM-Server\sys;C:\Program Files\MERANT\Net Express\Base\BIN;C:\oracle\product\11.2.0\dbhome_2\precomp\LIB;C:\oracle\product\11.2.0\dbhome_2\OCI\lib\MSVC;C:\oracle\product\11.2.0\dbhome_2\RDBMS\XA
LOGONSERVER=\\VOSA-DL140-1
NUMBER_OF_PROCESSORS=1
ORACLE_BASE=C:\oracle\product\11.2.0\dbhome_2\inventory
ORACLE_HOME=C:\oracle\product\11.2.0\dbhome_2
ORACLE_SID=VIMOTCAT
OS=Windows_NT
Path=.;C:\oracle\product\11.2.0\dbhome_2\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\system32\wbem;c:\program files\ibm\gsk8\lib;C:\PROGRA~1\IBM\SQLLIB\BIN;C:\PROGRA~1\IBM\SQLLIB\FUNCTION;C:\PROGRA~1\IBM\SQLLIB\SAMPLES\REPL;c:\Program Files\Microsoft SQL Server\100\Tools\Binn\;c:\Program Files\Microsoft SQL Server\100\DTS\Binn\;C:\PCMX-32\bin;C:\openUTM-Server\ex;C:\Program Files\Microsoft Visual Studio 10.0\VC\bin;C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE;C:\Program Files\Java\jdk1.6.0_16\bin;C:\Program Files\Micro Focus\Net Express 5.1\Packages;C:\Program Files\Micro Focus\Net Express 5.1\Base\Bin
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH
PROCESSOR_ARCHITECTURE=x86
PROCESSOR_IDENTIFIER=x86 Family 15 Model 4 Stepping 1, GenuineIntel
PROCESSOR_LEVEL=15
PROCESSOR_REVISION=0401
ProgramFiles=C:\Program Files
PROMPT=$P$G
SESSIONNAME=RDP-Tcp#121
SystemDrive=C:
SystemRoot=C:\WINDOWS
TEMP=C:\DOCUME~1\pteng\LOCALS~1\Temp\2
TMP=C:\DOCUME~1\pteng\LOCALS~1\Temp\2
USERDOMAIN=VOSA-DL140-1
USERNAME=pteng
USERPROFILE=C:\Documents and Settings\pteng
UTMPATH=C:\openUTM-Server
UTM_ABORT_WITH_EXCEPTION=Y
UTM_BREAK_BEFORE_DUMP=Y
UTM_BREAK_BEFORE_KCSTRMA=Y
UTM_CORE_DUMP=Y
UTM_IPC_EXTP_LETTER=16
UTM_IPC_LETTER=9
UTM_MAIN_DEBUG=Y
UTM_MAIN_KILL_TIME=3
UTM_MSG_DATE=Y
UTM_MSG_PID=Y
UTM_NET_COMMON_WAIT=Y
UTM_NET_SELECT_TIME=100
UTM_OSS_SHM_BASE=0x40000000
UTM_REDIRECT_FILES=YES
VS100COMNTOOLS=C:\Program Files\Microsoft Visual Studio 10.0\Common7\Tools\
windir=C:\WINDOWS
0 Likes
Highlighted
Micro Focus Expert
Micro Focus Expert

RE: cbl_debugbreak not working

Jump to solution
Perhaps you have a mixture of 3.1 and 5.1 compiled modules?
I can see in your lib setting that you are still pointing to a 3.1 folder in C:\Program Files\MERANT\Net Express\Base\BIN.

You should make sure that all references are to 5.1 only and that ALL modules in your application have been recompiled with 5.1.

It may be worth the trouble to uninstall/reinstall the 5.1 product to make sure the registry keys are all correct.
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: cbl_debugbreak not working

Jump to solution
Thank you Chris for pointing that out, I have corrected that now. The folder for 3.1 did not exist even though the LIB pointed to it. All the modules have been compiled using NX5.1 and the problem still exists. I will check if we can uninstall and reinstall again. As I stated earlier a simple standalone exe of one cobol program with cbl_debugbreak does trigger the animator how ever when we have a combination of c objects and cobol objects under the control of a TP monitor it does not work.
0 Likes
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.