Browse all forums dedicated to the Rocket® COBOL product family.
Recently active
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: 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: FETCH PREVIOUS and FETCH PRIOR not working using Oracle OCI If you attempt to do the scrolloption static and the declare mycursor static If you set the following directives; sql(usecurlib=ifneeded) and sql(usecurlib=yes) when a scrolloption static you get a sql error on the open The fetch prior will give the next record not previous. Resolution: OpenESQL does not support use of scrollable cursors with Oracle OCI, i.e. when the application is compiled with the SQL(TARGETDB=ORACLEOCI) directive. The Database Access manual lists OpenESQL functionality which isn't supported with Oracle OCI. Old KB# 6956
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: 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: 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: how do you put a quote in the middle of text that you want to print? Resolution: Use 3 quotes. For example: if you want to use the string "the "special" item" define it as "the """special""" item" Old KB# 6995
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: 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
Problem: Which compiler directive initializes all the variables in a source? Resolution: DEFAULTBYTE Initializes each otherwise undefined byte of the Data Division to the character given. Syntax: >>-.----.--DEFAULTBYTE--"integer"----------->< -/- Parameters: integer ASCII code of the character, in decimal. Properties: Default: DEFAULTBYTE"00" ( Dialect ) Phase: Syntax check $SET: Initial Dependencies: Set to DEFAULTBYTE"32" immediately by CHARSET"ASCII". Set to DEFAULTBYTE"00" immediately by CHARSET"EBCDIC", MS, IBM-MS or PC1. Comments: integer is a decimal value. For example, if you want to specify an EBCDIC space use DEFAULTBYTE"64"; to specify an ASCII space use DEFAULTBYTE"32". Old KB# 6982
Problem: The Type keyword has been replaced in VB.NET to Structure. Resolution: You would define a Type in VB: Type CustFullName LastName As String * 20 '20 characters FirstName As String * 10 '10 characters End Type In VB.NET, it will have to be defined as follows: <StructLayout(LayoutKind.Sequential)> Structure CustFullName <MarshalAs(UnmanagedType.ByValTStr, SizeConst:=20)> Public LastName As String '20 characters <MarshalAs(UnmanagedType.ByValTStr, SizeConst:=10)> Public FirstName As String '10 characters End Structure Old KB# 6967
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: when opening a file in the data file editor - it is not loading the structure file that was created Resolution: if you open a file and the editor does not use the structure file automatically you can do File (form top tool bar) - datatools - load record layout if the str is in the same directory as the file with the same name - it will automatically use the str in the editor Old KB# 6958
Problem: No, add COPYEXT"CPY,COB" directive to the Project | Properties | Project directives. After adding this directive use the Project | Update all dependency to update the project. Be sure that you have only one semi-colon as the last entry within the Project directives %FILENAME COBIDY(%TARGETDIR) WB3 WB CSI ANIM EDITOR(MF2) ENSUITE(3) COPYEXT"CPY,COB" Resolution: Old KB# 6979
Problem: A .Net project reports a RTE 173 cbl_xmlio not found when executing an OPEN on an XML file Resolution: At the moment, we've only a workaround: Add the directive: $set ILPINVOKE(cblxmls.dll) to those COBOL .Net programs, which need XML You will need: $set ILPINVOKE(cblxmlm.dll) for mulit-threaded applications Old KB# 6959
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: With every attempt to print, the print job shows in the print queue as "spooling", and never changes status. On exiting the application, the job disappears from the queue. Resolution: The following settings will work once the Net Express 4.0 Application Server Service Pack (currently aps03a40.exe) has been applied. Click "Start" (button). Point "Settings" (group) and click "Printers and Faxes" (button). Click the printer-name you want to select. Right mouse click on the printer- name that you want to use and click "Properties" (button). Click "Ports" (tab) and confirm LPT? is selected. Click "Advanced" (tab). Click "Always available" (radio button). Click "Spool print documents so program finishes faster" (radio button). Click "Start printing immediately" (radio button) Click "Print Processor" (button). The default Print Pr
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: 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: On rebuilding - after upgrading Net Express from 3.1 to 4.0 - our web-project (FKWEB3.1) we get this error message. Do you have a hint?? Resolution: Net Express 4.0: You should check in your Net Express environment this: Project Build Settings -> Link -> Category 'Advanced' It could be that you have included at this point under 'Link with these OBJs' the 'FKWEB3.1_RTECFG.OBJ' more than once. Please ensure to have this OBJ only 1 time to build your application. Old KB# 6962
Problem: Using different ODBC drivers resulting in an ODBC error 900 "Invalid SQL string": EXEC SQL AT DBO PREPARE DYNSQL FROM :DB-SQL END-EXEC. Resolution: OpenESQL soes not support using the AT clause with SQL PREPARE statements, so remove the 'AT DBO' from the statement. Old KB# 7004
Problem: The error was encountered when running Net Express from a DOS prompt. The error refers to the runtime, and the compiler starts without any problems. Resolution: This occurs when there are other software products installed in the same path as the Net Express installation. In this case, some old DLL files of a previous version of Net Express were found on the path of the new Net Express installation. Removing these DLL files the problem no longer occurs. Ensure that path where you install Net Express is free of any existing Net Express installations, or other software products. Old KB# 6977
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: 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: 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
Already have an account? Login
No account yet? Create an account
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.