Browse all forums dedicated to the Rocket® COBOL product family.
Recently active
Problem: How to look up the Process ID from the current process? Resolution: The following will show the Process ID (PID) of the current process. 01 CurrentProcessId DWORD. 01 pSessionId DWORD. call cc74 "GetCurrentProcessId" returning CurrentProcessId Another way to do this is with the use of API: There are different ways for APIs for Win9x Platforms and for NT/2000/XP/2003 Platforms. For Windows 2000 etc... You need the Process Status Helper API http://msdn.microsoft.com/library/?url=/library/en-us/perfmon/base/process_status_helper.asp?frame=true For Windows 9x you need the ToolHelp Library http://msdn.microsoft.com/library/?url=/library/en-us/perfmon/base/process_status_helper.
Problem: Editing or Debugging Copybooks When editing or debugging a program, you step into a copybook, then the editor or debugger will not position correctly thereafter. Microsoft Knowledgebase number: KB830514 Resolution: We advise you to apply the Microsoft Visual Studio fix for this problem, before using Net Express with .NET. You can download the fix from our Micro Focus SupportLine website (http://supportline.microfocus.com) under the "Patches & Fixes" for Net Express 4.0 with .NET <<KB830514.zip>> contains two EXEs NDP1.1-KB830514-X86.exe and WindowsServer2003-KB830514-x86-ENU.exe (one of the exe is for Windows Server 2003) Old KB# 7038
Problem: When trying to remotely debug a program on a UNIX machine the following error appears: "Remote Machine not found" Resolution: Instead of using the IP-Address use the machine name to be put that in the "Remote Machine Name" box. This can be found in Animate > Settings > 'execute remotely' section in the bottom left corner. Old KB# 7070
Problem: Getting error message stating these cannot be used as they are reserved words. Resolution: Use the remove"name" and remove"range" compiler directives to remove the errors, or change the usage of those words to not-reserved alternatives. Old KB# 7013
Problem: Using Net Express with Sybase 11 and Embedded SQL, a -10000 error is returned on a SQL SELECT statement, when using Sybase ODBC driver 2.12. Resolution: The problem is in the ODBC driver version 2.12 from SYBASE. Changing the ODBC driver to Intersolv's ODBC driver for SYBASE version 3.0 resolves this (SYBASE's ODBC driver version 3.0 works also). Old KB# 7033
Problem: Please send an example of conversion of 'YYYYMMDD' date format to integer format and then conversion to Julian date plus reverse conversion back to 'YYYYMMDD'. Resolution: This conversion begins with a date consisting of the year, the month and day (20040827) stored in a data item named "YYYYMMDDItem". The INTEGER-OF-DATE intrinsic function is used to convert this date into an integer value that is the number of days elapsed since December, 31, 1600, in the Gregorian calendar (147,432) with the result stored in a data item named "integerDate". Next, the DAY-OF-INTERGER intrinsic function is used to convert the "integerDate" item into a Julian date of the form YYYYDDD storing the result (2004240) in the data item named "julianDate". Reversing this conversion is accomplished by using the INTEGER-OF-DAY intrinsic function to convert the "julianDate" data item to an integer valu
Problem: Got back this error and have to use INITIALIZE for numeric data items. Resolution: Yes, you will get back this error also if the VALUE clause is not used for data items at compile time. The reason for this is (s. Language Reference Chapter 3:Language Fundamentals): >The initial state of a data item depends on the presence or absence of a VALUE clause in its data description entry...< Therefore, you have to adjust all data items to the correct numeric data type to avoid error 163. You can get additional information from KB article#17644. Old KB# 7024
Problem: The COBCH errors are syntax errors. Resolution: To find the complete list of (COBCH) syntax errors: 1. Click on Help > Help Topics 2. Click on the Index tab 3. Type in "syntax error" 4. Double-click on "Syntax error" from the list 5. Double-click on "Syntax Checking Error Messages" The syntax error should give enough information. Another way to see an individual error from the the help would be to use the Search to look for COBCHxxxx. Old KB# 7030
Problem: In Net Express are you able to redirect your executable module to a different directory during compile/link? Resolution: Yes you can select the location for the exe's (or whatever files you wish) 1. From the top menu bar select Project>Deployment 2. A window will appear that says files selected for deployment- select ADD 3. Another window will appear where you 1- browse for files to be deployed 2. browse for the location to put the files 3. Remove the extension (needs to be blank) 4. check ok 4. Rebuild All to get the module/modules copied to the deployed location. Old KB# 7059
Problem: OPEN Cursor declared as ... WITH HOLD returned SQLCODE of -19520 Error states connection does not support HOLD cursors. Resolution: Make sure that the ODBC driver is configured to allow Cursors declared as WITH HOLD Old KB# 7072
Problem: The records are x'0d" delimited in a Macintosh's line sequential file, and the file handler only recognizes x'0a' (used in Unix) or x'0d0a' (used in Windows) as a valid record delimiter. The file cannot therefore be defined and read as line sequential in COBOL. Resolution: One would assume that LSRECDELIM (file handler configuration option) would be the solution, but that option only accepts either x'0a' or x'0d0a'. The alternatives are using byte-stream I/O routines to convert the file to x'0d0a' record delimiters, using third-party software to convert the file, or reading the entire file as as a single record and extracting each record delimited by x'0d'. Note: 1. There has been an enhancement request that was raised to support x'0d' as a valid parameter to LSRECDELIM option (RPI #1053920) 2. x'0d' = CR = Carriage Return character 3. x'0a' = L
Problem: CCITC32-0034E CCITCP could not find an 'mfcobol' port in the 'services' file. Resolution: You can manually add the entry into the services file; located in the Windows\\system32\\drivers\\etc directory; as mfcobol 86/udp within the correct numerical location within the file or you can use CCIINST.EXE which is located in the Bin directory of application server for Net Express, or Net Express development \\base \\bin directory. Old KB# 7051
Problem: Where an OPEN statement- the fd assigned to working storage name which has full path assigned and the file is in location pointed to by working storage variable Resolution: Make sure that the compiler directive ASSIGN"EXTERNAL" is not used with the build of the program. Old KB# 7017#RMCOBOL#ServerExpress#AcuCobol#netexpress#COBOL
Problem: What is the difference between CBL_THREAD_SLEEP and CBL_YIELD_RUN_UNIT? Resolution: The CBL_YIELD_RUN_UNIT will tell the OS to give the current programs scheduled processing time to another program process so that it can have access to the CPU. A RUN_UNIT in COBOL is defined as the main programs executable along with any programs that have been loaded by a CALL statement. This keeps the current program from using all the CPU cycles when it is currently in a wait state. The CBL_THREAD_SLEEP does basically the same thing but it gives up the current threads processing time and not the entire run-units CPU time. The difference is that CBL_THREAD_SLEEP might yield it's time to another thread that may be running within the same process (run-unit). CBL_YIELD_RUN_UNIT yields time on a per process basis and CBL_THREAD_SLEEP yields time on a per thread basis. Old KB# 7053
Problem: How to call the sql set connect option through cobol to unlock the DataDirect OEM ODBC drivers. Here are the calls to SQLSetConnectOption as one would code in a different language: res_code = SQLSetConnectOption (hdbc, 1041, "licensefile"); res_code = SQLSetConnectOption (hdbc, 1042, "password"); Resolution: Be sure you have entered into an OEM agreement with DataDirect and have thus created a 'branded' driver that is specific to our application package. They have assured us that 'all we have to do' is make these API calls after our standard database connect, to 'unlock' the branded driver. You should just need to set a procedure pointer to ODBC32.DLL. If the app is running as EXE or DLL, you will need to link with ODBC32.LIB and ODBCCP32.LIB. The call convention should be stdcall, i.e. 66. The return value for the ODBC API call -- i.e. SQLRtn -- should be stored as a PIC S9(4) COMP-5.
Problem: The file-control paragraph specifies the file as follows: select dataFile assign 'datafile.dat' Resolution: The default "file-control-entry" in a COBOL program (the select statement) specifies an optional file. Such a file may or may not be present when a program attempts to open the file. When an optional file is not present at the time an open i-o statement is executed, a file status of "05" is returned and an empty file is created. When an optional file is present at the time an open i-o statement is executed, a file status of "00" is returned. In this way you can determine whether you are processing a new, empty data file (file status = "05") or an existing data file (file status = "00"). If you never want to process an existing file, you can c
Problem: If one entry point in Cobol is exposed through the Interface Mapping Toolkit to an EJB using another exit point (a CHAIN operation) is this compatible with exposing it? Resolution: When you CHAIN to a subprogram, control never returns to the calling module (like an XCTL in CICS). The original parameters are preserved so that they go back to the EJB. Old KB# 7022
Problem: COBES0100S duplicate CURSOR Resolution: From Net Express 4.0 onwards, OpenESQL requires all cursor names to be unique. This restriction did not exist in earlier versions of Net Express. If the existing source code looked like this : EXEC SQL DECLARE CURSOR-1 CURSOR FOR S1 END-EXEC PERFORM CHECK-SQL-STATUS EXEC SQL PREPARE S1 FROM :SQL-STATEMENT END-EXEC PERFORM CHECK-SQL-STATUS. EXEC SQL DECLARE CURSOR-2 CURSOR FOR S1 END-EXEC PERFORM CHECK-SQL-STATUS EXEC
Problem: If you are migrating an old COBOL Workbench application to Net Express that uses SCREENS, you will not initially be able to edit the screen definition files. you will be able to run the application successfully. Resolution: You must use Net Express 4.0, and ensure that the Classic Tools Addpack (filename mct00n40.exe) is applied from the Micro Foucs SupportLine web site. Old KB# 7012
Problem: When a Tuxedo service program (exe) contains a call to a sub-program, the call to the sub-program fails. Resolution: Using Net Express, all this is hidden from you as the CBLLINK utility does this all for you. This is an issue with how the Tuxedo Service EXE is being built. The BEA supplied makefiles assume that only one COBOL module will be linked into the EXE. It is not running CBLNAMES as part of the process. CBLNAMES takes as a parameter all the COBOL objs that are to be linked, and creates "cblds.obj" which should be linked into the main exe. The BEA makefile for the client uses CBLNAMES, but the server does not. As this step has not been done the sub-program is not found when called unless built as a separate DLL. The Tuxedo build process needs to link in other Tuxedo specific C modules and objs. Change the make file to run cblnames and also link
Problem: Is it possible to select more than one item in a Listview and, if so, how can you get a list of items that have been selected? Resolution: You need to use the MultipleSelection method to tell the listview that more than one item can be selected. The "selectedItems" method returns a collection that contains the selected items. Old KB# 7036
Problem: Getting truncation of Oracle NUMBER(27,9) column using ODBC Resolution: The host variable definition you need for the Oracle NUMBER(27,9) in COBOL needs to be PIC S9(18)v9(9) comp-3. The directive INTLEVEL(4) is required to compile program. Old KB# 7019
Problem: Retrieving ALL the Environment variables of the current process with ONE call to the Microsoft API GetEnvironmentStrings. Resolution: $SET case defaultbyte"00" special-names. call-convention 74 is winapi. working-storage section. 01 ptr pointer value null. 01 i pic 9(18) value 0. 01 j pic 9(18) value 0. 01 k pic 9(18) value 0. 01 l pic 9(18) value 0. 01 WSEnvtStrings pic x(150000) value
Problem: Clicking on an image to print using Javascript's function window.print() invokes the printer dialog and causes the form to be submitted. This causes a CGI error or "page cannot be found". The CGI Error states the following message: "The specified CGI application misbehaved by not returning a complete set of HTTP headers." Resolution: The problem is caused by the usage of "inputimage" instead of "image". The "inputimage" causes the form to be submitted. This is not necessary when the purpose is simply to print the current page using window.print(). Make sure to use "image", which is in Page Elements toolbar (while "inputimage" is the one in the Form Elements toolbar). Old KB# 7027
Problem: The Help system states that the actual timeout period for the stated value is in seconds or tenths of a second for example: ACCEPT ws-variable AT 2326 TIMEOUT AFTER 600 ON EXCEPTION MOVE 1 TO ws-variable. Resolution: This format of ACCEPT is a Micro Focus extension (see Language Reference manual for full details). The timing unit used is not specified within the source. The ADIS configuration utility (ADISCF) allows you to specify whether the value is treated as seconds or tenths of a second. The default setting is seconds. Old KB# 7060
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.