Browse all forums dedicated to the Rocket® COBOL product family.
Recently active
Problem: running bat file (or commandline)- to run sort - results in sort124e - field position 201 invalid Resolution: If the record size is greater than 256, a RECORD instruction must be used. ex: Sample with the record parameter setting record of 300 bytes mfsort sort fields(1,1,ch,a) use x:\\directory\\xxx.dat record f,300 give file2.dat Old KB# 5372
Problem: Is Dialog System dsbrowse included in Application Server runtime environment Resolution: DSBROWSE.gnt in included in our application server (version 4.0). The location of the Application Server directory may need to be on the COBDIR directory. The gnt format modules are located via the COBDIR environment variable. Alternatively you could link dsbrowse.obj into the main application exe. Old KB# 5375
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: How can access the Vtable from a COM DLL? The VTable is the low level interface that a COM Object Object exposes. Its structure is similiar to a C Object. Resolution: If you already have a COBOL OLE Domain object you could use the COM Class library IUnknown "fromDomainObject" class method and QueryInterface to get the COM Interface (vtable) you want. Alternatively you could CoCreateInstance and QueryInterface COM API calls. If possible its far better to use a automation object so you can invoke on it. Thats far more forgiving and simpler from COBOL. Old KB# 5358
Problem: You open a Net Express Command prompt and you enter the adiscf command to be able to configure adis behavior for screen i-o. But although you can see the menu bar at the bottom, you can not see any of the menu options in the main panel. Resolution: Adiscf was designed when the command prompt window had a fixed size and there were not any screen buffer. So to get it working properly, you need to reduce the screen buffer size to match the real window size. For example, if you wanted to configure adis to enable function keys, these are the steps that you would need to do: 1. Open a Net Express command prompt 2. At the command prompt window you need to reduce the Screen Buffer Size to match exactly the Window Size, or you will have problems with adiscf. Click on the top left corner and select properties. Then reduce the Screen Buffer Height to 25, that is the same value that you see in Window Size. Then click OK. If you select "Apply prop
Problem: To pass a structure like this: 01 LINKVARS. 03 VAR1 PIC X(02). 03 VAR2. 05 VAR3 PIC X(10). from COBOL to Java but to also send it as a Byte[] type instead of a string. Is there some way to do this? Resolution: You can't pass a record structure directly from COBOL to a Java method which is expecting a byte array, as there is no mapping for that within the Object COBOL runtime support. However, we do have a means of creating arrays using the jarray class. If you create a one dimensional byte array using the jarray class, the getData/commitData methods can then be used to copy a COBOL buffer into it. That jarray can then be passed to the
Problem: How can I get an error when a REDFINES source/target are different lengths? Resolution: This "error" would return an informational message from the checker and is not reported by default (as you have found). If you want to see these errors then you will need to specify the WARNING"3" directive on your compilations. Old KB# 5365
Problem: getting 114 on file "" when starting mfnetx Resolution: This problem occurs on multi-user XP operating systems. When installing on an xp machine - you are asked - do you want this for the machine or just this user - Always use "the machine". to fix: 1. Close all windows 2. Start the Registry editor by running REGEDIT from the "Start > Run" command line 3. Go to HKEY_CURRENT_USER\\Software\\ 4. Delete the "Micro Focus" key (or folder) 5. Close the Registry editor 6. Start the Net Express Command Prompt 7. Execute MFNETX Old KB# 5339
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: 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: When running a Dialog System application built with the ANIM compiler directive and deployed under Application Server, the following error message might possibly be encountered in some circumstances: DSDEBUG-0113 Error message file mot found Error number = 0113 Group tag name = DSDEBUG Group set number = 0027 The title of the error message dialog box would be "NLS Text Failure". Resolution: In this case, rebuild the application without the ANIM directive and redeploy it. Old KB# 5336
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: Net Express 4.0 How can you stop the run-time from checking if numeric data items have valid numeric data and stop the warning message "numeric field contains invalid data" Resolution: By default this checking is always ON, but you can override this by turning off the 'F run-time switch': - At the Net Express command prompt - set cobsw=-F; or - In the IDE, from the menu - 'Project' > 'Properties...'. Click on the 'Application...' in the Project Properties dialog and go to the 'Program Execution' tab. Under 'Error Handling', uncheck the checkbox for 'Validate numeric fields'. Old KB# 5370
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: 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: 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: 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
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: The following erros may be observed when attempting to start a Fileshare Server: FS084-I Fileshare Server is starting. (Revision 9243). FS130-I Reading database reference file, please wait. FS108-I Processing the files specified in the database reference file. FS110-I D:\\ENVIRONMENTS\\V513FILESHARE\\DATA\\FILE01 - ok. FS110-I D:\\ENVIRONMENTS\\V513FILESHARE\\DATA\\FILE02 - ok. FS109-W The file D:\\ENVIRONMENTS\\V513FILESHARE\\DATA\\FILE31 does not exist FS110-I D:\\ENVIRONMENTS\\V513FILESHARE\\DATA\\FILE51 - ok. FS246-I Backing up database files to directory 'd:\\environments\\v513fileshare\\backup'. Please wait. FS250-I Deleting all unwanted log files. FS104-I The log file cannot be found, creating a new recovery log file. FS186-I The Fileshare Server is using the log file &#
Problem: Does Application Server support Windows Clustered environments? Resolution: Micro Focus Application Server has no direct support for Clustered Services. Applications written in COBOL however should run on a Windows Server machine that participates in a Windows Cluster. However the application will not be cluster aware. There is a API that applications can use to make themselves cluster aware:- http://msdn.microsoft.com/library/default.asp?url=/library/en-us/mscs/mscs/windows_clustering.asp?frame=true If you need to make your application cluster aware then you will need to to use these apis. Old KB# 5373
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: 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: Are there any further documentations on how to use INCLUDE or OMIT control statements in MFSORT? Resolution: Here is the description of the INCLUDE/OMIT control statements in the Net Express Help: ----------------------------------------- INCLUDE/OMIT Specifies conditions in which records will be included or omitted from the sort process. For details, see the IBM documentation to be found at Using DFSORT Program Control Statements. INCLUDE and OMIT are mutually exclusive. ----------------------------------------- You will note there is a link (http://www.microfocus.com/docs/links.asp?nx=dfs2) for details on how to use them. If you click on the link, it will take you to the documentations on DFSORT Program control statements. You will find from that site all the details about how to use INCLUDE/OMIT control statements. Old KB# 5364
Problem: In the documentation the Dialect COBOL370 and OS390 show the compiler option HOST-NUMCOMPARE To expand on the the meaning of the following associated directives... HOST-NUMCOMPARE"1" HOST-NUMCOMPARE"2" NOHOST-NUMCOMPARE HOST-NUMCOMPARE Resolution: HOST-NUMCOMPARE is actually the same as HOST-NUMCOMPARE"2"... HOST-NUMCOMPARE"1" is an earlier version and is deliberately no longer documented. It is still supported for some customers who came to rely on its semantics, however support for HOST-NUMCOMPARE(1) may be withdrawn in a future product. All new code that wants compatibility with IBM mainframe for comparisons should use HOST-NUMCOMPARE. NO HOST-NUMCOMPARE is the default setting. Old KB# 5328
Problem: What does a status 1 code returned from a WinApi call mean? Resolution: A status 1 returned from a WinApi call means "Error - invalid function". Old KB# 5390
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.