Browse all forums dedicated to the Rocket® COBOL product family.
Recently active
Problem: A program uses the SPZERO compiler directive. The directive causes space characters in numeric data items to be treated as zeroes. While performing the STRING operation on a string and a numeric data item and displaying the result, outputs spaces rather than zeroes for the numeric data item. Resolution: The SPZERO directive treats spaces or undefined numeric data items as zeroes, 'internally'. This allows the data item to be used in IF statements, MOVEs and calculations. Perform a literal move to the data item to be able to STRING and DISPLAY the zeroes. MOVE zeroes TO ws-num. DISPLAY ws-num. Old KB# 3871
Problem: How can you send an email from Net Express using SMTP ? Resolution: You can do this by using the "CDO for Windows 2000" COM Objects supplied by Microsoft with Windows 2000 and above. A sample showing how you can use this from COBOL is attached. Attachments: cdo.zip Old KB# 3892
Problem: You can use embedded printer escape sequences when printing using the syntax such as:- SELECT PRINTFIL ASSIGN TO PRINTER WS-PRINT-NAME ORGANIZATION LINE SEQUENTIAL FILE STATUS IS FILE-STATUS. WS-PRINT-NAME contains "\\\\PRINTSERVER\\printername". and standard COBOL File IO. Some printer ignore the control characters. Resolution: This is caused by the COBOL file handler inserting a NULL character before each control character. Some printers just ignore these extra null characters so they continue to work but some printers don't int
Problem: It can be interesting to dynamically set, for test purposes or whatever, a COMMAND-LINE within a program.... How to do it? Resolution: The sample code pasted below show how to: working-storage section. 01 CMDline pic x(100). 01 CMDline1 pic x(100). procedure division. move "1 2 3 4 5 6 7 8 9 10 " to CMDline display CMDline upon command-line accept CMDline1 from command-line display "CMDLINE received " CMDline
Problem: Release 4.0: After rebuilding a file with duplicate keys the run time error 9/077 appeared when deleting the duplicate. Resolution: It is related to the large number of duplicate key values (20354) in alternate key 1 in that case. It is falling foul of some incorrect error checking in the filehandler whilst processing a delete operation (which in the end is causing the file to be corrupted). This code was corrected as the result of rpi no: 1053279 which is fixed in Micro Focus Studio 5. Workaround: In this case the problem can also be worked around by increasing the nodesize of the file to 4K using rebuild (ie create an extfh.cfg with NODESIZE=4096 and rebuild the file). This will increase the number of alternate keys that can be held in a node so that the total number of nodes needed to store the maximum number of alternate keys (65535) cannot trigger the incorrect error checking code. With the file containing the duplicates it does and the nodes
Problem: Release 4.0: When using the Profiler Utility to analyse the performances of the programs a large part of the time spent seems to go to an 'unnamed paragraph' part shown in the output. Total time: 9234 milliseconds. Module called once. % time time entries ms/entry paragraph ------------------------------------------------------------------------------- 98.69 9113 1 9113 Unnamed Paragraph 0021 0.99 91 1 91 A8 0.11 &nb
Problem: Project is on a shared network drive. When run, gets runtime error: System.TypeInitializationException was unhandled Resolution: Need to change the Permission Set for LocalIntranet_Zone code group: Open the .NET Framework Config Wizard: Control Panel > Admin Tools > Microsoft .NET Framework 2.0 Configuration On the Configuration Wizard, go to: My Computer > Runtime Security Policy > Machine > Code Groups > All_Code > LocalIntranet_Zone Right click on LocalIntranet_Zone and go to Properties On the Permission Set tab click the dropdown box and select FullTrust Click OK Old KB# 3854
Problem: How to convert to UTF-8 format in Cobol? Resolution: This documented in a Microsoft SQL article (Q232580):- Translate to and from UCS-2 or UTF-8 as appropriate within the application. Sample code for this type of conversion is located at the Unicode Consortium's site: <http://www.unicode.org/Public/PROGRAMS/CVTUTF> A high-level description of the algorithm to convert UCS-2 to UTF-8 can be found in the Internet Request For Comments document RFC2279. On Windows NT or Windows 2000, you may use the Win32 functions MultiByteToWideChar and WideCharToMultiByte to convert UTF-8 to and from UCS-2 by passing the constant CP_UTF8 (65001) as the first parameter to the functions. If you can live with a Win32 only solution the api calls will give you the easiest solution. Old KB# 3852
Problem: Release 4.0: Is there a possibility to integrate this WinCVS product in Net Express? Resolution: Yes, if the product supports the Microsoft's SCCS interface you should be able to integrate into Net Express any source control system you want. For detailed information how to integrate / to maintain this please see KB articles no. 18779 also 20096. Old KB# 3894
Problem: How can I calculate the length of a UNICODE string? Resolution: The following code fragment illustrates one method of calculating the length of a UNICODE string: working-storage section. 01 account-name-text pic n(20). 01 account-name-len pic 9(3). 01 w01-s1 pic 9(3). procedure division. initialize account-name-text.  
Problem: what is the max length of an 01 level? Resolution: Limits on the Size and Number of Data Items The following table shows the maximum size and number of data items. Data Item Maximum Size or Number ______________________________________________________________ Alphanumeric/Group 256 Mbytes Alphanumeric Edited/ & Numeric Edited Can consist of 32 parts, each of which can contain up to 16 occurrences of a single edited character type subject to a total size of 512 bytes Numeric 18 digits COMP/COMP-5 format 8 bytes EXTERNAL data item No specifiable limit ACCEPT FROM CONSOLE Limits (if any) are imposed by the operating system. ANSI DISPLAY No limit, on this COBOL system: Old KB# 3845
Problem: Yo might be getting error 48 on a write to file in subprogram. Main_Program opens file output and writes header record to the file, no errors. Main_Program calls Sub_Program. In the Sub_program when try to write to this file opened in Main_Program get error 48 file status. Resolution: Make sure the compiler directive ASSIGN(External) is used for the file. In both the Main_Program and Sub_Program, the FD section for the file lets call the file "File_out" need to add external to the FD. This will prevent the error 48 from occurring. For example: FD File_out External. 01 File_out_record PIC X(1000). Old KB# 3902#netexpress#RMCOBOL#COBOL#AcuCobol#ServerExpress
Problem: Calling a Visual Basic class program in .NET from COBOL gives a 173 error message that the dll cannot be found (Load error : file xxxxxx error code 173. pc=0, call=1, seg=0). Resolution: First of all, make sure that the reference to the DLL is correctly set up. In the REPOSITORY SECTION of the COBOL program, define a class as a reference to a class of the DLL. Make sure the reference is to a class and not a class method. In the WORKING-STORAGE SECTION, define an object reference to this class. To call/invoke a method in .NET from a COBOL program use 'invoke' rather than 'call' to interface with other .NET languages. Old KB# 3870
Problem: Applications will have .EXE programs calling DLLs. The COBOL progams used to create the >DLLs may have multiple entry points in addition to the main entry point or there might be multiple COBOL programs built into the one .DLL. Will the LIB file be kept and will LINK resolve calls to these entry points? Resolution: Check the related tab for a complete example project. =========================================================== M I C R O F O C U S N E T E X P R E S S =========================================================== &
Problem: Traditionally, the use of multiple versions of the same COM Object on a single machine has proved difficult to maintain and implement. In addition, tighter security requirements have made the registering of a COM DLL more difficult. It may be a hardened server with a deduced permissions set that does not allow the registry to be updated. Resolution: Windows XP/Windows 2003, and above, introduced a solution to this issue called Side-by-Side assemblies. This allows you to use application manifest files to specify what COM components are available to the application. At runtime the operating system (OS) will use the information contained in the application manifest to locate the COM DLL for a specific "progid" (or GUID). (Note: A .ZIP archive file containing the full demo supporting the subject of this article is available for downloading at the bottom of this page.) What is the "manifest"
Problem: If you have code that uses the call to _codeset, as in previous versions of Netexpress (4.0 and earlier), but now in version 5.0 you try to link in the required cs module, you will get an error stating the cs object can't be found. Resolution: As of Netexpress 5.0, the cs OBJs are no longer required as they have been built into the codeset program. Old KB# 3908
Problem: To remove the 'This web service is using http://tempuri.org/ as its default namespace' message. Resolution: In the Net Express IDE, select 'File', 'Open Service Interface's. Right Click on the Web Service Select 'Settings' Under, Service Name, click the 'Advanced' button to bring up the 'Service Namespace settings'. What you put in here populates the field on the previous pane Old KB# 3843
Problem: How do I receive parameters the way Mainframe parameters were processed? Resolution: There is a complete project available under the "Related" tab. =========================================================== M I C R O F O C U S N E T E X P R E S S =========================================================== PROJECT TUNABLE-PARMS ==
Problem: Why does Studio 5 require the .NET framework to be installed on my machine for the setup to install Studio 5 (Net Express 5) successfully? Would my application require the .NET framework to run? Resolution: The .NET framework SDK 2.0 is mandatory when installing Studio 5 because it used by some of our components within the Micro Focus Net Express IDE. But that doesn't mean that the application generated with them requires .NET. For example, the IMTK (Interface Mapping Toolkit is used to convert a COBOL program to a Web Service) requires the .NET framework SDK 2.0 to run, but the Web Service generated with it doesn't require the .NET framework SDK 2.0 to run, it just requires Enterprise Server. Old KB# 3849
Problem: Using the call X"A7" function 17 to hide the cursor does not work, a thin line persists on the screen. Resolution: The call-by-number call X"A7" function 17 cannot be used to set the cursor to invisible (hidden). It is possible to hide the cursor in a character-mode linked program (EXE build). The CBL_SET_CSR_POS can be used instead of call X"A7". See online help. Or the WinApis CreateFile and SetConsoleCursorInfo. The attached demo shows, how to do each of them. Attachments: Curs-off.zip Old KB# 3875
Problem: If you are using extfh using direct calls how can you determine the record size of a file ? Resolution: To get the record size you would need to use the Special Operation opcode 06. This will return record length for files that have file header information. This is documented in the file handler documentation supplied with the product. Old KB# 3891#AcuCobol#RMCOBOL#COBOL#netexpress#ServerExpress
Problem: How can you access an App.config file from COBOL in .Net ? For example you may want to store database connection details in an XML Config file and retrieve them at runtime. Resolution: A demo of how to access an XML Config files is attached to this. Some example code to do this is:- $set sourceformat"variable" program-id. ConfigReader. ***************************************************** * * Author - David Sands (Micro Focus Technical Support EMEA) * * Purpose - Show how to access appSettings config data that is *  
Problem: In particular, I'm looking for documentation on how to use the Net Express Application Server process. We did find info on the run.exe program, but am having difficulty in trying to get displays to be redirected to an output file for future review. Is there any documentation available to help us with the Application Server Runtime environment? Resolution: This product provides all the support files necessary to support the execution of COBOL application programs. The way in which Applcation Server gets used is the execution of a COBOL application program. When you create your COBOL application program check the "Dynamic" checkbox and your program will look to the registry on whatever computer it is running to determine the location of the COBOL Run-time files necessary to support execution of the program. If you don't use the "Dynamic" checkbox you must set the PATH and COBDIR environment variables to point t
Problem: Starting rebuild Rebuilding M:\\vf\\SRC-CBL\\ne40\\ALPPEDIT.CBL Rebuilding RELEASE\\ALPPEDIT.exe Creating library RELEASE\\ALPPEDIT.lib and object RELEASE\\ALPPEDIT.exp ALPPEDIT.OBJ : error LNK2001: unresolved external symbol _oops ALPPEDIT.OBJ : error LNK2001: unresolved external symbol _oopsgetclassobject ALPPEDIT.OBJ : error LNK2001: unresolved external symbol _oopssetparaminfo ALPPEDIT.OBJ : error LNK2001: unresolved external symbol _oopsresolve RELEASE\\ALPPEDIT.exe : fatal error LNK1120: 4 unresolved externals Rebuild complete with errors Resolution: - within the IDE, right click on the EXE or DLL - select "Build settings...", tab "Link" - change "category" from General to Advanced - enter in "Link with these LIBs:" "oopss.
Problem: WrapPack install may report that some of FixPacks failed to be applied. It is normal that some FixPacks will not be applied if the associated components (e.g Dialog System, SQL Option for DB2, etc.) are not installed, but this Knowledgebase article addresses a failure to apply FixPacks for installed components. Resolution: The install program (Micro Focus Web Installer) does not handle well paths with $ or %, e.g. C:\\DOCUME~1\\$235\\LOCALS~1\\Temp\\ or C:\\DOCUME~1\\#5\\LOCALS~1\\Temp\\ This is a limitation in the install product, which is no longer used by Micro Focus for its new products. All new products are using Microsoft Installer (MSI), and this handles paths with $ and %. Due to this limitation, WrapPack may fail to apply certain FixPacks if the directory where the TEMP environment variable contains $ or %. The workaround is to point the TEMP environment variable to a directory that does not contain these two characters (e.g. c
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.