Browse all forums dedicated to the Rocket® COBOL product family.
Recently active
Problem: Has one form, wants to be able to click on a button and have a different form popup Resolution: 1) Create a new Cobol, windows form, name the project FormPopup 2) Add another form to the project ( Right click on the project in solution explorer, select Add New Item, Select a Windows Form, name it Form2, click OK) 3) Add a button control to the first Form (Form1). 4) Double Click on the button to create the button click event handler 5) In the repository add this line of code: Class form-form2 as "FormPopup.Form2" 6) Go back to the button click event handler that was created (method button1_Click) 7) Add a working storage section with the following code: 01 newForm object reference form-form2. 8) In the procedure division add the following code: set newForm to form-form2::"New"() invoke newForm::"Show"(). 9) Build and Run (Instead of using the form's Show method you could use the ShowDialog method, but then t
Problem: Method to open a large data file with Net Express to view the contents. Resolution: Have the following section setup in the extfh.cfg file: [XFH-DEFAULT] FILEMAXSIZE=8 Where the FILEMAXSIZE parameter specifies the number of bytes used internally to store file offsets. This also affects internal locking mechanisms: programs sharing the same file all need to use the same FILEMAXSIZE settings to ensure semaphores and record locks are handled correctly, thereby avoiding potential file corruption in shared files. FILEMAXSIZE={4|8} Default: 4 4 Limits file addressibility to 32 bit values which is compatible with earlier versions of Micro Focus products. 8 Allows up to 64 bit values for file addressing on Windows NT platforms when accessing the NTFS file system, but changes the underlying record locking mechanism. Therefore, if you are sharing very large files, that is files greater than 1Gb in size, all programs
Problem: The customer was moving both COBOL and C source programs from a Unix envirornment using OCDS to Windows XP running Net Express. Under Unix they created shared object libraries for their C programs and then they called these programs from COBOL main programs. They did not have to use a call-convention in their COBOL programs and the C entry points were found without a problem. After the customer moved the source code to Windows they decided to compile and link their C programs using Microsoft C/C 6.0 to create a single Dynamic Link Library (.DLL) containing all of the C programs. When they compiled the COBOL programs and attempted to call the C entry points within the .DLL they were getting RTS 173 "Program not Found" errors on the call. The customer did not understand the different call-conventions that can be used within a Windows program and they evidently did not know what C compiler or linker options to use in order to make the C entry
Problem: Release 4.0: We would like to include the actual wrap- and fix pack all05n40 into our silent installation, but we failed to add it to the wrapper.ini file in cinstall. Resolution: You can also start the installation of service packs / fix packs / wrap packs / add pack silently by adding the parameter -q, so \\..>all05n40.exe -q will install the pack silently. From a batch file, it might be better to use start /wait all05n40.exe -q to stop the batch until the pack installation is finished. Old KB# 5350
Problem: Release 4.0: How to use the Net Express IDE to rebuild a corrupted file index for an C-ISAM file? Resolution: Net Express IDE: Tools -> Data Tools -> Fix File Index...-> 'Filename' or 'Browse' to pick up the corrupted file -> press 'Advanced options and choose C-ISAM from the drop-down list -> press 'Fix File index' button In case of a destroyed header and it is impossible to create the structure immediatly: -> under 'Advanced options' press 'Define keys...' to set all key offsets and key lengths first. Old KB# 5369
Problem: When we try to run our application on the Net Express development machine we get the following error: ASLM: Semaphore failure. ASLM: Errno 1000 Why is this? Resolution: This indicates that the Net Express runtime license cannot be found. On the development machine please ensure that your application is linked with the dynamic option and/or that PATH/COBDIR are set to point to the location of Net Express. Old KB# 5351
Problem: Release 4.0: The knowledge base articles KB: 20942 and KB: 21122 refer to SupportLine Newsletter articles, which show how to use the Windows XP Visual Style controls. The latest version of the sample is now available on the Net Express Examples page. Resolution: The sample demonstrates how to create a Dialog System screenset, which uses the Themed Controls of the XP Visual Style: http://supportline.microfocus.com/examplesandutilities/nesamp.asp#DialogSystem Demo: VisualStyleDemo.zip ---- The method used by the newletter article http://www.microfocus.com/mfnewsletter/technicalarticles/20050701-002.asp mentioned in KB: 20942 shows a purple line in each entry field. The newsletter article http://www.microfocus.com/000/XP-style-21_tcm21-5782.pdf, mentioned in KB: 21122, shows that the NoBorder-method from the class library can be used to get rid of this line. The example VisualStyleDemo.zip from the examples page minimizes the number
Problem: Can I improve my SQL Server performance from COBOL via ODBC? This relates specifcally to SQL Server cursor performamce. Resolution: Using ODBC to SQL Server there is a lot of scope for tuning your performance. MS SQL Server's performance can vary greatly depending on what cursor type is being used. By default all cursors are Server Side cursors. This can be inefficient for example when reading through large sets of data. Setting concurrency to READONLY and making it FORWARD only should those type of cursors go much faster. Where you need server side cursors you could try the SQL(PREFETCH=n) directive. This will get individual rows in blocks rather than in a single row. This can speed up performance. Some work has taken place to help with people migrating from mainframes. There is a new compiler directive SQL(BEHAVIOR=....). This allow you to specify what behaviors you want and it then does some optimisations to cursor types. Some experi
Problem: Gets an exception (java.lang.nullPointerException) only when animating a web application. The same web project runs fine on any other development machines except on one. Resolution: If the web application is using a Java applet, make sure the Java (Sun) setting in the Internet options of your web browser is not set to use the Java Sun JRE. The name of the option is "Use JRE 1.x.x_xx <applet>" Old KB# 5329
Problem: How do you setup a Listview so that it is also resized when the hosting winform is resized. Resolution: The Anchor property of the control does this. By default the control is anchored to the top left. If you anchor top / left / bottom /right it should resize as required. Old KB# 5377
Problem: Doing a static link of a ODBC program with Base release of Net Express 4.0 and base release of Application Server for Net Express 4.0. Resolution: Static link is not recommended for ODBC The issue was resolved by linking as Shared Another method would have been to upgrade development and Application Server for Net Express to the currect update levels available on our website. http://supportline.microfocus.com Old KB# 5348
Problem: A file created or viewed using a DOS editor tool or UNIX editor tool will most likely be saved in the OEM character set. Resolution: To view the correct character set created using a DOS editor then: Go to the 'Options' menu | 'Edit' | 'DOS compatibility' tab. Then select or tick the 'OEM/DOS' option. Old KB# 5367
Problem: A COBOL program that is built with Oracle Procobol precompiler fails with an RTS114 Error on a SQL SELECT statement. Resolution: This error was caused by a mismatch of Oracle versions. Using the correct version of Oracle client software for the Oracle Server version resolved the problem. Old KB# 5378#RMCOBOL#ServerExpress#AcuCobol#COBOL#netexpress
Problem: A COBOL program developed in Net Express 4.0, when run from a command line, is required to read data from a file specified on the command line. How are parameters read from the command line and redirected to an output file? Resolution: 1. To read from a file using the redirection operator "<", there is a COBOL runtime switch 'S5' that, when turned on, allows for input/output from the command line. The ACCEPT statement in the code would be: ACCEPT ... FROM CONSOLE. To turn the 'S5' COBOL switch on, either set the 'cobsw' environment variable on the command line: set cobsw= S5 or turn the S5 switch on, when running the program on the command line: Program1.exe ( S5) < data\\DataIn.dat > data\\DataOut.dat 2. The "ACCEPT ... FROM COMMAND-LINE" statement accepts arguments as strings from the command line. The following will accept '1234' as an argument and redirect the out
Problem: Release 4.0: Keystroke Ctrl C or Ctrl V does not work as expected with the CommonControl demo "TXTENTRY". What has to be programmed to get these keystrokes? Resolution: To get a Ctrl C or Ctrl V as expected, the method "getHighLightArea" is necessary for the Ctrl C instead of "setHighLightArea" coded in the demo. In the "EfDataKey Section" where the EfDataKey callback event is handled. Please code e.g.: if K-keyAsNum of Keystroke = 3 *> Ctrl C INVOKE aTextEntry "getHighLightArea" USING CursorPos &
Problem: You may want to use a Programmed Text Entry instead of the standard Dialog System entry field or MLE control because you need some special characteristic like an MLE without a scrollbar (see knowledge base article 20465). There is a sample for Programmed Text Entry controls under DialogSystem\\CommonControls\\TextEntry (in your Net Express installation directory) that shows you how to use them. But in this demo the Programmed Text Entry controls gets updated with the value within the associated field in the Data Block only get they get focus. This knowledgebase article shows you how you can get your Programmed Text Entry to show the value in the associated field in the Data Block at creation time. Resolution: I will explain what needs to be done by showing what changes would be needed to the product demo at DialogSystem\\CommonControls\\TextEntry (in your Net Express installation directory) so both Text Entry Programmed controls show the value th
Problem: We have syncsort for windows I would like to link in there libs so when I execute a gnt with run program.gnt the sort verb in the program will use syncsort instead of mfsort. On our Microfocus unix system when we compile we use this command cob -uVP -C "nobound defaultbyte=0 CALLSORT" -N nohpchunk /prod/srclib/ProgramName.cbl -L /usr/syncsort/lib -lmfsyncsort -lsyncsort then we use COBRUN ProgramName to execute How do I do this in net express Resolution: solution: The pc is not like Unix - in this case the unix version of syncsort had been binded into the runtime The windows version does not do this in the same way - the syncsort is linked into the module doing the calling. As per syncsort docs: This is what the Syncsort documentation has on this subject. Using SyncSort from COBOL SORT and MERGE verbs When you use the S
Problem: Problem with websphere deploying application gets error Resolution: Added MFCobol.jar in the PATH. Now Websphere will report successful application deployment. Old KB# 5363#ServerExpress#COBOL#AcuCobol#RMCOBOL#netexpress
Problem: What is the return code of the projmake utility when a project fails to build or open? Resolution: The prokmake utility sets return-code = 1 for any error found. You cannot specify a return-code for each type of error. Old KB# 5391
Problem: How can I display a JPEG (JPG) file from a Character based application? Resolution: Character based applications do not support the display of images. You could however use the ShellExecute api routine to display a JPG in the system default application for it. Attached is a demo that gets a JPG from a website and displays it using ShellExecute. Attachments: WinHTTP GET.zip Old KB# 5376
Problem: CBL_SPLIT_FILENAME example in Net Express Help has been updated Open Net Express 4.0 Help Click Index tab Type CBL_SPLIT_FILENAME Click Display Scroll down to reveal "Example of the use of CBL_SPLIT_FILENAME" Click adjacent checkbox Below is a compilable version of the source shown in the Help. Resolution: copy 'CBLPROTO.cpy'. ************************************************************ * * * &n
Problem: Method to protect applications against the numerous .NET decompilers on the market? Resolution: Decompilers are not a new technology. It is perfectly possible to decompile current Win32 based applications or applications on other platforms. This is a problem for all languages. its not just an issue in the COBOL world. It is possible to decompile a COBOL program but that module would still need the COBOL runtime , File Handler , SQL , XML supporting assemblies. Even by decompiling you would still end up with very unreadable and unmaintainable code that still needs a Micro Focus runtime. In terms of security, there are a number of possible avenues to explore: http://msdn.microsoft.com/vcsharp/programming/tools/ Under "Obfuscators" there are links to a variety of products that will help secure your code. These type of products can be used to make all but the simplest Hello World type application unintelligible. If, o
Problem: RTS144 Boundary Violation occurs rewriting a Line Sequentia file opened I-O.... Resolution: Dont' forget that "You must make sure that the record you write is the same size as the one it replaces". If not, a RTS ( Runtime ) error 144 will occur..... This hint is clearly documented in the documentation, compiler directive REWRITE-LS . Paste of RTS error 144: COBRT144 Boundary violation (Recoverable) You have tried to write a record to a variable length record file, the length of which is not within the defined range for that file. Resolution: Recode your program. Old KB# 5344
Problem: A sample program: SELECT customer ASSIGN TO "\\\\server1\\develop$\\test\\customer.dat"; ORGANIZATION IS INDEXED; ACCESS IS DYNAMIC; RECORD KEY IS cst-key; FILE STATUS IS ws-cst-status. . When the statement "OPEN I-O customer" is executed the file on one PC works OK. However, on another PC, a file locked error (status 9A) occurs. Resolution: Change the SELECT st
Problem: The following error mesage occurs when the user clicks on the "Click here to install Net Express 4.0" link from the install page of Net Express 4.0: "Impossible de trouver le fichier /d:/autorun/..\\nxsetup.asq. Vérifiez son emplacement et essayez á nouveau." [This above French error message simply means that it was unable to find nxsetup.asq] Resolution: Make sure to load the web page in Internet Explorer (IE)! It was designed to run on IE. The above error message occurred in Mozilla FireFox web browser. Old KB# 5380
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.