Browse all forums dedicated to the Rocket® COBOL product family.
Recently active
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: How to do a multi-file select dialog box in Dialog System. Resolution: How to do a multi-file select dialog box in Dialog System. Since the DSDIR Dialog System extension only allows a single file to be selected, you can use the GUI Class Library OpenDialog class. This class has a method "allowMultipleSelection" which sets a flag in the open dialog that allows you to select multiple files. You may not see this method listed in the class library help, but you'll see it in Net Express\\base\\source\\guicl\\opendlg.cbl. You can then use the "getAllfiles" method to retrieve the selected files. Please see the source comments in the attached example. Attachments: multifiles.zip Old KB# 3794
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 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
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: How do I specify a user and password on an SMTP email send from .Net Resolution: To do this you need to use the "Fields" collection property of the MailMessage object. You can set the Authentication Type userid and password parameters. An example program that does this is:- $set sourceformat(variable) *> Allows past col 72 program-id. SendMail. environment division. configuration section. repository. class cMailMessage as "System.Web.Mail.MailMessage" class cMailAttachme
Problem: You may want to call a .int file that is has been built in alocated in a different directory from within the Net Express IDE. As an example, you may need to to run a .int from the current project directory and then make a cobol call to a .int file in the debug folder of another project. Resolution: As an example, you may have 2 programs, Call1 which calls Call2. Projects for these may be created in the following (separate) directories: For Call1 - C:\\TEST\\Call1 For Call2 - C:\\TEST\\Call2 In the project directory for Call1 load Call1.app into the IDE. You now need to change the COBDIR environment variable to point to the \\DEBUG directory of the project directory for Call 2. To do this select 'Project' from the menu bar. Then select 'Properties' and the IDE tab. To set the environment variable enter COBDIR in the "Variable" field and %COBDIR%;C:\\TEST\\Call2\\DEBUG in 'Value" field.
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
Problem: I can't seem to get the deallocate command to work after I have done a close cursor command. Resolution: The deallocate cursor sql statement is not supported in OpenESQL. OpenESQL only supports the use of ANSI-standard SQL. Old KB# 3814
Problem: Some environment variables may have been set for some reasons from Windows registry or set as system and user variables. How can you override them? Resolution: You can override the values of existing environment variables by setting them with new values. If you are using the Net Express command prompt to compile, you will first need to set new values for these environment variables to override the default values. If for example, you have set COBCPY to point to x:\\copybook from the Windows registry. This would be appended along the other directories that Net Express will set. Net Express usually sets COBCOPY with the following directories: "C:\\Program Files\\Micro Focus\\Net Express 4.0\\DialogSystem\\SOURCE";"C:\\Program Files\\Micro Focus\\Net Express 4.0\\Base\\SOURCE";"C:\\Program Files\\Micro Focus\\Net Express 4.0\\Base\\SOURCE\\GUICL";"C:\\Program Files\\Micro Focus\\Net Express 4.0\\Base\\SOURCE\\BASECL";
Problem: The ANY LENGTH Clause --- extract of Netx DOCumentation: The ANY LENGTH clause specifies that the length of a linkage section item may vary at runtime and is determined by the length of the argument. General Format ANY LENGTH Syntax Rules The ANY LENGTH clause must be specified only in an elementary level 1 entry in the Linkage Section of a function, of a contained program, or of a method that is not a property method. Note: The ANY LENGTH clause is not permitted to be specified in an outermost program. This is because an outermost program can be called with or without a program-prototype format CALL statement. For calls without a program-prototype, the implementation is not able to determine whether an argument corresponds to a formal parameter described with ANY LENGTH. If the source element containing the ANY LENGTH clause is a contained program or is a method, the subject of the entry must be referenced in its PROCEDURE DIVISION head
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: CBL2XML, using fonction "convert COBOL to COBOL with XML syntax" generates a warning "Warning : The redefines clause is not supported by this version of the COBOL runtime..." when the COBOL COPYfile to be "converted" to XML contains REDEFINES clause(s) Resolution: ...Let's say you have such a COPY file: 01 LEV1-rec. 02 AnyData pic x(100). 02 AnyDataRed pic x(100) redefines AnyData. ...AND you use CBL2XML to "convert COBOL to COBOL with XML syntax" ie: generate an XML copy file describing the XML file ...YOU'LL GET THIS WARNING Micro Focus CBL2XML Version 1.0 Copyright (c) 1984-2005 Micro Focus International Ltd. Checking ...\\ACobolCopy.cpy for errors Micro Focus Net Express V4 Version 4.0.38 Copyright (C) 1984-2005 Micro Focus International Ltd. URN AXCGG/AA0/00000 * Checking complet
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 the statement "EXEC SQL INCLUDE aFile END-EXEC" is used, ORACLE precompiler PROCOB looks for a file named 'Afile.cob' on the current directory AND, if not found on the current directory, looks for it on DIRECTORIES pointed by the environment variable INCLUDE. How to manage ORACLE precompiler PROCOB to find these files despite they don't have the cob extension? Resolution: Use the Micro Focus CP Preprocessor so COPYFILEs are "expanded" before ORACLE precompiler has to deal with them ( ie: since CP will have expand COPYFILEs, procob won't have to look for them....) Sample Paste of Net Express directives of a Net Express project: %FILENAME COBIDY(%TARGETDIR) WB3 WB CSI ANIM EDITOR(MF2) ENSUITE(3) PREPLIST LIST() osext"pco" copyext"cob,pco,cbl,cpy" p(cobsql) csqlt=ora8 makesyn end-c comp-5=yes p(CP) C S T W ENDP; Note that, since the Prep
Problem: how to create a new task in the task list for VS 2005 Resolution: Put the cursor on the line of code where you want to enter a task. Then go to Edit | Bookmarks | Add Task List Shortcut. Then go to View | Task List. In the Task List make sure 'Shortcuts' is selected in the drop down, then add your task description. Old KB# 3796
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: Return code 9/029 on DELETE of index file over Fileshare Before the delete a close was coded Resolution: This normally is correct in that your program was not the only one that opened the file and the file is open via another program that never If Fileshare is started via service, you will need to use FSVIEW from Net Express command prompt. The trace will write to fsscreen.lst in the fileshare work directory. FSVIEW server set your-server-name trace toggle to start trace trace toggle to stop trace exit to exit After the error is recreated make a copy of the fsscreen.lst file. Using an editor do a search for the file name you are having problems with in the sample it was D:\\M.LEATHEM\\CNTLLIB\\MHCT_MHCBQ.DAT so I searched for MHCT_MHCBQ.DAT. Just before the
Problem: WSQL003:Error openning file 'C:\\Program Files\\Micro Focus\\Net Express\\Base\\workarea\\xdblsrvx.sql. Resolution: XDBSQLSRVX.SQL was not found in the workarea directory. Placing a copy of this file in that location resolved the issue. This script is used by Net Express when fixes are applied to shutdown the server. It is also used by the IDE when it prompts you to shutdown the server. Old KB# 3836
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
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: If you have program_search_order set to 2 which should do the following when looking for submodules 2 Uses the following search sequence: (1)The run-time system is checked to see if the program is loaded or statically linked. If it is. the search ends. (2)The path in which the calling program was loaded is searched. (3) If the COBPATH environment variable is set, the paths specified are searched in order. Otherwise, the current directory is searched. (You should not modify the COBPATH environment variable as it is used by this COBOL system.) (4) If the COBDIR environment variable is set, the paths specified are searched in order. But my tracing shows it is alwasy looking in current directory before anywhere else. Resolution: If you call a submodule with an extension it is considered a fully qualified path name and nullifies the search order parameter value. So if you w
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
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.