Browse all forums dedicated to the Rocket® COBOL product family.
Recently active
Problem: If you store dates in a DataGridView TextBox column then it will sort the column in Alphabetical order. This makes the dates out of order when dd/mm/ccyy is the format. How can you force the sort to sort based on date order ? Resolution: You can perform custom sorts by handling the Sort_Compare event. An example that would sort in correct date order would be:- method-id. "dataGridView1_SortCompare" final private. 01 ls-date1 type "System.DateTime". 01 ls-date2 type "System.DateTime". procedure division using by value sender as object e as type "System.Windows.Forms.DataGridViewSortCompareEventArgs".  
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: 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: Trying to validate alphabetic characters in numeric fields (i.e to get rts error 163 returned) in an application that has the RM compiler directive set, the validation is not applied in all cases. Even with the COBSW= F environment variable set to force the validation it doesn't work. Resolution: Take the following code: $SET RM Working-storage section. 01 numerica pic 9(3). 01 alfabetica pic x(3). 01 blank-field pic x(3).
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: 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: 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: 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: 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: Given: 01 MyData PIC X(1000). When MyData contains an Ampercent sign, it cannot be used as a normal character so it is substituted as AmpercentHash38Semicolon. When parsing MyData by XML PARSE the ampercent is not returned neither as CONTENT-CHARACTER nor as CONTENT-CHARACTERS Hint: The wording Ampercent, Hash, Semicolon used in that article to avoid viewing garbage characters in an HTML environment. Resolution: When using AmpercentHash38Semicolon the ampercent is returned in the register XML-NTEXT as CONTENT-NATIONAL-CHARACTER Event. Also, when specified as AmpercentHashx26Semicolon = its hex value. When using AmpercentampSemicolon the ampercent is returned in the register XML-TEXT as CONTENT-CHARACTER Event. When MyData contains: <data>My Data AmpercentampSemicolon Your Data</data> 3 Events will occur and the text have to be concatenated, i.e. by a STRING with POINTER. Old KB# 4435
Problem: You can use the WinHTTP COM objects in Windows to issue HTTP Request from a COBOL Application. How can you specify timeout values for the HTTP Request ? Resolution: WinHTTP has a "setTimout" method that allows you to specify :- ResolveTimeout ConnectTimeout SendTimeout ReceiveTimeout To call this from COBOL you would first need to set the OLE Dispatch type as the method name starts with "set" so by default COBOL would attempt a property fetch. The code on COBOL you need to issue would be:- invoke olesup "setDispatchType" using by value 0 ******* The next line would force a timeout * invoke ws-winhttp "setTimeouts" using by value 500 500 500 500 ******* We can set to something more reasonable for the
Problem: In Winforms you can use the Tooltip provider to add tooltips to controls. This allows you to define tooltips at design time for the controls on a Form. How can you change tooltip text at runtime from COBOL ? Resolution: You can do this using code such as :- invoke tooltip1::"SetToolTip"(numericupdown1 , "New Text for tooltip") tooltip1 is an instance of the tooltip provider that was added to the form. Old KB# 4437
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: Is it possible to pass an ODBC connection from another language such as C or powerbuilder and use the connection from OpenESQL. Resolution: This is not supported. In COBOL you can do a GET HDBC or a GET HENV to get some ODBC handles to the OpenESQL connection. These handles can then be used in direct ODBC API calls. However you cannot be passed an ODBC connection from C or Powerbuilder and bind that as an OpenESQL connection. Under .Net you can do something like this if you use ADO.Net. You can be passed a .Net connection and transaction object and then bind the ado.net connection object to OpenESQL. That however is only under .Net. Please see KB 24812 from more information on sharing a connection in .Net. Old KB# 4451
Problem: When trying to run a COBOL/.ASP .Net application that has been deployed to Micro Focus Server you may see a security exception when trying to access the web page that accesses the COBOL code: Security Exception Description: The application attempted to perform an operation not allowed by the security policy. To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file. Exception Details: System.Security.SecurityException: Requested registry access is not allowed. Source Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. Stack Trace: [SecurityException: Requested registry access is not allowed.] System.ThrowHelper.ThrowSecurityException(ExceptionResource resource)
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: Example of how to use the .NET Framework Mutex class to detect if more than 1 instance of an application running. Resolution: Tested with Net Express 5 ================ INTRODUCTION ========== Example of how you can use the .Net Framework Mutex class to detect if you have more than 1 instance of an application running. REQUIREMENTS: ========== Visual Studio 2005 and .NET Framework ========================================================== Keywords: demonstration, sample, example, demo, AppInstance.zip , Mutex demo.ex demo.me d
Problem: Keyboard utility program that will test the old and new keyboard functions. If the new functions do not work and having a 16-bit character based application, the COBSW K1 switch can be used. Resolution: ========================================================== Keywords: Utility, doskey.zip demo.ex demo.ne Attachments: doskey.zip Old KB# 4361
Problem: Can COBOL support Dynamic Arrays? Resolution: Micro Focus only support Dynamic arrays in COBOL.Net where an array can be defined as:- 01 myarray object reference cMyClass occurs any. and then do:- set size of myarray to 100 On Non .Net platforms (Server Express and Net Express) then there is a need to use one of the OO Collection classes. There is an Array class (for example bytearray) that should do what is required. Depending on the requirement there are also other collection classes that could work depending on what the exact needs are. The only other solution would be to put the definition of the array in LINKAGE SECTION and allocate it dynamically. For example:- LINKAGE SECTION. 01 my-array. 03 my-item pic x(100) occurs 1 to 1000000 depening on ws-length At runtime the c
Problem: MFSupportInfo - Utility program to gather up workstation and products information. Resolution: Attachments: MFSupportInfo.zip Old KB# 4365
Problem: This technical bulletin is meant as reference material in helping you provide us the necessary information required before contacting the Micro Focus SupportLine group. Resolution: See attachement. Attachments: HowtosubmitaNetExpressSupportProblem.zip Old KB# 4363
Problem: Trying to convert in batch a record sequential EBCDIC file to a record sequential ASCII file via >run dfconv xyz.pro gets back immediatly: Execution Error 114: "Attempt to access item beyond bounds of memory (Signal 11)". Net Express doc files do not explain why this happens, so the first meaning is something goes wrong around the size of this file, but no errors occur converting another large 2GB file. Is there an additional hint available to get rid off this problem? Resolution: Yes, to check both the Convert Profile (.pro) also the Record Layout (.str) to ensure that they are related to the data file correctly. In that case the Convert Profile .pro did not fit the data file because the record length used was too long. Old KB# 4381
Problem: It is generally considered good practice in COBOL to use explicit scope termination statements such as END-IF and END-EVALUATE. Resolution: Using the IMPLICTSCOPE directive to accomplish this. The program:- $set NOIMPLICITSCOPE WARNING(3) working-storage section. 01 ws-data pic x(10). procedure division. start-section section. evaluate true when ws-data = "hhh" continue
Problem: Having more than one program to build into a .NET executable from the command line. For example: Considering about having 3 programs - proga.cbl, progb.cbl, and progc.cbl to be able to rebuild them from the Net Express command line so that proga.cbl will become the main.exe and progb.cbl and progc.cbl become components of the proga.exe. Resolution: To achieve this by making use of ILSOURCE - to use the following command line from a Net Express command prompt as a template: cobol proga.cbl ILSOURCE (progb.cbl) ILSOURCE (progc.cbl) ILGEN After running this command there will be a proga.exe, and opening a Visual Studio command prompt and to change directory to the location of the proga.exe and running the command ILDASM proga.exe will show the components and programs that make up the proga.exe. Old KB# 4402
Problem: Using UNC path from the CMD did not work Resolution: Microsoft's command line is not able to handle UNC pathes, i.e. \\\\server\\resource\\program when called from a program. The message occurs "\\\\server\\resource\\project\\program CMD.EXE starts with this path. UNC-Pathes are not supported. Using the Standard Windows Path." Solution is to map the remote drive by using 'net use'. Old KB# 4341
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.