Browse all forums dedicated to the Rocket® COBOL product family.
Recently active
Problem: This indicates that the Oracle client does not know what instance to connect to, or which TNS alias to use. Resolution: On Windows, using an Oracle connection without the instance name requires the LOCAL environment variable to be set to an instance defined to the system. The example below requires LOCAL to be set because the instance is not specified. EXEC SQL CONNECT :USERNAME IDENTIFIED BY :PASSWD END-EXEC. The following example defines the instance, and will therefore override the value set in LOCAL if it has been set. EXEC SQL CONNECT :USERID IDENTIFIED BY :PASSWD USING :INSTANCE END-EXEC. Old KB# 7005
Problem: The customer created a solution using Visual Studio .Net that contains two projects. He had a main Console application that invoked a wrapper class in a different Assembly. From this class, he was attempting to do a PIatform Invoke call to an unmanaged .dll developed in Net Express 4.0. He added a reference to the unmanaged .dll in his project but when he tried to do a dynamic call at run-time to call the unmanaged .dll he received a run-time error 174 (imported file not found) Resolution: The problem is that when using .NET Platform Invoke from a COBOL program, you cannot call the unmanaged .dll with a dynamic call. You must use a static CALL "progname" instead and the case of "progname" must exactly match what is used as the entry point name in the unmanaged .dll. So if the CASE or FOLD-CALL-NAME directives are being used then you must call the program using the appropriate name that will be generated
Problem: The code pasted below is just on add-on to the cobreg demo available on MF WEB Netx sample page; the initial cobreg demo reads & updates registries on the "local" computer. With the code pasted below, you'll be able to read registry on a remote computer. cobreg: Accessing the Windows registry with COBOL and writing or reading information from the registry Resolution: use the WIN32 API RegConnectRegistry as pasted below ========================================================== RegConnectRegistry: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sysinfo/base/regconnectregistry.asp MSDN registry APIs http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sysinfo/base/registry_functions.asp ========================================================== ... working-storage section. 01 ComputerName pic x(100) value z"\\\\NameOfTheRemoteComputer". 01 result long. ... &nb
Problem: An stack overflow error or a stackOverflowException can be easily corrected by increasing the size of the stack. Knowledge base article 19007 - "STACK OVERFLOW, EXCEPTION_STACK_OVERFLOW <- increase stack's size of the process" describes how can you set up an environment variable to define a specific stack size when the executable is being created when linking. This article describes how you can increase the size of an executable once it has already being created. This affects to any kind of executable, even a .NET executable. Resolution: There is an SDK utility called editbin that allows you to change the stack size for an executable (amongst other things). Open a command prompt and cd to the directory where your application executable is, and then run: editbin /stack:nnn application.exe where application.exe is the name of the executable of your application and nnn is the number of bytes in siz
Problem: When dragging the mouse from a location to another in the Net Express editor, the lines are selected, not by columns. Resolution: The default behavior is to select line blocks. This can be changed to select column blocks from the Edit options: click Options from the menu click Edit... click on the Blocks / Clipboard tab select "Select column blocks when dragging, except when in the prefix area" Old KB# 6981
Problem: Launch the Run method of the COM WORD application component. in the COBOL sample pasted below, the cobol program opens a file test.doc ( located on the current directory ) which contains a macro named MaMacro which receives a String parameter: Sub MaMacro(machaine As String) MsgBox machaine End Sub Resolution: *> This is required for OLE applications $set ooctrl( P) program-id. worddemo. class-control. *> OLE automation classes wordapp is class "$OLE$word.application" . working-storage section.
Problem: A program contians some DOS LineDraw characters which can be seen correctly in Net Express but which cannot be printed with Windows. Not even using various PC_PRINTER routines will solve the problemt. The characters can be printed correctly in DOS on port LPT1 but are treated differently when using a deskjet or laser printer via the USB port. Resolution: The issue lies with the DOS LineDraw characters which are part of the OEM character set. The problems is that Windows Fonts are based on the ANSI code page. In the Net Express IDE you can edit in an OEM font by using Options/Edit/Dos Compatability. If you switch to OEM then you should see that characters correctly in the editor. However when printing you get this problem. What some customers have done in the past is to install and use a font that supports the OEM Line Draw characters. Microsoft used to ship a font "MS LineDraw" for this which can be found at: http://www
Problem: How is a cross reference listing created using Net Express 4.0? Resolution: Use a "Cobol.dir" file (a text file consisting of compiler directives, one directive per line) with the following directives, to create a basic compiler listing file with Data Map and Cross Reference listings appended to the end of the source file listing. ....show-dir.......... - Shows the content of directives files in the source listing. ....setting"col3"..... - Includes a list of the directive settings, three directives per line in columns. ....confirm........... - Echos all subsequent directives to the screen. ....list().............. - Causes the listing file to be named "source-name.lst", where "source-name" ....................... - is the basename of the program being compiled. ....xref............... - Makes the Compiler produce a cross-reference listing. ....datamap......... - Causes the Compiler to output information o
Problem: The program, calling a sub program multiple times, runs successfully with the return code=0 before stop run. However, the error level check in bat file returns 3. Resolution: You need to use the "returning" keyword on the goback, or stop run statement, to ensure the return-code is appropriately passed : For example: IF RETURN-CODE = 0 GOBACK RETURNING 0 or: STOP RUN RETURNING RETURN-CODE Old KB# 7006
Problem: Animation fails with 114, using a Net Express 3.1 project which has been migrated to Net Express 4.0 Resolution: When migrating a Net Express project, transfer only the project directory files. Do not include the DEBUG and RELEASE directories. Old KB# 6984
Problem: When installing to a machine that doesn't have a c:\\ drive you may see the message appear: "Cannot write to silent script log file. Unable to continue install" Resolution: The setup process attempts to create a log file on the c:\\ drive by default, and if you don't have a c:\\ drive, it can't write the log. To avoid this problem, you can redirect the log file elsewhere by supplying a parameter to the setup command: From a command prompt, change directory to the location of the setup.exe (let's assume this is on D:\\) and type the command: D:\\setup\\setup.exe /ini=d:\\setup\\nxsetup.ini /logfile=x:\\thelogfile.txt This will run the setup.exe from your D:\\ drive and write the logfile to your x:\\ drive. Old KB# 6993
Problem: There are various ways of installing Application Server for Net Express on client machines. Sometimes, given that client machines may be spread over large territories, it is not always practical to install locally. NB. there is a slight name change between versions. In 4.0 and previous versions the runtime is called Application Server for NetExpress whilst in 5.0 onwards the runtime is simply called Server for NetExpress. The procedure descibed below remains the same regardless. Resolution: Install Application Server and software application (executable) on the server machine, after ensuring that Net Express (development environment) is not installed. Install the license key details on the server machine, ensuring the license key adequately covers the aniticpated number of users. Then, on each client machine, change the path settings of the environment variables PATH, COB
Problem: Is it possible to link to existing btrieve module in net Express with .Net? Resolution: Making calls to the Btrieve entry point "_BTRV" cannot be done directly from a .NET managed code program because the Windows 32-bit Btrieve library WBTRV32.DLL is, itself, an unmanaged Windows .DLL. In order for a .NET COBOL program to call an unmanaged .DLL, it must use the PInvoke functionality. In this case, you cannot use the _btrv.gnt file as only Windows .DLLs can be added as references to a .NET project. Use the following steps: 1. In the Net Express\\base\\lib directory their is a file called _btrv.obj. Create a Net Express 4.0 project which packages this file as MFBTRV.dll (or any name) and under Link options the entry point name should be "_BTRV". 2. In your .NET project, right click on the References folder and select "Add Reference". Use the Browse
Problem: RTS 173 error on CHECKFIL Resolution: Recompile program with initcall"utils.lbr" to resolve the issue. utils.lbr contains the module and with the above directive that library is opened at the start of the module. Old KB# 6947
Problem: Net Express 3.1 is certified on Windows 95 (Windows 98 recommended), Windows NT V4.0 (Windows NT Service Pack #5 or later), Windows 2000, or Windows XP Professional. Net Express 4.0 is certified on Windows 98, Windows NT 4.0 (Windows NT Service Pack #6a or later), Windows 2000, Windows Server 2003 or Windows XP Professional. Net Express 5.0 is certified on Windows 98, Windows NT 4.0 (Windows NT Service Pack #6a or later), Windows 2000, Windows Server 2003 or Windows XP Professional and Windows Vista. NetExpress 5.1 is certified on Windows Server 2008, Windows Vista, Windows Server 2003, Windows XP or Windows 2000 Resolution: Net Express 4.0, 5.0 and 5.1 are certified on Windows Server 2003. Old KB# 6960
Problem: 114 on 'acccgi' when running a COBOL CGI Application under Windows 2003 / IIS6 Resolution: This problem has been fixed in the runtime fixpack for Net Express 3.1 and 4.0. Old KB# 6952
Problem: Sometimes it is a requirement to distribute an application in only one .exe file. How do you do this with an application that uses Dialog System for its user interface and therefore, contains its screensets in many .gs files that can not be linked? Resolution: It is not possible to include screensets (.gs files) within a .exe. If what you want is to distribute everything within one file, your only alternative is to create a .lbr library file. In the earlier COBOL systems (Workbench), you could distribute an application as .int or .gnt files and any other read-only files packaged in .lbr files. You would have to include a small additional .exe file, called a trigger, to start the application. In Workbench you would use the Build utility to create this trigger, but this utility has not been included in Net Express. In Net Express, you distribute applications linked into .exe and .dll files. .int and .gnt files are only used for running within the ID
Problem: Net Express doesn't appear to integrate with Seapine Surround source control, how do I make that relationship. Resolution: You can use any SCCS that conforms to the Microsoft Common SCC Interface spec. The Net Express Source Control module will use the SCCS interface specified in the registry under MyComputer\\HKEY_LOCAL_MACHINE\\SOFTWARE\\SourceCodeControlProvider\\ProviderRegKey. The last SCCS to be installed should be register itself here, so the last SCCS installed on the machine will be the one used by the Net Express Source Control module. Make sure that Net Express is not up when software is installed, Net Express only looks for a Source Code Control System when it is first opened. Opening Net Express after the installation will show SourceControl in the menu bar. Old KB# 6955
Problem: When executing a program from command-line, and you need to pass the program a parameter, use: "accept dataname from command-line" which gathers the parameter following the program name typed at the prompt. Resolution: When you execute your program from a command prompt like this: C:\\MYAPPS\\SYS4044B.EXE DAILY SUMMARY define this variable in working-storage (the actual name isn't critical): 77 runTimeParameter pic x(255). and use this statement in your procedure to collect the parameter: accept runTimeParameter from COMMAND-LINE If you were to display runTimeParameter you would see this output: DAILY SUMMARY KB19232 6/30/2004 Old KB# 7007
Problem: A Java application is trying to call a COBOL program, which does nothing except throw out some displays. The code in the Java is extracted from the MF examples: private void callInterface() { int retcode; Object[] params = {record}; try { retcode = runtime.cobcall("TESTCALL", params); } catch (Exception e) { e.printStackTrace(); } } "record" implements "DataType" as required. When executing this (as a JUnit test within Eclipse), this gives a CobolException - program not found.&
Problem: Is it possible to add version information to a COBOL .dll or .exe? Resolution: It is possible to add your own version details to an .exe or .dll. First of all, you need to create an .RC file. Create the .RC file using a text editor - an example of the contents and parameters of the .RC file are below: 1 VERSIONINFO FILEVERSION 1,1,1,1 &nbs
Problem: This document details what is needed to configure and use the Micro Focus External File Handler, File Tracing. When problems occur while using Micro Focus indexed files, such as data and/or index corruption, you may be asked to enable File Tracing in your application, in order to assist Micro Focus SupportLine personnel in resolving the file issues. After enabling File Tracing, you would run your application in the normal manner with the goal of reproducing the reported error within the indexed files. File Tracing will cause each file handling I-O operation, including data, to be written to the trace file. Micro Focus personnel can then use a special debugging tool to replay the trace file step-by-step using a "before" image of the files being traced. This allows us to locate the particular I-O operation which may have caused the files to become corrupt. For more general information on how to configure the External File Handler and a
Problem: how to read parameters from a file? Resolution: To read paramaters from a file, use the INDD compiler directive: INDD Causes ACCEPT statements to be read from a specified file. Syntax: >>-.---.--.----.--INDD--"fname"------------.>< -/- ---- --INDD--------------------- -NO- Parameters: fname Name of file to be read for the specified ACCEPT statements. When this parameter is not specified the name used is SYSIN. Properties: Default: NOINDD Phase: Syntax check $SET: Initial Comments: When INDD is specified, all format 1 ACCEPT statements which either have no FROM option or specify FROM SYSIN (or the mnemonic-name associated with SYSIN) are transformed into READ statements, reading from a file with the specified external filename. The filename can be mapped onto physical filenames in the same way as other files with
Problem: 114 error when loading Net Express. Resolution: Please try the following when you get this error: 1) Open a Net Express command prompt: Start, Programs, Micro Focus Net Express 4.0, Net Express Command Prompt 2) At the command line enter: mfnetx /n If this works, then you probably have a corrupt project (.APP) file. You will need to recreate your project file from scratch. If this is not the issue then look at the following: Lets take a step back and see if anything runs. As before, open a Net Express command prompt and enter "COBOL" at the command line followed by pressing RETURN. Does this give the 114 error ? If not (control and C breaks out of the compiler), then go to the following folder: \\net express\\base\\demo\\adsamp and enter: cobol adsamp anim; Does this work? If it does, then the next step is to ensure that your installation o
Problem: File Type: LINE SEQUENTIAL File Charasteristics: Tab-delimited fields If you view a record via the "Examine" option when animating, or directly via the data file editor in a project, the tab characters are not visible. If, when in the animator, you toggle to view in HEX, it shows spaces where the tab characters are assumed to be. Resolution: To see the tab characters, you need to set the EXPANDTAB runtime configuration switch to OFF. You can do this by setting this in either extfh.cfg (which is the default file-handler configuration file) in the local directory, or by using the EXTFH environment variable to specify a different file-handler configuration file. For example: set EXTFH=C:\\working directory\\my.cfg An example of a config file is as follows (either my.cfg or extfh.cfg): [XFH-DEFAULT] EXPANDTAB=OFF By default EXPANDTAB is ON. This means that if the file is viewed via either the data fi
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.