Browse all forums dedicated to the Rocket® COBOL product family.
Recently active
Problem: Using the call X"A7" function 17 to hide the cursor does not work, a thin line persists on the screen. Resolution: The call-by-number call X"A7" function 17 cannot be used to set the cursor to invisible (hidden). It is possible to hide the cursor in a character-mode linked program (EXE build). The CBL_SET_CSR_POS can be used instead of call X"A7". See online help. Or the WinApis CreateFile and SetConsoleCursorInfo. The attached demo shows, how to do each of them. Attachments: Curs-off.zip Old KB# 3875
Problem: If you are using extfh using direct calls how can you determine the record size of a file ? Resolution: To get the record size you would need to use the Special Operation opcode 06. This will return record length for files that have file header information. This is documented in the file handler documentation supplied with the product. Old KB# 3891#AcuCobol#RMCOBOL#COBOL#netexpress#ServerExpress
Problem: How can you access an App.config file from COBOL in .Net ? For example you may want to store database connection details in an XML Config file and retrieve them at runtime. Resolution: A demo of how to access an XML Config files is attached to this. Some example code to do this is:- $set sourceformat"variable" program-id. ConfigReader. ***************************************************** * * Author - David Sands (Micro Focus Technical Support EMEA) * * Purpose - Show how to access appSettings config data that is *  
Problem: In particular, I'm looking for documentation on how to use the Net Express Application Server process. We did find info on the run.exe program, but am having difficulty in trying to get displays to be redirected to an output file for future review. Is there any documentation available to help us with the Application Server Runtime environment? Resolution: This product provides all the support files necessary to support the execution of COBOL application programs. The way in which Applcation Server gets used is the execution of a COBOL application program. When you create your COBOL application program check the "Dynamic" checkbox and your program will look to the registry on whatever computer it is running to determine the location of the COBOL Run-time files necessary to support execution of the program. If you don't use the "Dynamic" checkbox you must set the PATH and COBDIR environment variables to point t
Problem: Starting rebuild Rebuilding M:\\vf\\SRC-CBL\\ne40\\ALPPEDIT.CBL Rebuilding RELEASE\\ALPPEDIT.exe Creating library RELEASE\\ALPPEDIT.lib and object RELEASE\\ALPPEDIT.exp ALPPEDIT.OBJ : error LNK2001: unresolved external symbol _oops ALPPEDIT.OBJ : error LNK2001: unresolved external symbol _oopsgetclassobject ALPPEDIT.OBJ : error LNK2001: unresolved external symbol _oopssetparaminfo ALPPEDIT.OBJ : error LNK2001: unresolved external symbol _oopsresolve RELEASE\\ALPPEDIT.exe : fatal error LNK1120: 4 unresolved externals Rebuild complete with errors Resolution: - within the IDE, right click on the EXE or DLL - select "Build settings...", tab "Link" - change "category" from General to Advanced - enter in "Link with these LIBs:" "oopss.
Problem: WrapPack install may report that some of FixPacks failed to be applied. It is normal that some FixPacks will not be applied if the associated components (e.g Dialog System, SQL Option for DB2, etc.) are not installed, but this Knowledgebase article addresses a failure to apply FixPacks for installed components. Resolution: The install program (Micro Focus Web Installer) does not handle well paths with $ or %, e.g. C:\\DOCUME~1\\$235\\LOCALS~1\\Temp\\ or C:\\DOCUME~1\\#5\\LOCALS~1\\Temp\\ This is a limitation in the install product, which is no longer used by Micro Focus for its new products. All new products are using Microsoft Installer (MSI), and this handles paths with $ and %. Due to this limitation, WrapPack may fail to apply certain FixPacks if the directory where the TEMP environment variable contains $ or %. The workaround is to point the TEMP environment variable to a directory that does not contain these two characters (e.g. c
Problem: This article discusses the Consolidated Tracing Facility (CTF), which is now part of the functionality offered in the latest versions of Net Express and Server Express. Resolution: Overview CTF provides reliable, fast, and configurable tracing capabilities. Eventually it will interleave trace events output from all the components involved in running applications. At present the runtime system (RTS) is the only enabled component: all components are expected to convert to use CTF as their tracing mechanism in future releases of Micro Focus products. CTF is therefore a 'work in progress'. CTF is enabled by using an environment variable to point to a 'side file' (configuration file) which contains one or more entries. CTF will then run a module, known as an 'emitter' (at present the only emitter is one that produces a plain text file) giving details of the application(s) being run. The e
Problem: How can you convert data/string from EBCDIC to ASCII or vice versa? Resolution: Converting between EBCDIC and ASCII Generally, when you want to do a translation between ASCII and EBCDIC, you should use the callable interface to the GUI File Converter (DFConv). For more information about using DFCONV and the command line interface, see the chapter File Conversion Utilities. There is another function which enables fast translation between ASCII and EBCDIC strings within a Micro Focus COBOL program. This is called "_CODESET". Its usage is: call "_codeset" using function-code, length, string where: function-codePIC 9(2) COMP-X 0=convert EBCDIC to ASCII 1=convert ASCII to EBCDIC lengthPIC 9(9) COMP-X string PIC X(n) Note that "_codeset" cannot work from a program that is compiled with the reserved word directi
Problem: Method to eliminate 'This web service is using http://tempuri.org/ as its default namespace' message. Resolution: In .Net use a Class Attribute to specify the Namespace that the WebService is in. Example code (changes are highlighted with MFTECH in cols 1-6) to set this is:- $set sourceformat"variable" class-id. Service1 as "Service1" inherits CLASS-WEBSERVICE. environment division. configuration section. repository. interface INTERFACE-ICONTAINER as "System.ComponentModel.IContainer" &
Problem: Mapping numeric data types from COBOL to C may cause some unpredictable results when the data items are passed to C and assigned values in C, especially when these are COMP-5 numeric data types. Resolution: C always uses a whole word of memory (4-bytes) when a numeric variable is passed to it as an int or a long int. Data items defined as type COMP-5 in COBOL will store: 1-4 decimal digits in 2 bytes of storage; 5-9 decimal digits in 4 bytes of storage; and 10-18 decimal digits in 8 bytes of storage. This must be considered when passing numeric variables between COBOL and C. For example, consider the following COBOL data structure: 01 ws-group. 03 ws-a PIC 9(4) COMP-5. 03 ws-b PIC 9(9) COMP-5. When ws-group is passed as a parameter to a C program, C finds ws-a
Problem: when trying to create a new project, I receive the following: General failure: could not create project. Resolution: In this case - the user needed write access to folder where project was being created Old KB# 3848
Problem: Dialog System: The DISPLAYs in my GUI Dialog System COBOL program do not appear when I use an EXE build. Resolution: In Net Express, the default linking builds a graphically EXE, where DISPLAYs are suppressed as long as there is no open console / command prompt for this application. There are two possibilities to get a console for the DISPLAYs. Either: --------------------------------- Add the statement: ACCEPT dummy WITH TIMEOUT 0 in front of the first DISPLAY. Any ACCEPT, which expects input from a console, will induce the RTS to open one. And subsequent DISPLAYs will occur. "WITH TIMEOUT 0" does not wait for the input and returns immediately. The console only occurs if necessary. Please define "dummy" in the WORKING-STORAGE SECTION, e.g. 01 dummy PIC X. --------------------------------- Or: --------------------------------- You may change the default graphical link to a character mode lin
Problem: Moving SW-HIDE to wShowWindow of StartupInfo should cause the application that is executed with CreateProcess to be hidden, but it does not. Resolution: Here is a description of sShowWindow from Microsoft's MSDN site: ------------------------- wShowWindow Ignored unless dwFlags specifies STARTF_USESHOWWINDOW. The wshowWindow member can be any of the SW_ constants defined in WINUSER.H. For GUI processes, wShowWindow specifies the default value the first time ShowWindow is called. The nCmdShow parameter of ShowWindow is ignored. In subsequent calls to ShowWindow, the wShowWindow member is used if the nCmdShow parameter of ShowWindow is set to SW_SHOWDEFAULT. ------------------------- The above indicates that the value for STARTF-USESHOWWINDOW (i.e. h"00000001") must be moved to dwFlags. Otherwise, wShowWindow is ignored. This value can be found in ...\\[Net Express directory]\\Base\\SOURCE\\Windows.cpy. Old KB# 3804
Problem: You may encounter a return code of 128 (or similar) when executing a Cobol program which connects to a database (Oracle in this case) and then exits with COMMIT WORK RELEASE. Resolution: Use the DEFAULTCALL"4" compiler directive to solve this problem. This is a classic issue with regards to Oracle and call-convetions which fills the return-code in its routines. Call-convention 4 means that the return-code set in sub-routines are set like a local variable. Refer to the product documentation for further details on CALL-CONVENTION and the DEFAULTCALLS compiler directive. Old KB# 3820
Problem: the .bat file pasted ....1) creates an empty Line sequential file ( echo >fils.dat ) ....2) creates an INDexed file using MF REBUILD conversion features Resolution: Extract of the .bat file: echo >fils.dat rebuild FILS.dat,FIINDf.dat /o:lseq,ind /k:1 10 /r:f50 rebuild FILS.dat,FIINDv.dat /o:lseq,ind /k:1 10 /r:v10-50 dir fiIND*.* Old KB# 3816
Problem: Release 4.0: We are on the way of migrating our OS/390 CSP-written programms to Cobol using Micro Focus Net Express. So far so good, now comes a nasty 166 error saying: "RECURSIVE COBOL CALL is illegal." The situation is as follows: start pgm -----> pgma -----> pgmb -----> pgmc (PF3) -----> pgma call call call call &nb
Problem: Is there a switch which makes COBOL use case dependency for the names of calls within DLLs? If not, is there a way of specifying that a call should be from a particular DLL? Resolution: The CASE directive affects to the symbol that is created by the compiler. But the Micro Focus rts on Windows will search for the symbol in any case, this search is not case sensitive. It is only on Unix that the search is case sensitive. The best solution is to rename your COBOL function as it is not a good idea to have symbols that match other C symbols. But if you need to use those names, then the solution is to use LITLINK or call convention 8 for those particular calls. This forces the calls to be resolved at link time. Old KB# 3811
Created On: 12 January 2012 Problem: Is there an example of Net Express 4.0 unmanaged code (Not the .net version) calling into a VB or C# .NET DLL. Resolution: To do this you need to use COM on the cobol side and use regsam on your assemblies so that they accessable via COM Interop. To explictily put the location of the assembly in the registry then you would need the /codebase option to regasm. Example using COBOL and C# is attached. Attachments dotnet.zip Old KB# 3827
Problem: Failed to copy to file *:\\*.APP Resolution: Remove the *:\\*.APP file from the Generic Debug Build or Generic Release Build window. The .APP file will be opened and locked whenever the project is open. The IDE attempts to copy the .APP file to either the Debug or Release folder as if it were a data file. The copy fails because the file is locked. Old KB# 3810
Problem: The Micro Focus FormatDateToOLE method only accepts a date (day, month, year) as a parameter and not time time. How can I convert my date and time in to an OLE format? Resolution: As you have found, our own method (FormatDateToOLE) only accepts the date i.e. no time. However, this COBOL method simply calls the Windows VarDateFromStr() API. You can find out information on this API at: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/automat/html/a5c21ceb-ed8b-4a95-8957-e9d7fc5bd90e.asp You may also want to read the following Microsoft KB article: http://support.microsoft.com/kb/291075 Old KB# 3808
Problem: Net Express 3.1 install may fail, and it is unable to reinstall Net Express 3.1 again. The install may then detect that Net Express 3.1 is already installed. Resolution: 1. Delete following files from Windows directory (e.g. c:\\windows or c:\\winnt): MFUnWeb.exe, MicroFocusNet Express31Uninst.exe, NETX31.dat 2. Delete the Net Express directory 3. Delete "HKEY_CURRENT_USER\\Software\\Micro Focus", "HKEY_LOCAL_MACHINE\\Software\\Micro Focus", and any occurrences of "net express" from Windows Registry 4. Reboot the machine 5. Install Net Express 3.1 again Old KB# 3799
Problem: The "Cookie" demo (Proj1006) provided in the 'Elements of COBOL Web Programming' manual by Wilson Price (supplied with Net Express) is designed to illustrate how to create and retrieve a persistent cookie. The program Cookie031 cretaes the persistent data. However, when you run the program to retrieve the cookie (Cookie032) the supposedly saved details may not be retrieved. Resolution: If this happens then one possible cause may be that the COOKIE.JS file may need to be updated. If you loaded the COOKIE.JS file that's provided with the project, then try replacing this with COOKIE.JS from the \\Program Files\\Micr Focus\\Net Express\\Base\\Bin directory if this has a later creation date. Old KB# 3809
Problem: Is there a setting somewhere in Net Express 4 to allow the editor not to 'grey' out from column 72 onwards? Resolution: You can alter the right hand margin in the Net Express editor by doing the following: 1. Select Options from the IDE pull-down menu 2. Click on Edit 3. Change the right hand margin from its default setting of 73. Old KB# 3792
Problem: Animation does not start at the breakpoint Resolution: This scenario was a follows: A non-cobol program was started and calling a cobol dll - although a breakpoint was placed in the cobol program thru an IDE - it was not popping into animation because a break point wont start animation session, it will only re-continue an animation session where the run was hit. An in this case the non cobol program was not animating. To get a new animation session to start - place a CBL_DEBUGBREAK at the top of the cobol program, recomoile and try again - when the cobol program is called a window wil l pop asking if you want to start animation, click yes Old KB# 3805
Problem: When sorting, the table is sorted by uppercase first, then lowercase: ALPHA BETA Alpha Beta and to attain the following output: Alpha ALPHA Beta BETA Resolution: object-computer. pc program collating sequence is alpha-1. special-names. alphabet alpha-1 "A" also "a" "B" also "b" "C" also "c" "D" also &qu
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.