Browse all forums dedicated to the Rocket® COBOL product family.
Recently active
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: 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: 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: In .NET it is now possible to create an Inner Class within a class. How to access this inner class from COBOL? Resolution: Accessing an Inner class by defining it in the repository section but there is the need to use " " to denote the inner class. For example: repository. class innerclass as "MyClassLibrary.TheOuterClassName TheInnerClassName" . will allow to create instances of the innerclass. Old KB# 4407
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: 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: 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: 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: 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: Utility, written in C, which allows you to test your printer (independent of COBOL). You will need to modify the C code, so a C compiler is required to use it. Resolution: INTRODUCTION ========== Example of how to do a printer driver check using a non-cobol program. REQUIREMENTS ========== C Compiler OPERATION: ======== Edit the C source, printercheck.c Use the example by modifying the line below to your printer name: char name[] = "PrinterName"; Example: printer name is: \\\\prodsup2\\hp340_5s. This would be coded as: char name[] = "\\\\\\\\prodsup2\\\\hp340_5s";. Attachments: printercheck.zip Old KB# 4366
Problem: This zip files contains the reviewed demos that are provided with the Cobol and .NET - Using Micro Focus Net Express with .NET from Will Price. These revised demos are made to work with Net Express v4.0 and Net Express with .NET including the installation of WrapPack ALL05N40. Resolution: ========================================================== Keywords: Example, sample, demo, demonstration, .NET, cobolanddotnetprojects.zip demo.ex demo.ne Attachments: cobolanddotnetprojects.zip Old KB# 4355
Problem: How to delete an entry from the registry in .NET COBOL? What classes to be used to access and delete information in the Windows registry from a COBOL .NET application? Resolution: There are classes for manipulation of Registry information in the Microsoft.Win32 namespace. Some example code that uses these classes to insert and remove information in the Registry is: $set sourceformat"variable" program-id. RegDemo as "RegDemo.RegDemo". environment division. configuration section. repository. class cRegistry as "Microsoft.Win32.Registry" class cRegistryValueType as "Microsof
Problem: When generating a client in the Interface Mapping toolkit an error was displayed about a missing assembly MicroFocus.COBOL.CodeDom. The error occured in Net Express V5. Resolution: Checking the Global Assembly Cache (c:\\windows\\assemblies) the file was indeed missing. The issue was resolved by opening Add/Remove programs and highlighting Net Express. You can then click on the Support link and REPAIR the install. Old KB# 4378
Problem: Release 4.0: Web service error 605, "Incorrect number of parameters supplied" when calling COBOL Web Service from Tibco General Interface tool. Resolution: The Tibco General Interface tool may create a SOAP request with a tag <SOAP-ENV:Body> which should actually be <SOAP-ENV:Body SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> in order to properly identify the SOAP request as rpc/encoded. Net Express 4.0 Enterprise Server uses the encodingStyle attribute to differentiate between rpc/encoded and document/literal SOAP requests, but with the missing attribute, it thinks this is doc/literal which is not supported for Net Express 4.0 Web Services under Enterprise Server, and issues the 605 error. You can test this by changing the SOAP request coming out of the Tibco tool so that this attribute exists as stated above. Net Express 5.0 Web Services can be rpc/encoded or document/literal and
Problem: How to code a COPY REPLACING statement? Resolution: This is a useful and widely exploited feature within COBOL. However, the syntax can often cause problems and it is hoped the following will give some much needed clarification. The attached demo illustrates one particular use for COPY REPLACING -- the reuse of a file status copybook. If we look at the FSTAT-WS.CPY we see: 01 (tag)-fstat. 03 (tag)-fs-values. 05 (tag)-fs-key1 pic x(1). 05 (tag)-fs-key2 pic x(1). &nbs
Problem: This is the easiest and quickest way to animate a DB2 stored procedure with UDB 8.1 with latest fixes or a later version of UDB. This assumes that the Net Express development environment is installed on the UDB server machine. Resolution: The procedure for animating a COBOL Stored proedure is as follows:- 1. put a call to CBL_DEBUGBREAK within in your stored procedure program 2. compile the stored procedure and create it as a dll 3. link the stored procedure with db2api.lib 4. make sure the stored procedure dll is linked as shared , dynamic and includes the system files 5. copy dll to IBM's sqllib\\function subdirectory 6. run the stored procedure from IBM's development center and enter necessary parameters 7. when the dialog box appears that indicates the RTS has encountered a call to CBL_DEBUGBREAK , do you want to debug - answer yes 8. the stored procedure should pop up in animator, ready for animating Note: R
Problem: How to automate a build of a Visual Studio 2005 project from the command prompt or in a batch file ? Resolution: Visual Studio 2005 has a number of command prompt options. These can be used to automate builds of a Visual Studio Solution. For example:- devenv mycobolsolution.sln /build release or devenv mycobolsolution.sln /build debug to build the project for the relevant release level. Running devenv /? gets a list of all the available options. The above method will work on Visual Studio 2005 but looking at KB 22920 that gives details on how to use MSBUILD. Old KB# 4399
Problem: The following error occurs on each compile/rebuild: Error opening trace configuration file 'c:\\logs\\ctfesjcl.cfg' How to make it to stop looking for that cfg file? Resolution: The trace configuration file is searched when the MFTRACE_CONFIG environment variable is set. Make sure the file and location exists or remove the environment variable. Old KB# 4377
Problem: Makes use of the WebSync Library Manager AddPack. It has most of the functionality of the old function key version of the library manager, but with a Windows interface (Dialog System). Resolution: BUILD W/RELEASE: Tested with Net Express 3.0 and 3.1 INTRODUCTION ========== This application is limited to working with library entries that are no longer than 35 characters in length. Use the "Load" choice to view library entries in the listbox of the application. Use the "List" choice to create a text file of the contents of a library. A backup copy of the library will be created on load of a libray file if the "create library backup" option is checked in the program settings (options menu). SOURCE FILES: ========== Program Files Description ---------------- ----------------------------------------------------------- libman.cbl
Problem: Release:4.0 Redirecting output from the Generate Client using WSDL feature This method was tested with Net Express 4.0 with All Websync WrapPack v4.0.008. Resolution: The Generate Client using WSDL option from the Service menu of the Net Express IDE will create a Web Service client program, proxy program, and copyfile, but it will place them in the project directory. To want to place these files in different locations, it may be better to use the imtkmake command line utility to do the job. The idea here is to create a batch file with the commands necessary to generate the files and move them to the locations where to have them to be. It can add this batch file as a Tool to the IDE (Integrated Development Environment). As an example, the project directory is C:\\MyProject and there is a CBL subdirectory for source code, a CPY subdirectory for copyfiles, and a WSDL subdirectory for any .wsdl files, to place the appropriate files in those directorie
Problem: Release 5.0 .NET: Kann Net Express 5.0 .NET mit der deutschen Version von VS2005 installiert werden? Resolution: Ja, das funktioniert. Bitte beachten Sie: Dieser Hinweis gilt nicht für die Visual Studio 2005 Express Edition. Old KB# 4370
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.