Browse all forums dedicated to the Rocket® COBOL product family.
Recently active
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: Method to eliminate 'This web service is using http://tempuri.org/ as its default namespace' message. Resolution: In .Net use a Class Attribute to specify the Namespace that the WebService is in. Example code (changes are highlighted with MFTECH in cols 1-6) to set this is:- $set sourceformat"variable" class-id. Service1 as "Service1" inherits CLASS-WEBSERVICE. environment division. configuration section. repository. interface INTERFACE-ICONTAINER as "System.ComponentModel.IContainer" &
Problem: Trouble sorting a very large file sequential. For example, In the xfh-default: [XFH-DEFAULT] FILEMAXSIZE=8 This file is non-fileshare and is defined as a line sequential. The sort always abends at the same record number no matter how much free space is available. Is it necessary to specify any sortwrk parms or does sortwrk take the xfh-default? Are there any limits to the number of input records or sizes when it comes to sort? Resolution: 1) gigs free doesn't mean its good free space - First check a defrag analysis and defrag if needed; 2) check where temp and tmp are pointing to and make sure this area is not Restricted to a certain size (e.g. its pointing to c: and all the free space is on d:); 3) Rule of thumb has always been that the temporary space required to sort a file is 2.5 times the size of the file. So if the file is 25 GB
Problem: Application von SX4.0 SP2 für Server Unixware 7.1 Problem: Aufruf eines prozeduralen Cobol-Programms von JAVA über das JNI, nachgestellt an Hand des Testbeispiels calc_pi aus dem DEMO Verzeichnis PI des Net Express 4.0: Das Programm funktioniert unter Windows 2000 sowohl von der Kommandozeile als auch im Fenster. Das Programm wurde auf ein Unixware System portiert und dort mit dem Programm cobjrun in einer Terminalsession ausgeführt. Es funktioniert. Nun wurde die Klasse calc_pi innerhalb von Tomcat ausgeführt. Tomcat selbst wurde mt cobjrun gestartet. Es kommt die folgende Fehlermeldung: Exception in thread "main" java.lang.UnsatisfiedLinkError: no libcobjvm_unx_142 in java.library.path at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1517) at java.lang.Runtime.loadLibrary0(Runtime.java:788)
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: 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 the .Net DataGridView control how can you clear all elements in the Grid ? The datagrid view allows you to display a grid show many items of Information. In COBOL how can you clear out all items from the grid. Resolution: The "Items" property of the Grid Control contains a collection of the rows in the grid. You can use:- invoke dataGridView1::"Rows"::"Clear" to empty out the grid control. Old KB# 3893
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: 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: 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: 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: Let's say you have such an error when you invoked a method of a COM component Exception 65537 not trapped by the class oleexceptionmanager. Description: "Server defined OLE exception" (80020009): Exception occurred. Hit T to terminate program. Hit any other key to continue. What does the number between () mean? Resolution: This error means that, for any reasons, the COM server raised an exception: he number between () is the exception number (80020009) What does this number mean? follow this URL http://support.microsoft.com/default.aspx?scid=http://support.microsoft.com:80/support/kb/articles/q186/0/63.asp&NoWebContent=1 and you'll see that, regards to the EXCEPTION pasted above ( as an example ) , the error means (80000009) General access denied error. ... Old KB# 3841
Problem: File Converter - DFCONV V09.B03.09 Converting file - records processed - DFC537 Error during conversion Need to find out the possible reasons for this error. Resolution: For numbers above 500, subtract 500 and then look for that number in the RTS Error Messages topic. In Help type "Run-time system error", click Display, then select "Run-time system error messages" and click Display again. 037 File access denied Fat
Problem: Currently the field value is erased, is there a way to keep the old value and allow an overwrite using adis and the accept statement with screen sections? Resolution: Use the WITH UPDATE option in the Accept statement- From the on-line docs for Format 5 of the Accept statement- If the UPDATE option is not specified, a data item for data entry is displayed initially as spaces, if you set the MS Compiler directive when you submit your source code to your COBOL system. (If the MS directive is not set, the display of initial data is a configuration option.) If the UPDATE option is specified, initial data of the data item for data entry is displayed. Old KB# 3874
Problem: How can I call DSNTIAR from an Oracle (Pro*COBOL) application to retrieve the error message from a SQL operation? Resolution: To aid migration from Mainframe DB2, Oracle provide support for DSNTIAR, to retrieve error message text. With parameters defined thus : 01 ERROR-MESSAGE. 02 ERROR-LEN PIC S9(4) COMP VALUE 240. 02 ERROR-TEXT PIC X(240). 77 ERROR-TEXT-LEN PIC S9(9) COMP VALUE 240. call DSNTIAR with : CALL 'DSNTIAR' USING SQLCA ERROR-MESSAGE ERROR-TEXT-LEN and ERROR-TEXT will be populated with the
Problem: Mapping numeric data types from COBOL to C may cause some unpredictable results when the data items are passed to C and assigned values in C, especially when these are COMP-5 numeric data types. Resolution: C always uses a whole word of memory (4-bytes) when a numeric variable is passed to it as an int or a long int. Data items defined as type COMP-5 in COBOL will store: 1-4 decimal digits in 2 bytes of storage; 5-9 decimal digits in 4 bytes of storage; and 10-18 decimal digits in 8 bytes of storage. This must be considered when passing numeric variables between COBOL and C. For example, consider the following COBOL data structure: 01 ws-group. 03 ws-a PIC 9(4) COMP-5. 03 ws-b PIC 9(9) COMP-5. When ws-group is passed as a parameter to a C program, C finds ws-a
Problem: When using the .Net Framework email classes in the System.Net.Mail namespace how can one attach a file to an email? Resolution: Use the System.Net.Mail.Attachment class to add a file attachment to an email. Some example code for this is:- $set sourceformat"variable" program-id. Program1 as "SMTP.Program1". environment division. configuration section. repository. class cMailMessage as "System.Net.Mail.MailMessage" class cMailAddress as "System.Net.Mail.MailAddress" &
Problem: Following is an explanation on how to collect multiple parameters from command-line. Resolution: Click "Related" tab above 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 =========================================================== PROJECT COMMAND-LINE-ARGUMENTS =============
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 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: 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: How can you convert data/string from EBCDIC to ASCII or vice versa? Resolution: Converting between EBCDIC and ASCII Generally, when you want to do a translation between ASCII and EBCDIC, you should use the callable interface to the GUI File Converter (DFConv). For more information about using DFCONV and the command line interface, see the chapter File Conversion Utilities. There is another function which enables fast translation between ASCII and EBCDIC strings within a Micro Focus COBOL program. This is called "_CODESET". Its usage is: call "_codeset" using function-code, length, string where: function-codePIC 9(2) COMP-X 0=convert EBCDIC to ASCII 1=convert ASCII to EBCDIC lengthPIC 9(9) COMP-X string PIC X(n) Note that "_codeset" cannot work from a program that is compiled with the reserved word directi
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: User wants to accept parameters from the command-line Resolution: Note: The complete example is attached and available under the "Related" tab. INTRODUCTION ============ This example illustrates how you can acquire parameters coded at the command prompt by using the "COMMAND-LINE" function-name. C:\\FOLDERNAME>CLPARMS.EXE MONTH-END<Enter> At the "C:\\FOLDERNAME>" prompt, the "CLPARMS>EXE" program name has been typed followed by the "MONTH-END" parameter. The "COMMAND-LINE" function-name can be used as the second operand of an accept statement to collect whatever has been typed following the program name at the command prompt. accept parameterValue from COMMAND-LINE The firs
Problem: How can you compile at a Windows command prompt. Resolution: The COBOL compiler can be run using the COBOL.exe command and any linking (to EXE/DLL) can be performed using CBLLINK.exe utility. The "Net Express Command Prompt" which is in the Net Express folder on the start menu has the environment already setup for compilation. If you want to perform compilation at normal Window Command prompt you need to run:- "c:\\Program Files\\Micro Focus\\Net Express n.n\\base\\bin\\CREATENV.BAT" (substituting your own path) before the compilation is carried out. Old KB# 3880
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.