Browse all forums dedicated to the Rocket® COBOL product family.
Recently active
Problem: An attempt to do an INSERT into a MS Excel worksheet fails with SQL error code -39 that says "invalid character value for cast specification null." Resolution: Make sure the value to be inserted is allowed in the receiving field. For example, inserting a non-numeric value into a numeric field will fail with the SQL error code -39. To resolve it, either change the receiving field as alpha or make sure the value is numeric before inserting it. Old KB# 7109
Problem: How to search for files with a certain extension (e.g. *.cbl) in a directory using a Cobol program. Resolution: Use the X'91' function 69 routine. A loop can be used to retrieve many matched files as shown in the excerpt of code below: [...] move 'd:\\dir\\*.cbl' to f-filein move spaces to f-fileout call x'91' using f-result, function-code, *>69 f-parameters. move 1 to f-action perform search-files until f-error = 1 or 2 [...] search-files. if f-attrout >= 32 display f-fileo
Problem: PLS-00422 no PL/SQL translation for the bindtype given for this bind variable Cause: A host variable was passed (by an Oracle Precompiler program, for example) to PL/SQL for binding. However, its datatype is not compatible with any PL/SQL datatype. So, the binding failed. Action: Change the datatype of the host variable to make it compatible with a PL/SQL datatype. Calling a stored procedure with COMP variable. Using Oracle precompiler. Resolution: Ensure that the host variable definitions are suitable for the columns being used. For example, with a host variable defined as PIC S9(13) COMP, this should be changed to either PIC S9(9) COMP for an integer field, or PIC S9(13) COMP-3 for a decimal-type field. Old KB# 7112
Problem: I can use the following if I know the table name, but need something when tablename is not known at compile time - exec sql declare ccurs cursor for query odbc columns tablename 'table' end-exec Resolution: You need to use dynamic sql: 1. declare the cursor to be used to fetch the column information EXEC SQL declare vcurs cursor for dynamic_sql END-EXEC 2. &n
Problem: How can ORA_ROWSCN be accessed from Net Express? Net Express 4.0 Oracle 10g OpenESQL/ODBC Oracle ODBC driver 9.02.00.63 Resolution: It is possible to access ORA_ROWSCN by defining a TIMESTAMP host variable: ... 01 my-rowscn-hvar sql type is timestamp. ... ... exec sql select ora_rowscn, last_name into :my-rowscn-hvar, :my-last-name from employees where employee_id = 188 end-exec ... Please note that Oracle's documentation would indicate that this is an Oracle 10g feature only. Old KB# 7129
Problem: The customer was making a CALL to a subprogram in the form of an external DLL. He was attempting to use the ON EXCEPTION clause of the CALL statement by using ON EXCEPTION CONTINUE. He did not have a NOT ON EXCEPTION phrase nor did he have an END-CALL or a period to end the CALL statement. He could not figure out why none of his statements following the CALL were being executed since he knew that the CALL was being executed successfully. The following is the sytax that he used: 100-TEST. IF WS-TEST-TRUE MOVE "PROG2" TO WS-NEXT-PROG CALL WS-NEXT-PROG USING RFVCODES RETRN-CD ON EXCEPTION CONTINUE CANCEL WS-NEXT-PROG &nbs
Problem: There is an issue when installing Net Express 4.0 on the D: drive of Windows 2003 Server machine using the standard setup.exe. When trying to compile programs you may get the error: ASLM: Semaphore failure ERRNO 1002 Resolution: The problem here is that the setup process attempts to create a log file on the c:\\ drive by default, and if you don't have a c:\\ drive, it can't write the log. To avoid this problem, you can redirect the log file elsewhere by supplying a parameter to the setup command. So, drop to a command prompt an change directory to the location of the setup.exe (let's assume this is on D:\\) and type the command D:\\setup\\setup.exe /ini=d:\\setup\\nxsetup.ini /logfile=r:\\thelogfile.txt This will run the setup.exe from your D:\\ drive and write the logfile to your r:\\ drive. Alternatively, you can uninstall the product from the D: drive and resintall it on the default C: drive.
Problem: This error may be encountered when compiling a COBOL program from a project. Resolution: This error is caused by the fact that the "message files" cannot be located. These files are found in mflang*.lbr. In order to solve the problem, the PATH environment variable should be changed so that it can locate these files. Old KB# 7128
Problem: The WHEN-COMPILED is a special register that can be used as the subject of a MOVE to a 20 position field. 01 DISPLAY-COMPILE-TIMESTAMP PIC X(20). MOVE WHEN-COMPILED to DISPLAY-COMPILED-TIMESTAMP. Resolution: Old KB# 7066
Problem: Do ODBC drivers come with Net Express? Resolution: The only ODBC driver shipped with Net Express 4.0 or later is for use with the Micro Focus SQL Option (XDB). For details on ODBC driver vendors, there is an independent ODBC portal at http://www.sqlsummit.com/ODBCPORT.HTM , which has a link to a list of ODBC driver vendors. Micro Focus does not endorse, recommend, or otherwise suggest that these products either do or do not work with any version of Micro Focus products. Old KB# 7026
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: 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: 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: 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: Changes to DSDEF.CFG are effective when using the Net Express IDE, but not when using Application Server. Where does it have to be located so that the file is picked up? Resolution: Place the dsdef.cfg file in the current directory of the application OR Set the DSDIR environment variable to the drive and path to where the file is located DSDIR=drive:\\path\\dsdef.cfg Old KB# 7037
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: 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: 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
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.