Browse all forums dedicated to the Rocket® COBOL product family.
Recently active
Problem: Is there a way to reset a user associated with files that have previously been checked-out in the Project Management Utility? The customer ran the query to reset the locks (as they had problems checking in and checking out files) which worked fine, i.e., the page is no longer checked out BUT the USER associated with the Checkout is still listed in RED. Is there a way to reset this? Resolution: A database administrator for the underlying database could issue the following query against the ELMasterRepository ODBC DSN using their favorite SQL tool or via http://localhost/stadmin/query.html : UPDATE pm_pageinfo SET checkedoutto = NULL, checkoutlocation = NULL, checkoutcomment = NULL, checkoutdate = NULL WHERE pageno IN (SELECT pageno FROM pm_p
Problem: Can you have large numeric data items greater than 18 digits - pic 9(18)? Resolution: The INTLEVEL"4" compiler directive can be used to declare long numeric data fields, PIC clauses greater than PIC 9(18), up to 31 digits. Old KB# 5824
Problem: How can I compute Square Roots and Cubed Roots? Resolution: To find the square root of a number in RM/COBOL, use this statement: compute RESULT rounded = NUMBER ** 0.5 Use 0.33 for the cubed root. The "rounded" phrase is needed because the number 4 returns a root of 1.99..., only bigger numbers (9 and up) return the correct whole number for the root without rounding. The ** operator performs exponentiation when used with a whole number instead of a decimal. Old KB# 6113
Problem: How do you right-justify a numeric value? Resolution: If a numeric value is accepted in an alphanumeric field, (which is left- justified) and it needs to be right-justified, try the following code: 01 alpha-item pic x(10). 01 move-item redefines alpha-item pic z(10). 01 num-item pic 9(10). ... accept alpha-item. move move-item to num-item. display num-item. This should cause num-item to be right-justified. A direct move won't work because we pad alphanumeric fields with trailing spaces, and these spaces don't get stripped. Old KB# 6114
Problem: Converting a data file from EBCDIC to ASCII that contains packed numeric fields (usage COMP-3) using DFCONV from the command line, or alternatively the File Convert data tool from the Net Express IDE, results on corrupted data in the numeric fields. Resolution: The problem may be that the packet fields are not EBCDIC character data, they are just numeric data that follows a particular format (packet decimal) but it always follows the same format whatever the OS. I will give you an example. If you have the following hexadecimal data from the mainframe: 94 2C What would you say it is? It could be the value 924 in packet decimal format, but it could also be the EBCDIC string "k<". If you tell the File Convert tool that your file is all in EBCDIC, it will take it as the string "k<" and generate its ASCII equivalent, in hexadecimal: 63 BC This is perfectly valid if it really was the string "k<", but if that
Problem: Why do I get a 204 Error on CALL "SYSTEM"? Resolution: The limit on the number of bytes for a Windows command line is 130 (per the RM/COBOL User's Guide). A command line greater than that could clobber data structures. If the command is too long, it will return an error 204. Old KB# 6124
Problem: Release 4.0: Receving a return code 14605 for a file operation using a call_by_name CBL_ routine Resolution: 14605 is a decimal number representing the related run time error in two bytes basically in hex format: '390d', the most right byte hex '0d' describes a value of '013' decimal. You can find more information about run time error '013', and all other cases, here: Net Express Help -> Index -> Run-time system -> error messages -> Run-time System Error Messages ->refer to 013 -> File not found If you want to act programmatically take a look here: http://www.microfocus.com/Resources/Newsletters/SupportLine/20051101-index.asp#TechnicalArticles >Interpreting the Return Code of a Library Routine< Old KB# 5796
Problem: You want to convert a string (e.g. "12.3") to decimal data type in .NET. Resolution: program-id. DecStrConv as "DecStrConv". environment division. configuration section. repository. class stringClass as "System.String" class decimalClass as "System.Decimal" class convertClass as "System.Convert" . data division. working-storage section. 1 myString object refer
Problem: Deploying a web service and creating a COBOL client for that service in Visual Studio 2005 and Net Express v5.0 Resolution: Steps: Creating the Web Service: Create a blank solution in VS File | New | Project | Other Project Types | Visual Studio Solutions | Blank Solution Add a new web service or an existing one In Solution Explorer, Right click on the solution, Add | New Web Site (or Exisitng Web Site) For New Web Site, in the Language dropdown choose COBOL, then the ASP.NET Web Service Template. The Template already has a Hello World method. Add any methods you want, rebuild and save. Deploying the Web Service: In Solution Explorer, right click on the solution, Add | New Project | Other Project Type | Setup and Deployment | Web Setup Project Under File System on Target Machine, make sure Web Application Folder is selected, then go to Solution Explorer and right click on your Web Setup Project. Select Add | Project Out
Problem: Release 4.0: Migrating from IBM's DB2 and compiling a source including Oracle's SUM and CASE function respectively: SELECT ... SUM(CASE TRIGGERTABLE WHEN 'RS032' THEN 1 ELSE 0 END) ... and getting back compiler error: COBCH0149S No SQL directives have been set : N:\\mf_ora\\Source\\cobol\\RS032.cbl(143,15) COBPR0000S 000400:Encountered the symbol "TRIGGERTABLE" when expecting one of the fol : N:\\mf_ora\\Source\\cobol\\RS032.cbl(147,44) COBPR0000S 000400:Encountered the symbol ")" whe
Problem: Running a Dialog System application with a Calendar control the following error may occur: OLE returned an error H"800401F3", invalid class string. Resolution: This error indicates that the ActiveX control has not been registered in the operating system. Iit would appear that the Calendar control is supplied as part of Microsoft Office (MSCAL.OCX). You will need to have installed Office on the machine. For more information see: http://support.microsoft.com/default.aspx?scid=kb;en-us;279098 Old KB# 5802
Problem: How can I handle Dates and Null Values in Relativity? Resolution: Some of our Relativity customers have experienced problems with the use of date fields from COBOL applications. The problem primarily occurs because many applications written in COBOL make use of certain field characteristics that cause a date field to be invalid in ODBC applications. For instance, a date field in COBOL that contains spaces or zeroes is perfectly acceptable since the application code can test for those values and take appropriate action. Whereas, when ODBC tools employ a field which is defined as being a date, it must only contain a valid date. As a way around this problem, some Relativity installations have avoided the use of Date Transforms and simply used the date as a numeric field so that the ODBC application avoids any date checking. This solution doesn't overcome all the issues, but it does limit the need for intervention to some degree. All that needs to take place is t
Problem: Release 5.1: The Net Express Animator fails with runtime error 173: Called program file not found in drive/directory ...\\progname.exe while trying to start a 64bit application on a Net Express command prompt via: >mfnetx /debug:progname Resolution: To resolve this issue use instead: >mfnetx /debug64:progname For more information, please s.: Help: Reference: Command Line Reference: Handling Projects and Debugging from the Command Line: Old KB# 5914
Problem: What's the maximum size of Working Storage? Resolution: There are several limits that apply to Working Storage: The maximum length of an elementary data item is 65280 characters. The maximum length of an element of a table is 65280 characters (that is, data items subordinate to an OCCURS clause cannot exceed 65280 characters in length). The maximum number of occurrences of a table element is 65535. That is, in an OCCURS clause, the value of integer-2 must be less than or equal to 65535. However, the total size of all data defined in WS can be as big as memory allows. Old KB# 6112
Problem: Using Sql Server and getting error message "Connection is busy with results for another hstmt" . which is caused when using Firehose cursors (client-side). Need to force server side cursors in my application. Resolution: Although client-side cursors are much faster than server-side cursors there is the SQL Server limitation that you can only have one client-side cursor open per connection. Microsoft introduced fastfoward readonly cursors to alleviate the limitation of working with firehose cursors. To force a server side cursor you can set scrolloption or use the new SQL compiler directive BEHAVIOR specifying primitive options to force a fastfoward readonly (server-side) cursor. In either instance the following sql compiler directive is required SQL(TARGETDB=MSSQLSERVER). 1. setting scrolloption EXEC SQL SET SCROLLOPTION FASTFORWARD END-EXEC or specifying it in DECLARE CURSOR statement EXEC SQL DECLARE CS
Problem: Receiving an error running MFSORT - error is SORT042U. Cannot find MFSORT documentation that lists this message - is there a complete set of MFSORT error messages ? Resolution: Open Net Express Help and click the "Contents" tab. Then open these folders: Reference File Handling Sorting Files Mfsort and click the "Error messages" document. The messages are grouped into 0001 through 0099 and 0100 through 0199. Your error is within the first group. SORT042U Memory allocation failure The mfsort utility was unable to allocate the required memory. Resolution: Try reducing the value of the SORTSPACE environment variable. See Also: Environment Variables SORTSPACE The amount of memory to be allocated to internal workspace for SORT operations. This can be specified in different formats: for example, you could specify 64M, 2G, and 10000
Problem: 'Verify Server Settings' returned this error. Resolution: Norton Internet Security was enabled on the PC and did not for some reason report that it was blocking access to this IP. When this was resolved, publishing worked OK. Old KB# 5804
Problem: If you have applied IBM FixPak 10 to DB2 UDB V8.1 / V8.2, a SYSIBM:CLI:-805 error trying to access SYSIBM.SQLTABLES may occur when attempting to connect to the DB2 database to retrieve the list of tables from within the ESQL Assistant. Resolution: Per the IBM FixPak Readme for FP 10, you will need to manually re-bind to the database. See the IBM Support Alert at http://www-1.ibm.com/support/docview.wss?rs=71&context=SSEPGG&dc=D600&uid=swg21215626&loc=en_US&cs=UTF-8&lang=en for information on how to solve this. As documented in the IBM FixPak Readme file for DB2 Version 8.1 FixPak 10, you will need to bind the db2schema.bnd file against each database, as follows: At a command prompt: db2 terminate db2 connect to <database-name> db2 bind <path>/db2schema.bnd blocking all grant public sqlerror continue db2 terminate ...where <database-name> represents the name of a database to which the utilities sh
Problem: When attempting to install Net Express .NET the Visual Studio.Net prerequisite CD asks you to insert cd-1 and then hangs. Resolution: Ensure that you have at least 128MB of RAM on the machine you are installing to. Old KB# 5810
Problem: Unable to debug C and COBOL programs at the same time -- why? Resolution: This is expected as you can only use on hard mode/low-level debugger at a time in Windows. Both Visual Studio and Net Express use the low-level debugging support i.e. they conflict. Your options to get around this are: 1) Debug the C in Visual Studio and run the COBOL. 2) Run the C from Net Express (Animate Settings) and debug the COBOL. 3) Run the C from the command line and use CBL_DEBUGBREAK. Alternatively, you could switch to .NET where you can have the C and COBOL mixed together within Visual Studio as managed code. Old KB# 5823
Problem: When creating an Excel file from within COBOL.Net the formatting on numeric cells is lost, see example :- 1) Tthe value 123.40 is in a cell, but when opened the file it shows 123.4 2) Also the same with 00100, it shows 100 Resolution: Set the number format on ths cells you require. The "NumberFormat" property on a Range object lets you do this. See the Microsoft doucmentation on this property for full details on what can be set. Some example code for this is:- $set sourceformat(variable) program-id. MSExcel. environment division. configuration section. repository. class cExcel as "Microsoft.Office.Interop.Excel.ApplicationClass" class c
Problem: How do I define "Sparse keys"? Resolution: Sparse Keys A sparse key is an alternate key for which index entries are not created when the key has a particular value. For example, if an alternate key containg all spaces is defined as a sparse key, index entries for the key are not created when the alternate key contains only space characters. Using this feature results in smaller index files. The larger your key(s) and the more records you have for which the alternate key has the given value, the larger your saving of disk space. To enable sparse keys, use SUPPRESS WHEN ALL in the ALTERNATE RECORD KEY clause in the SELECT clause: file-control. select idxfile assign to "idx.dat" organization is indexed &n
Problem: Is it possible to specify a Y2K pivot date with MFSORT? Resolution: Unfortunately there is no way to specify the Y2K pivot year with MFSORT i.e. where the 20th and 21st centuries start. Old KB# 5800
Problem: Das Modify Data Tag (MDT) soll als Eigenschaft eines Feldes im Editor gesetzt werden. Kann üblicherweise bereits für ein BMS Feld eingestellt werden, nicht erst im SEND MAP Aufruf. Wo ist der Schalter im Net Express BMS Editor ? Resolution: Das MDT Bit wird durch den Schalter FSET in den Feldattributen gesetzt (Field Properties / General). Old KB# 5790
Problem: Animating .EXE and .DLL Debug Build Programs that are located in multiple Project folders: Resolution: Animating .EXE and .DLL Debug Build programs located in multiple Project folders. The directory structure for this example is as follows: C:\\Animation\\ApplicationTrigger \\DynamicLibrary1 \\DynamicLibrary2 The ApplicationTrigger folder contains the project for the main program, AP470T01.EXE. The DynamicLibrary1 folder contains the project for the AP470D01.DLL and the DynamicLibrary2 folder contains the project for the AP470D02.DLL. The AP470D01.DLL file contains two sub programs, AP470S01 and AP470S02, which are called by the main program AP470T01.EXE. The AP470D02.DLL file also contains two sub programs, AP470S03 and AP470S04, which are called by the sub programs in AP470D01.DLL. T
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.