Browse all forums dedicated to the Rocket® COBOL product family.
Recently active
Problem: Is there a way to copy a file to/from a UNC path from a COBOL program? Resolution: You could do a CALL "SYSTEM" or use the BinaryFileCopy.zip attached. The library it contains will copy a file from a network UNC to a printer via a UNC from RM/COBOL. The attachment includes the C source, the CodeBridge template and a COBOL example. Disclaimer This is not an official Liant Software Corporation product and is therefore unsupported although enhancements and fixes will be considered time permitting. Please forward any queries to the London office of Liant Software at support@liant.co.uk. Attachments: BinaryFileCopy.zip Old KB# 6130
Problem: What are High-Values and Low-Values? Resolution: COBOL programmers sometimes use the figurative constants HIGH-VALUES and LOW-VALUES as if these constants will have a numeric meaning when moved to or compared with a numeric data item. Unfortunately, this intuitive understanding conflicts with the definition given by COBOL. Worse yet, COBOL explicitly allows the combination of alphanumeric and numeric data in MOVE statements and relation conditions. Therefore, past RM/COBOL compilers have not diagnosed programming problems that may result. Modern versions of the RM/COBOL compiler will warn you when HIGH-VALUES or LOW-VALUES are moved to a numeric data item and the result is not well defined. The following paragraphs help clarify the actual meaning of HIGH-VALUES and LOW-VALUES. HIGH-VALUES and LOW-VALUES are defined in COBOL as always being alphanumeric. This contrasts with the figurative constant ZEROES, which is numeric when associated with a numeric data item a
Problem: Cannot display list of Windows for screens Resolution: When AUTO RESTART is set to YES (in ds.cfg), Dialog System saves the positions of the Windows list and Controls list in DS configuration file (ds.cfg). If these list windows can't be invoked or displayed on screen: 1. Exit Dialog WB System 2. Edit DS.CFG 3. Delete WindowsList and/or ControlsList lines found in DSINIT section. 4. Save DS.CFG with changes 5. Re-load Dialog WB System When these two lines are deleted, the positions of these windows will be reset to the default positions. Note: When the Windows list is reset to default position (or first time to be set to AUTO RESTART = YES), this window will appear only with the title bar. Just resize to see the whole window... Old KB# 6559
Problem: How to change the foreground color of a text object Resolution: Net Express Dialog System 2.0 under Windows NT4.0 How to change the foreground color of the text object Description of Problem How to change the foreground color of the text object Solution Text foreground color cannot be changed. Here's what can be done: 1) use an entry field 2) change its properties/options to make it a display field 3) specify initial text 4) then change the color of the text In design mode, it will look like an entry field, but at execution time, the entry field will look like text. Old KB# 6561
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: 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: Does Micro Focus have an OFX server? Resolution: Micro Focus has no direct support for OFX within its products. However, it may be possible to integrate with this technology via XML, web services etc. You can find out more information on the Open Financial Exchange specification (OFX) at: http://www.ofx.net/ofx/pressget.asp?id=44 Old KB# 5801
Problem: Release 4.0: Using the XML GENERATE statement from IBM mainframe COBOL in Net Express. Resolution: Use Net Express 4.0 with the WrapPack all06n40 or later. Old KB# 5806
Problem: Message when running deployed application: "Unable to find COBOL run time" even though Application Server has been installed onto the deployment machine and the PATH and COBDIR environment variables are pointing to the Application Server installation folder. Resolution: If you are deploying EXE's or DLL's it is worthwhile checking to see whether they are built to use Dynamic Binding - as this forces the application to search for the COBOL runtime using the path's set in the Windows registry. If you build them and deploy them to not use Dynamic Binding the the application will look for the COBOL run time using the location set using the PATH and COBDIR environment variables. Old KB# 5799
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: Data entry field should display as blank until a new value is keyed into field. Resolution: This is an ADIS configuration option that can be set up with ADISCF and saved in a modified ADISCTRL file. Since you are migrating from an older version of Micro Focs COBOL to the current version, search the system where the older version is installed for an ADISCTRL file and copy it to the new system. The ADISCTRL file should be in the folder where the application programs are executing.
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: 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: 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: 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: Working with IUnknown pointers in an OLESafeArray. If you have an instance of OLESafeArray which contains the OLE type (determined by invoking "getVarType" on the safe array object) VT-UNKNOWN (value 13 in olesafea.cpy copy file), you can use the OLESafeArray "getElement" method to retrieve the pointer value. You can then use the pointer value as a parameter to the olesup "getCOBOLObject" method to return an object reference which you can then work with. Resolution: Working with IUnknown pointers in an OLESafeArray. If you have an instance of OLESafeArray which contains the OLE type (determined by invoking "getVarType" on the safe array object) VT-UNKNOWN (value 13 in olesafea.cpy copy file), you can use the OLESafeArray "getElement" method to retrieve the pointer value. You can then use the pointer value as a parameter to the olesup "getCOBOLObject" method to return an object reference which y
Problem: When creating an XML file from a COBOL program, how would you prevent groups/items being output to the XML file? This may be necessary when the items or groups hold no data at all. Resolution: Define the groups/items in the COBOL program with the COUNT IN clause, e.g. 03 Main IDENTIFIED BY "Main". 05 A PIC X(6) IDENTIFIED BY "A_TAG" COUNT IN A-CNT. 05 B PIC X(6) IDENTIFIED BY "B_TAG" COUNT IN B-CNT. 07 B-ATTR PIC X(6) IDENTIFIED BY "B1_A" IS ATTRIBUTE. 07 B-SUB PIC X(6) IDENTIFIED BY "B_SUB_TAG" COUNT IN B-SUB-CNT. ... Moving 0 (zero) to the count variables wil stop the associated elements or groups being output to the XML file. Old KB# 58
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: 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: If the sub-program is called: CALL "subprog" USING OMITTED OMITTED WS-VAR-3. The following error occurrs: Execution error : file 'subprog.int' error code: 203, pc=225, call=1, seg=0 203 CALL parameter not supplied How do I validate which parameter is omitted to avoid this error? Resolution: The 203 error is correct as you need to test for the presence of each parameter before attempting to modify it in the sub-program. This is done with the following code: if <variable-name> is not omitted move ... and so on. Old KB# 5818
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: 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: Trying to set-up Unix publish by populating the Unix .rhosts file in the home directory with the tcp/ip address of the PC. The following error is displayed when trying to verify the server settings: The server refused to execute the Server Control Program. Please check your server configuration. rshd: 0826-813 Permission is denied. Resolution: The Net Express documentation contains the following warning in the Unix Option Guide (Appendix A: Installing Samba and SCP): Warning: The .rhosts file must be owned by the user ID that owns the directory and must not be writable by either group or world ( that is, it must have rw-r--r-- permissions). Also, it cannot be a symbolic link. In this case the problem was due to permissions of the .rhosts file being rw-rw-r--. Correct permissions can be set using the following command in the home directory: chmod 644 .rhosts Old KB# 5803
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: 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
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.