Browse all forums dedicated to the Rocket® COBOL product family.
Recently active
Problem: How to do Casting in Net Express .NET? In C# for example you can do - string x = (string)object; Resolution: The example program below shows casting in COBOL in .NET: (this is a demo of how to access an XML Config files) $set sourceformat"variable" program-id. ConfigReader. environment division. configuration section. repository. class cAppSettingsReader as "System.Configuration.AppSettingsReader" class cString as "System.String" class cInvalidOperationException as "System.InvalidOperationException" &n
Problem: Release 5.0.NET: Just testing an own COBOL preprocessor mypreproc.gnt using this compiler directive PREPROCESS as usual, and got this: Execution error : file 'c:\\path\\mypreproc.gnt' error code: 114, pc=0, call=1, seg=0 114 Attempt to access item beyond bounds of memory (Signal 11) Is there a hint available what to do to prevent this, because not involving any VS2005.NET environment mypreproc is running as well. Resolution: Yes, be aware of the following: (1) It seems the mypreproc preprocessor is looping round the last line of source code. Under managed compiles, the compiler reads the source code in 2 phases and it's looping in phase1 until it runs out of memory. However this is unlikely to be the final problem. A preprocessor for managed compiles needs to be reentrant. It does n o t mean about the REENTRANT directive, the pre-processor needs to be able to be called repeatedly
Problem: The .NET Framework comes with a Print Preview control to be used to give the user a preview of a document. How to use this control to present multiple pages of print? Resolution: When using the PrintPage event you get passed an instance of System.Drawing.Printing.PrintPageEventArgs. This has a boolean property "HasMorePages" that you can use after printing a page to tell WinForms that another page needs to be printed. Some example code that uses this is: method-id. "printDocument1_PrintPage" final private. 01 ls-left-margin pic s9(9) comp-5. 01 ls-top-margin pic s9(9) comp-5. 01 ls-count pic s9(9) comp-5. &n
Problem: A column defined as numeric (10,0) and the host variable declared as PIC X(10). If the value was 500 when selected from the database the host variable contained ' 500'. With the Oracle 10.x pre-compiler the host variable contains '500 ' and this is causing a problem within the application. Resolution: Use the Oracle precompiler directive picx=varchar2. Old KB# 4418
Problem: A customer has a program that returns an XML status, but he cannot find out where these are documented. Resolution: The codes are documented in different places (depending on the product), but here they are for reference: Return Code Meaning > 0 After a successful READ action, the ordinal number of the record read is returned as the status code. 0 Success. The XML I/O action is performed without problem. -1 The XML I/O action is trying to access an XML stream that is not opened. -2 This is an invalid XML I/O action. -3 Invalid mode is specified in the OPEN statement. -4 The XML stream cannot be opened. -5 The XML I/O action is attempting to access an internal DOM (Document Object Model) representation which is not present. DOM enables you to create and modify HTML pages and XML documents as full-fledged program objects. -6 An invalid KEY is specified in the XML I/O action. -7 The end of the XML strea
Problem: Can't get to their data files on the Unix machine. Is there some other way than using SAMBA to make the data on the Unix machine accessible to Windows and Net Express? Doing a NetX publish to Unix is not an option, either. Resolution: Unfortunately, there is no way aside from SAMBA to achieve this capability. If the Unix people can set things up so that Windows sees the Unix file system as a mapped drive, then Net Express will work with it. Old KB# 4411#netexpress#COBOL#AcuCobol#RMCOBOL#ServerExpress
Problem: This demo will show how you can use Windows Script Host (WSH) objects to create a shortcut from a COBOL application. Resolution: INTRODUCTION ========== This demo shows how to create a shortcut from a COBOL application on Windows. DESCRIPTION ========= This demo shows how you can create a shortcut on the Start Menu. It uses an api to get the location of the Start Menu and then creates a shortcut in that directory. After running the demo you should find a Link in your StartMenu that opens the Micro Focus home page. SOURCE FILES ========= wshshortcut.cbl CreateShortCut.app ========================================================== Keywords: demonstration, sample, example, demo, CreateShortcut.zip, Shortcut demo.ex demo.ne Attachments: wshshortcut.zip Old KB# 4409
Problem: For batch applications using cbllink.exe on the command line, how are the "Application Complete" and "Click OK" pop-up windows suppressed? Resolution: When invoking cbllink.exe from the command line, omit the "/g" command line switch. The "/g" switch marks the executable as a graphical application. When running unattended, batch-mode applications should not be marked as graphical, since this would require operator intervention for responding to pop-up windows. Old KB# 4426
Problem: Need a way of obtaining a random sample from approximately 960,000 claim numbers. Can the RANDOM function be used for this task. Resolution: The RANDOM function is not really geared towards such a task. The RANDOM function will generate a unique sequence of RANDOM numbers given a seed value argument. The return value from the function will be a floating point COMP-2 number with a value greater than 0 and less than one so it will always be a fractional number and can sometimes be negative. If this function is used to generate a specific range of numbers then the result should be multiplied by a constant value and the result should be checked that it falls within the specified range. Old KB# 4447
Problem: Applications that perform very large SORT operations can often take quite some time to complete the process. However it is possible to inrease the performance of a SORT application by increasing the amount of memory used by SORT by conguring the SORTSPACE environment variable. Resolution: By default, SORT uses 1MB of memory when performing SORT operations. This amount can be increased however by setting the SORTSPACE environment variable to specify a greater amount of memory, for example SET SORTSPACE=256MB The more memory you define, the quicker the sort. We found that using the settings below produced the following results when performing a SORT operation against 1 million records: SORTSPACE TIME TAKEN 2MB 39s 1
Problem: In .NET WinForms how to show a form as a Modal Dialog Box? Resolution: Showing a form as a Modal Dialog Box by using the "ShowDialog" method. This will display the form as a Dialog Box and return a value that allows to determine if OK orCANCEL was pressed. For example: set ls-result to ls-Form4::"ShowDialog"(self) The ShowDialog method takes the parent window as a parameter. Old KB# 4408
Problem: When the "Remember this" logon option is set, compiling DB2 programs will no longer present the logon dialog. How to get the logon dialog to show up again? This would be necessary to use a different user id and password Resolution: The following can be found from the DB2 documentations: ________________________________________ Compiling Programs that use a Remote DB2 Server To compile a program that uses a remote DB2 server, you must first connect to that remote server. The DB2 ECM first attempts to connect to the database using the default values for the client workstation you logged on with. If the logon fails, the DB2 ECM will invoke the Micro Focus SQL Logon dialog in which you can then enter a logon ID and password for the database you are trying to compile your program against Automated Compiles Having the graphical logon dialog appear might not be acceptable for automating compiles from a background process such as a command f
Problem: Using a Treeview control how can you put a Node into Edit Mode ? A tree view allows you to edit the label of a TreeViewItem. Can you programmatically force a item into this mode. Resolution: You can do this using the "EditLabel" method. The following code snippit shows how you can create a treeviewitem and put it into edit mode:- INVOKE aTreeview "addItemZ" USING aTreeView Term-Field RETURNING ws-treenode &n
Problem: Cannot find ygrep32.dll when compiling a COBOL program. This error occured when rebuilding a COBOL project in Net Express. Resolution: The ygrep32.dll is used by the PCOMMAIN precompiler that is supplied with the Migration Toolkit. Moving the ygrep32.dll to a directory pointed to by the PATH statement resolved the problem. Old KB# 4405
Problem: Windows Vista differs from earlier Windows operating systems (eg. Windows XP) in that you must take into account security restrictions which are defaulted into the operating system. As it stands only NetExpress 5.0 and NetExpress 5.1 are currently supported on Windows Vista. Before installing any wrappack, fixpack or hotfix it is stronly advised to carefully read the installation instructions on the SupportLine "Products Update" website page as there are specific installation instructions for each wrappack. The aim of this article is to emphasise further security issues pertaining to Windows Vista which are not mentioned in the installtion instructions on the website. If you do not amend the security settings indicated below, you will get the an error message when attempting to install the patch which will be along the lines of: "Server 5.0 WrapPack #005 has not been installed. Please contact Micro Focus Sup
Problem: Release 4.0: While debugging within IDE and trying to change a value the Net Express IDE crashes completely with an unexpected error, s. attached snapshot. What to do to prevent this? Resolution: Probably, there are some Net Express common files not registered in the Windows registry correctly. Take a look here first: ..programs\\common files\\Micro Focus for Hex3.ocx, Hex5.ocx, Valueedit.ocx To register those files again via the Windows command line use regsvr32, i.e.: >regsvr32 Hex3.ocx and the problem gets rid off. Attachments: 2145552.JPG Old KB# 4406
Problem: When creating a new mapping for a Web Service from legacy COBOL code, you may find in doing so that the case of the legacy COBOL code is lost - for example all converted to lowercase. This may cause you a problem if you have a requirement for the case to be as in the original code, for example (lower-) CamelCase. Resolution: Specify the PRESERVECASE directive in your program program: $SET PRESERVECASE This will then ensure that the original case is preserved as required. Old KB# 4429
Problem: Release: 5.0 WrapPack 5: Es wurde die Basisversion Net Express 5.0 und anschliessend sofort das WrapPack 5 installiert: Nunmehr können keine HTML-Seiten im Form Designer geöffnet werden sowohl als normaler Benutzer oder auch als Administrator. Das Programm meldet: "Form Designer requires Microsoft Internet Explorer 401 or greater to be installed on this system. File 'formdctl' error code 240 Object reference not valid" obwohl Internet Explorer 7 installiert ist (Standard mit Vista). Resolution: Der o.g. Fehler war mit Net Express 5.0 WrapPack 3 (V 5.003.0082) gefixt worden und unglücklicherweise ist diese Lösung im nachfolgenden WrapPack 4 sowie im WrapPack 5 nicht enthalten. Das bedeutet: Ist die Version des WrapPack 4 (V 5.004.0064) bzw. WrapPack 5 (V 5.005.0025) installiert und es wird der oben beschriebene Fehler angezeigt, dann zur Bereinigung den Micro Focus Knowledgebase Artikel Nr. 24961 vergl
Problem: This error can occur when the 4 backup folders for CFG, MNT, SYS, TUT become locked or are set to read only. These backup folders are named cfg_bak, mnt_bak, sys_bak, and tut_bak respectively and they are located in C:\\Program Files\\Micro Focus\\Net Express 5.0\\MFSQL by default. Please remember that you need to be logged in as an administrator to perform this update, and you need to be logged in as the same user who installed Net Express. Resolution: Resolve the issue by selecting these folders, going to Properties, and unchecking the Read Only box. You may need to adjust the permissions on the folders to allow read, write, and delete access. In extreme cases you can delete (or rename) and recreate these 4 folders to allow the installation to complete. Old KB# 4455
Problem: When converting sort exits(E15, E35), the definition of the required fields in the online HELP menu(DFSORT) in Net Express is very good; but there were three fields that caused problems (ENTRY-BUFFER, EXIT-BUFFER, and EXIT-AREA). The first two fields were resolved by making the linkage area a copybook and using a replacing to change the length but no one has any idea of how to define EXIT-AREA. Is there a calculation that is used to figure out the size? EXIT-AREA is defined in the help system as 'Exit area scratchpad used by the exit to maintain variables between calls to the exit program'.. Resolution: The EXIT-AREA is 256 bytes and the length is not set (though according to the IBM documentation it should be set to 256). This area is not used by SORT, it's to maintain variables between the calls to the E15 and E25 exits. Entry from IBM DFSORT docs below. Each time DFSORT calls the COBOL E15 or COBOL E35 user exit, it p
Problem: Release 5.0: Rebuilding RELEASE\\FTP-UPRO.dll Creating library RELEASE\\FTP-UPRO.lib and object RELEASE\\FTP-UPRO.exp FTP-UPRO.OBJ : error LNK2001: unresolved external symbol _FtpFindFirstFileA@16 RELEASE\\FTP-UPRO.dll : fatal error LNK1120: 1 unresolved externals Rebuild complete with errors This failure is related to CALL WINAPI "FtpFindFirstFileA". Resolution: In that case it was helpful to change the WINAPI call-convention from 74 back to 66 to resolve this external symbol as well while linking a DLL. Old KB# 4439
Problem: Fileshare blocking is a new feature in NetExpress 5.0 which allows the client to read up to 64K records in a single operation, which should improve sequential file access. How to use the feature? Resolution: File must be open input (read access only) by all users or this technique is not applicable. In FHREDIR.CFG, add the following line: /bl n where n is a number, such as 100, which is the number of records to read ahead. Concrete example: /bl 100 Acceptable value range is 1 to 65535. Note: the maximum amount of data that can be read in one block is 64K, which would be a combination of the number of records, and the record length. Too small a record count will fail to improve performance. Too large a record count will waste time and memory bringing in more data than is actually in the file or more data than the program will actually use. Old KB# 4414#RMCOBOL#ServerExpress#COBOL#AcuCobol#nete
Problem: A macro was created in msexcel to fill column "J" with color Gray. Editing the macro shows the following VB code. Sub Macro1() Columns ("J:J").Select With Selection.Interior .ColorIndex = 15 .Pattern = xlSolid End With End Sub Question: What's wrong with this code? invoke ExcelObject "getColumns" using z"J" returning CellRange. invoke CellRange "setColorIndex" using by value 15. invoke CellRange &n
Problem: SDE under Linux / Unix Terminal: functions do not work Resolution: sde, animator and the mflm tools are mostly optimized for an 80x25 VT100 Terminal emulation. If these tools do not work then you should find out which Terminal is set on your machine by typing: echo $TERM Is there another string as vt100 or xterm-color (sometimes this works fine), change your Terminal by entering in : export TERM=vt100 or export TERM=xterm-color Old KB# 4490
Problem: How can you disable the Keyboard BEEP in a Character Dialog screenset ? When you enter the maximum number of characters in a field a BEEP is output to notify the user that there has been an error. Resolution: You can configure this behavour in the Dialog DSDEF.CFG config file. To disable the BEEP on end of field you need to add NOBEEP-EOF. There are also options NOBEEP-EOS and NOBEEP-INVALID which turn off BEEPs on end of screen and invalid keys respectively. Old KB# 4448
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.