Browse all forums dedicated to the Rocket® COBOL product family.
Recently active
Problem: How can you validate numerics in a .Net Winforms TextBox control. Resolution: The keypress event in .Net allows you to trap when a key is pressed on the keyboard and interpret what key was pressed. This allows you ensure that only digits , "." , " " and "-" are entered. More complex checking can also be performed on the TextChanged Event. This is fired when the Text in a textbox is changed and allows you to check the full text that is in the control. Some examples of using these events to handle numeric checking is:- method-id. "textBox1_KeyPress" final private. linkage section. 01 sender object. 01 e S-W-Forms-KeyPressEventArgs. procedure division using by value sender e. &n
Problem: How can the e-mail program be determined which is installed on the Windows PC Resolution: Please have a look into the registry. Step1: Directly under \\\\HKEY_CLASSES_ROOT the entries for the e-mail protocols pop and smtp can be found. The subentry PROTO HANDLER shows a (different) CLSID for each of used protocols. Step 2: This CLSID references its own entry under \\\\HKEY_CLASSES_ROOT\\CLSID. Open the subentry belonging the CLSID found in step 1. There, on the next level, the subentry InprocServer32 shows the DLL which handles the actual protocol for the search started in step 1. Old KB# 1394
Problem: This example illustrates how the CBL_FILENAME_CONVERT call-by-name routine can be used to accomplish various filename conversions and measurements. Resolution: BUILD W/RELEASE: Net Express v4.0 and up. INTRODUCTION ========== The example program includes the code for 10 different conversions and measurements. This "Readme" file includes concise descriptions for each usage. The example program includes these descriptions together with the code that implements the example. SOURCE FILES: ========== Program Files Description ---------------- ----------------------------------------------------------- CBLFNCNV.cbl Example p
Problem: Passing parameters to a COBOL.Net WebForms application using an URL: http://testserver/testform.aspx?param1=TestValue then accessing the parameters using the "request" object. In C# this can be done using syntax such as: 'string paramvalue = Request.Params["param1"];'. How to access the parameters in COBOL? Resolution: Accessing the parameters using syntax such as: set ls-param to self::"Request"::"Params"::"Get"("param1") A full example of this syntax is attached to this article. Attachments: 2149995.zip Old KB# 1276
Problem: Many customers use share names to map the data files that they are using with their applications. For example instead of using the following: SELECT INPUT-FILE ASSIGN TO "DRIVE:\\DIRECTORY\\FILE.DAT" ORGANIZATION IS ........ ............ The SELECT statement is being altered with the following: SELECT INPUT-FILE ASSIGN TO "\\\\MACHINE\\DIRECTORY\\FILE.DAT" ORGANIZATION IS ........ This is done to avoid having to map a drive to another machine in most circumstances. Reso
Problem: In Character Dialog there is a procedure P000. In global dialog this is called the first time a character screenset is called and in local dialog it is called when a panel is first entered. What is the equivalent of this is Graphical Dialog System. Resolution: In GUI Dialog there is a SCREENSET-INITIALIZED event in global dialog. This is executed when the screenset is run for the first time. Its only called first time and will not execute on re-entry to the screenset following a RETC etc. On specific windows you could also use the WINDOW-CREATED event as an equivalent for P000. Old KB# 1279
Problem: Solution is only to have on-line the LINK.exe Version 8 thru PATH environment variable and the link Version 8 libraries thru LIB environment variable... These ressources having to be invoked firtsly before the ones delivered under Net Express ( ie: [NetxInstallDIR]\\base\\bin\\link.exe & [NetxInstallDIR]\\base\\lib\\user32.lib & kernel32.lib & advapi32.lib & msvcrt.lib & gdi32.lib & advapi32.lib LINK.exe version 6 is delivered with Net Express... Resolution: Working in a DOS command prompt and manage so Net Express uses MS LINK.exe Version 8 ================= 1) ---> Launch Visual Studio 2005 Command Prompt this shortcut launches ... %comspec% /k ""C:\\Program Files\\Microsoft Visual Studio 8\\VC\\vcvarsall.bat"" x86 which correctly sets PATH & LIB envt vars so MS LINK.exe Version 8 can be used .... ====> You c
Problem: A quick trick on how to speed up the loading of the Net Express product is by disabling the Splash screen when the product is started. Resolution: To do this after loading Net Express you go to the Option pull down menu, choose Customize and then click on the Workspace tab. Under the Workspace tab you will find a pull down menu called "Splash screen", you then choose "None". Finally, just click on OK. From this point on the Splash screen will no longer show when invoking the Net Express product. Old KB# 1312
Problem: Gets a 119 error when an EXE calls a DLL Resolution: Had a cobol exe calling a cobol dll - was also always using the link wizard for the creation of the EXE and DLL settings -- just highlight the EXE and DLL (separatly) and look at the build settings manually the exe had the system programs included - so did the dll - this caused the problem *** take off the system programs from dll - you do not need them if the exe has them also if you get an mf_id_dynlnk_lib_check error - this is caused by the exe being single threaded and the dll being multi threaded - again look at build settings manually and make sure everything matches now everything is single and shared dynamic - exe has system pgms - dll does not Old KB# 1306
Problem: Can not locate the 'text find and replace' window within the IDE window Resolution: Click on the View | Dockable Windows menu option within the IDE and see if the 'text find and replace' window is ticked or not. If it is not ticked, then tick it. If it is already ticked then click on the 'Window' menu and select either 'Tile Horizontally' or 'Tile Vertically' or 'Cascade' or 'Tile Docked Windows' or 'Arrange Floating' to locate the floating 'text find and replace' window. When the 'text find and replace' window is located, right click on the window and tick the option to 'Allow docking'. Then drag and dock the window to a specific location. Old KB# 1267
Problem: The SHA1 is a standard hashing algorithm that given a sting of bytes will produce a hash code for the string. Any changes to the string would result in a very different hash code so it can be used to ensure a message has not been tampered with. How you use this algorithm in .Net COBOL ? Resolution: The .Net Framework contains an implementation the SHA1 algorithm. You can use these classes from COBOL. An example project that does this is attached to this RPI. The program code is:- $set sourceformat"variable" program-id. HashIt as "SHA1Hash.Hashit". environment division. configuration section. repository. class cSHA1Managed as "System.Secu
Problem: Using MFSORT utility but it may also has a requirement to define collation sequence in some cases. For example: sort input file a.inp on position1, size 10 , output file is a.out Command for this using MFSORT is: mfsort sort fields(1,10,ch,a) use a.inp give a.out So the question is how to define Collation Sequence using MFSORT? By definition MFSORT supports DFSORT syntax, but what about about alternate collating sequence (ALTSEQ Control Statement). How does this work on WINDOWS, and how to use it with different code pages? Resolution: In this example to presume the codepage in question is 1250. ALTSEQ function can be used in MFSORT by using the same command as in DFSORT. The attached demo - demo.zip contains a file to sort where we want to sort the file as if an 'A' has the same value as an 'a' and a 'B' as a 'b'. By sorting with 'SORT FIELDS=(1,10,AQ
Problem: Is it possible to read a line sequential file that contains tab characters i.e. x"09"? The tab control codes seem to get expanded to spaces. Resolution: By default the external file handler will convert tab characters (x"09") to spaces. This functionality can be changed via the EXTFH.CFG file. There is a configuration option called EXPANDTAB that if set to OFF will ensure that the x"09" are left in place. This can be applied to an individual file or on an application basis. An example configuration file would look like this: [TESTFILE.DAT] EXPANDTAB=OFF Please see the Micro Focus online help for full details of this and other configuration options. Old KB# 1336#RMCOBOL#ServerExpress#netexpress#COBOL#AcuCobol
Problem: Releases 4.0 5.0: As part of the execution of an application it might be neccessary to force the application to re-read the File handler Configuration Parameters file. For more details on how to use the File Handler configuration file check the File Handler programming guide, chapter 6. Resolution: To accomplish this you can use the CBL_CFGREAD_EXTFH call. The call forces the File Handler to reread its configuration file. Syntax: call "CBL_CFGREAD_EXTFH" using filename returning status-code Parameters: filename pic x(n). status-code See Key On Entry: filename The file to look for. The name can contain a path, and must be terminated by a space. If the filename is null (x"00"), the File Handler looks for the file using the standard search order (see the topic Searching Conventi
Problem: Net Express has built-in support for the following character sets. The numbering convention used for single-byte character sets is that defined by the CCIT/ITU country code. Resolution: Support is provided for the following character set conversions, except where indicated: " EBCDIC to ANSI " ANSI to EBCDIC MFCODESET Character set AUTOMATIC Determined from the Windows country setting AUTO Determined from the Windows country setting DEFAULT US English 0031 Dutch 0033 French 0034 Spanish 0039 Italian 0043 German (Austrian) 0044 UK English 0045 Danish 0046 Swedish 0047 Norwegian 0049 German 0081 Japanese Katakana Extended 0082 Korean 0086 Simplified Chinese 0351 Portuguese 0358 Finnish 0437 US English 0500 International (Latin 1) 0886 Traditional Chinese 0939 Japanese Latin Extended 9122 Japanese Katakana Old KB# 1310
Problem: The formatDateToOLE method in the olesup class only supports putting dates into a OLE Date. The OLE date format uses a floating point number with the decimal portion representing the time portion. Resolution: You can manually enter the time format into the OLE date field using code such as:- program-id. "ConvertDateToOLE". ***************************************************************** * * Program ConvertDateToOLE * * Author davs - MicroFocus SupportLine * * T
Problem: Bei einem Kunden funktioniert jetzt die Software, die mit Net Express 3.1 ohne Application Server entwickelt wurde, nicht. Es wird vermutet, dass es an dem zuvor installierten Net Express 4.0 Application Server liegt. Wie kann bei einem Kunden der Application Server von NE 4.0 wieder deinstalliert werden? Resolution: (1) Eine Deinstallation wird wie folgt vorgenommen: Start -> Systemsteuerung -> Software -> und den Micro Focus Application Server in der Liste der installierten Programme markieren und deinstallieren (2) Nachfolgend sollte in der Windows-Registry der Schluessel 'Micro Focus' geloescht werden, damit der dort eingetragene Verweis auf den Installationsort des Application Servers ebenfalls entfernt wird: Start -> Ausfuehren...-> regedit-> HKEY_LOCAL_MACHINE -> SOFTWARE -> Schluessel 'Micro Focus' loeschen (3) Die Vorgehensweise unter (1) und (2) kann automatisiert werden
Problem: A problem has been encountered when attempting to install NetExpress 3.1 on a machine running Windows 2000. (However, this may occur with other versions of the product and operating systems). Despite there being more than sufficient disk space available, the system reports that there is insufficient space and so the installation aborts. Resolution: To overcome this problem, carry out the following steps: 1) First, log on as Administrator 2) Enter into the registy and open the following keys: HKEY_LOCAL_MACHINE SOFTWARE Micro Focus delete the "Micro Focus" key and close Regedit. 3) Empty the contents of the environment variables TEMP and TMP and then ensure that they point to C:\\Temp 4) Disactivate any AntiVirus software 5) Ensure that there are no other installations of Application Server x NetExpress on the machine in question. 6) Attemp
Problem: What Net Express features can you not use when running in 64bit on the Window operating system. Resolution: The Net Expess online help for Net Express 5.0 documents the following features are not supported in 64-bit: Dialog System (Character and GUI) GUI Class Library Panels Version 2 HyHelp The following features are not currently supported in 64-bit: COBSQL Enterprise Server SQL Option (XDB) Old KB# 1284
Problem: Micro Focus documentation describes WRITELINE for the extfh.cfg configuration file as: WRITELINE - Determines whether mainframe or PC behavior is used for WRITE record. What does this actually do and what type of file does it affect? Resolution: The WRITELINE option only affects line-sequential files that contain qualified writes. When switched on any unqualified writes are treated as a write after 1 making it a qualified write. Note: Set WRITELINE=OFF if PC print behavior for WRITELINE is desired when using mainframe dialects. Old KB# 1402#AcuCobol#COBOL#netexpress#RMCOBOL#ServerExpress
Problem: Release: Net Express 5.0.NET and Visual Studio 2005: When the program executes the OPEN INPUT for a file described as: SELECT MyFile ASSING "TheFile.Dat" a file status 3/5 is returned, indicating that the file could not be found. Resolution: In the traditional Micro Focus IDE the file is found in the project's directory. In Visual Studio 2005 the file is expected in the directory of the EXE, e.g. in the bin\\debug directory below the directory of the .cblproj. You can check where the OPEN expects the file if you OPEN a (different) file in OUTPUT mode. Old KB# 1382
Problem: Releases: Net Express and Mainframe Express: Want to know which files are involved to store breakpoints / watchlists during an IDE session. Resolution: The file which stores the breakpoints is the projectname.~ds file on Net Express and projectname.dbs on Mainframe Express. The ~ds/dbs file is only written when the project is closed. So if for example Net Express just had the unfortunate occurrence to crash, then the breakpoints do not get saved and they are lost. Alll the watchlist information is stored in the ~ds/.dbs file as well. Net Express:The .idy file and .app file do not store breakpoint information. Mainframe Express: The .idy file and .mvp file do not store breakpoint information. Old KB# 1268
Problem: Subprogram's Working-Storage is only initialized the first time is called. Any subsequent calls to the same subprogram will find the previous values of Working-Storage. Resolution: Add the INITIAL clause to the subprogram's PROGRAM-ID, e.g. PROGRAM-ID SubProgram IS INITIAL. An initial program is one whose program state is initialized when the program is called. During the process of initializing an initial program, that program's internal data is initialized as described in the section State of a Function, Method, Object or Program. The initial attribute is attained by specifying the INITIAL clause in the program's Identification Division. Old KB# 1350
Problem: Release 5.0: Using COM Automation with Microsoft Word then how to perform a find and replace in the documents. Resolution: The work demo supplied with Net Express V5 in the COMDEMOS directory contains an example of this in Word5.cbl. The code that performs a find and replace is:- invoke theDocument "getParagraphs" returning theParagraphs invoke theParagraphs "item" using by value 2 returning theParagraph invoke theParagraph "getRange" returning theRange invoke theParagraph &
Problem: If you are using the "InsertAfter" method of the selection object to enter text into a Word document then the selection is expanded with the new text. This can cause problems when you jsut want to apply formatting (Bold etc) to some of the text. If you apply Bold then it applies to all the selection. Resolution: You can use the "Collapse" method of the selection object reset the selection down to just the current text entry position. Some example code to perform this is:- *> Here we want to do collapse and bold the next text set wdCollapseEnd of ws-direction to true invoke theSelection "Collapse" using ws-direction invoke theSelection "
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.