Browse all forums dedicated to the Rocket® COBOL product family.
Recently active
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: 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: Changing the current date to test in a project. Resolution: Open the project where you want the date changed. Go to the Project/properties tab. Select Application under Environment. Next choose the Testing tab - here you can change the Year, Month and or day. Old KB# 5797
Problem: When this statement is run DISPLAY "TEST" WITH BLINK AT 0101. there is a gray colour back ground - is the a limitation? Resolution: Unfortunately, BLINK is not a supported capability under Windows Old KB# 5825
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: How can I use redirected Input to a Cobol Program? Resolution: Please see the attached program acp.cbl as an example of a program which accepts redirected input. Unfortunately, it is not possible to redirect input in Windows. Due to the nature of how Windows handles input, redirection is impossible. You can redirect input with the UNIX(v10.01) and DOS(v6.10.02) versions of RM/COBOL, however. Attachments: ACP.CBL Old KB# 6117
Problem: With the CBLLINK command, an EXE (or DLL) can be linked with the dynamically bound shared runtime library using the -rs option. Resolution: From the Net Express IDE, you can link an EXE (or DLL) with the dynamically bound shared runtime library as follows: 1. Right-click on the EXE from the project tree, the left pane of the IDE 2. Select Build Settings 3. Click on the Link tab 4. Make sure Shared is selected 5. Click on the check box for Dynamic 6. Click on the Close button 7. Rebuid the EXE Old KB# 5816
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: If COBDIR is defined with the correct values, as an environment variable for the Windows system, there are no compilation errors. When it is removed from the environment variables in the Windows system and defined with the same values in the Project Properties in Net Express IDE, compilation errors are seen: ASLM: Semaphore failure. ASLM: Errno 1002 Rebuild complete with errors Resolution: The COBDIR environment variable lists the paths of the COBOL system directories where INT, GNT, LBR, DLL and EXE files, which are used by an application, occur. Setting this in the IDE, will cause the COBOL runtime to look only in the path specified. You should set the COBDIR environment variable in the Windows System. If you do set the COBDIR environment variable in the IDE, you will have to prefix your path with '%COBDIR%;' to ensure the application finds the run-time files needed, for example: Variable - COBDIR
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: 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: How can I rebuild a Sequential File into an Index File with multiple 01 levels? Resolution: The reindex sample program does not cover multiple 01 levels. If the program has multiple 01 levels with varying length records, and each record has a unique length, it is possible to write the record to the correct 01 based on the length. To do this, change the sample reindex code in the following manner: 1) Create a data name in WS , such as, WS-SIZE PIC 9(4) 2) Change the FD for the binary sequential file to read: RECORD IS VARYING FROM 1 TO ### DEPENDING ON WS-SIZE. where ### is the maximum length for the record and the "depending on" clause will store the length of the record in ws-size. 3) Change GET-REC to have 03 FILLER P
Problem: Ported project from another machine to a different test machine. Trying to start animation from project. Resolution: One scenario for this error is as follows: The build settings for the EXE were sent to another directory other than the debug folder - **this was found by highlighting the EXE on the left hand side and doing a right hand click and choosing build settings -- the "file on disk" option had been changed to send the EXE to a different location other than the default "debug" or "release" folder. Trying to start animation from the top which was pointing to the debug folder if you hits browse and goes to where the exe is located it starts the easier method is to just highlight the exe on the left hand side and do a right hand click and choose animate Old KB# 5794
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: Why do I get an 47,01 error on an OPEN OUTPUT, and there are no READS? Resolution: Check to see if there is an UNLOCK in the statement. UNLOCK is not allowed in an OPEN OUTPUT. Old KB# 6115
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: 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: How do I do string manipulation in Cobol? Resolution: To move selected characters from one alphanumeric field to another, try using reference modification. For example, to get the 2nd through 4th characters of a PIC X(5) field into a PIC X(3) use the following: MOVE FIELD1(2:3) TO FIELD2. If FIELD1 contained 'ABCDE', this statement would put BCD in FIELD2. Old KB# 6116
Problem: In Form Designer, there is a blank space above the form, which is a gridded box. How to remove this blank space? Resolution: Make sure FORM is the very first item in BODY. To do this, you will need to look at the Form Designer's tree view and delete any items that are above FORM in the BODY structure. There could be a Heading or Paragraph that is above FORM. Just right-click on it and click on Delete. Old KB# 5826
Problem: What causes Truncated Records? Resolution: If a program defines a record length that is less than the length of the records in the data file, the data will be truncated and no warning messages are generated. This is a feature of COBOL fixed length records. Record description entries need not describe the entire record. This could be useful, for example, to allow expansion of the record description without having to enter a filler in each record description. A RECORD Clause with CONTAINS n CHARACTERS can be used to define a fixed length record. For variable length records, a RECORD Clause can also define the minimum and maximum length of the records in the file. The record descriptions cannot be less than the minimum nor greater than the maximum record area, but equality is not required in either case. The compiler issues an error when a record shorter than the minimum record length is described for a file with variable length records.
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: 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: 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
Problem: 1. Program A calls program B. 2. Program B opens a file, then returns control to program A. 3. Program A calls program B again. 4. Program B accesses the file, assuming it is still open from program A's prior call. This causes an immediate "47" I/O declarative error. Apparently, working-storage variables in program B held state from the previous call but the FILE OPEN state did not - the file has reverted to a closed status without ever being explicitly closed. Again this behavior is different from my 3.0 system. Is this also a compiler directive or runtime setup issue? Resolution: The sub program was using EXIT PROGRAM to return to the calling program which using RM directive will close all open files. Adding "ANSI" to the RM directive will allow the EXIT PROGRAM to keep files open. RM"ANSI" Old KB# 5814#AcuCobol#RMCOBOL#netex
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.