Browse all forums dedicated to the Rocket® COBOL product family.
Recently active
Problem: The following happens on Server Express 5.0 (no fixpacks) and earlier. Program A accesses a file in fileshare server 1, then chains to Program B. Program B successfully accesses a file in fileshare server 1 but, if it opens a file from a different fileshare server, it gets a 114 error in FHRSUB. This is the outline of what happens: DEMO1.cbl: - Open input $$fsserver1/FS1FILE1 - access FS1FILE1 - close FS1FILE1 - CHAIN to DEMO2 DEMO2.cbl: - Open input $$fsserver1/FS1FILE2 - access FS1FILE2 - close FS1FILE2 - Open input $$fsserver2/FS2FILE1 This is when the 114 error occurs. If an access to a different file from $$fsserver2 is added in DEMO1.cbl, the error doesn't appear. Resolution: The problem is that the password module "fhrdrpwd" is being cancelled when the CHAIN occurs, but FHRSUB is still using the procedure-pointer to the cancelled module - hence the 114 error. FHRSUB doesn't get canceled because it is a system pro
Problem: An XML instance document exists on disk. In COBOL, it is declared as "organization is xml". When a customer tries to open it for input and read it record by record, the READ NEXT statement does not behave as expected. Resolution: The READ statement for XML instance documents can be used two ways: 1) A single READ without the NEXT clause reads the entire XML instance document (i.e. the whole input file) into memory, all at once. 2) A READ with the NEXT clause assumes that you have already read in the whole document using a single READ without NEXT as above, and have already established a key-of-reference using a START statement. READ NEXT examines the in-memory image of the XML document, and returns the next record in the key-of-reference. READ NEXT does not actually perform any disk I/O. Consider the demo program "customerdbxml.cbl". This is the last program in the XML tuto
Created On: 02 March 2008 Problem: Is OpenESQL supported on SCO UnixWare? Resolution: SCO UnixWare is not a strategic platform for RDBMS nor ODBC driver vendors. Oracle's final release on this platform was 8.1.7, which is now unsupported. IBM have never released DB2 on this platform. Neither iWay nor DataDirect have ODBC drivers available for this platform, and there are no plans to produce them. These are the ODBC drivers Micro Focus use for testing. Given the lack of support from major database vendors Micro Focus has no plans to add Micro Focus ODBC technology to this platform. However, Server Express and Visual COBOL for Linux Intel provide OpenESQL support. Old KB# 3706
Problem: When animating, customer receives an error on the CICS statement: "EXEC CICS ADDRESS TCTUA (TCTUABLL) END-EXEC." Animator Screen Output: 999 1010-ADDRESS-TCTUA. 1000 1001 EXEC CICS ASSIGN TCTUALENG (WS-TCTUA-LEN) END-EXEC. 1002 IF WS-TCTUA-LEN LESS THAN 255 1003 EXEC CICS SEND lPerform/Call Stack - viewqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqk xProgram Name Section Name &
Problem: Compiling a SQL application as follows : cob -V myapp.cbl -C anim "P(COBSQL) MAKESYN CSQLT=ORACLE DEB end-c DECLARE_SECTION=YES COMP5=NO VARCHAR=YES p(cp) endp endp" the following error is returned: 28 EXEC SQL INCLUDE SQLCA END-EXEC. * 149-S******** ** No SQL directives have been set Resolution: There are two issues here: 1. The Cobsql precompiler ships in lower case on UNIX. 2. Cob will manipulate options delimited with "=" characters, as documented within the Server Express User's Guide, Chapter 9, within the section entitled "Specifying cob Options". To resolve these issues : 1. Specify Cobsql in lower case 2. Delimit the Cobsql and Pro*COBOL options with ==, rather than = Therefore, the correct command line to use is : cob -V myapp.cbl -C anim "P(cobsql) MAKESYN CSQLT==ORACLE DEB end-c DECLARE_SECTION==YES COMP5=
Problem: Demonstration of CBL_DIR_SCAN_library routine usage. Resolution: BUILD W/RELEASE: Server Express 2.2SP1 or later, or NetExpress 4.0 or later Overall, the process is similar to opening a file, reading and processing "records" (directory entries in this case) until an "end" condition is encountered. Also demonstrates use of CBL_GET_OS_INFO to deal with Unix and Windows platform specifics. SOURCE FILES: ========== Program Files Description ---------------- ----------------------------------------------------------- dirdemo.cbl Complete demonstration Copy Files: Uses Micro Focus-supplied copy files. Environment variable COBCPY must include product's cobcpy directory in its value. REQUIREMENTS: ========== Server Express version 2.2SP1 or later, or NetEx
Problem: =========================================== Mono-Threaded COBOL Socket client & server. =========================================== related KB: Multi-Threaded COBOL socket's server & MonoThreaded COBOL client. http://supportline.microfocus.com/mf_kb_display.asp?kbnumber=23143 Resolution: =========================================== Mono-Threaded COBOL Socket client & server. =========================================== The program server.cbl is the socket's server ( written in COBOL ) The program client.cbl is the socket's client ( written in COBOL ). This sample was mainly tested on AIX 5.2.0.0 with Server Express 4.0 SP2 32bits. To Compile and link the sample ============================== To compile and link server.cbl & client.cbl, launch cl.sh cl.sh: cob -xag server.cbl cob -xag client.cbl To run the sample ================= To run the sa
Problem: In this case using Server Express 4.0, when trying to overcome large file issues with FILEMAXSIZE in an extfh.cfg file and everything seems to be correct but nothing seems to happen. The file looks like: [XFH-DEFAULT] FILEMAXSIZE=8 And a set EXTFH=/opt/microfocus/extfh.cfg is done. Resolution: Problem here is that one should not be using set rather then export. set EXTFH=/opt/microfocus/extfh.cfg SHOULD BE EXPORT export EXTFH=/opt/microfocus/extfh.cfg Old KB# 3695
Problem: This error occurs because the the program has not been compiled properly for using the profiler. The cobprof command cannot be used until the the program has been compiled with the PROFILE compiler directive. Resolution: Step 1 the program must be compiled for debugging adding the -a flag for .int or -g flag for .gnt, .o, shared object or executable also specify the compiler directive -C PROFILE. Example: cob -xg -C PROFILE pgmname.cbl Step 2 is to execute the program ./pgmname this will create the pgmname.ipf file. Step 3 is run the profiler reports Example: cobprof pgmname LIST This will display the profile information on the screen. If you do not set the LIST Profiler directive, then by default the output is produced in a file called pgmname.prf. Documentation on using the COBOL Profiler can be found in the Server Express Utilities G
Problem: This sample demonstrates file status code handling of CBL_ file handling routines Resolution: INTRODUCTION ========== This is a subroutine which converts the nonzero return codes from CBl_ file handling routines to ANSI file status strings of the form "9/xxx", where "xxx" is a number documented in the Error Messages manual as a file status. If the input value is not a valid file status, the string "Unk! " is returned. A normal completion is X'0000', which is not a file status in the internal format expected and thus will return as "Unk! ". Please refer to KnowledgeBase item 21106. SOURCE FILES: ========= Program Files Description ---------------- ----------------------------------------------------------- rc2fstat.cbl
Problem: Ths is a package of three minimal programs for conversion of line sequential files Resolution: BUILD W/RELEASE: Any Micro Focus Cobol product for Unix. line2win is not usable in Windows. rec2line and line2rec may be used with any version of NetExpress as well as any vers
Problem: Running the following piece of code through OCDS and then Server Express will return different results on the COMPUTE statement: FD 01 TOT-CALC PIC 9(02) VALUE ZEROES. 01 FILLER REDEFINES TOT-CALC. 03 TOT-1 PIC 9(01). 03 TOT-2 PIC 9(01). 01 NUMERO-ASSEGNO PIC 9(10) VALUE ZEROES. 01 TAB-NUM REDEFINES NUMERO-ASSEGNO. 03 EL-NUM PIC 9(01) OCCURS 10. PROCEDURE DIVISION. COMPUTE EL-
Problem: Problem sample sources sent in to SupportLine are often missing copy members and/or critical directives or compiler command line options. A listing (.lst) file can contain all the information, but considerable hand-editing is required to turn the .lst file into usable source and directives. An attempt to complie the .lst file directly will fail due to the embedded page titles. Sometimes the source file is lost, but a listing file remains. An automated means of retrieving the source could save time spent on other copying methods. Resolution: The attached COBOL source, list2src.cbl, runs on Unix or Windows and will work with Unix or Windows listing files. Compile the source to executable: cob -x list2src.cbl Run with a listing file specified as the first and only command line argument: ./list2src /somewhere/listing.lst (note: Windows file specs are equally valid) Listing file name on command line i
Problem: The article "Modernize DialogSystem Applications with Windows XP Visual Style controls" see: http://www.microfocus.com/mfnewsletter/technicalarticles/20050701-002.asp showed how to get the modern looking XP style for DialogSystem screen sets NOTE: A .PDF version of this document is available through the link at the bottom of this page and includes screen shots and tables which further explain the topic. Resolution: Enlarging the entry field by a factor of 4, you can see a line in a dark colour at the top and on the left site - in a light colour at the bottom and to the right: Also the list box shows such lines. These lines are the inherited 3D effect from the standard layout of the entry fields. To switch it off, you need to manipulate the layout of each entry field (and each list box) by class library methods in the following way: In Dialog System: Even if the demo only contains one entry field and one list box, the followi
Problem: Running cob, cobrun or similar on SCO Unix 5 you get a message of the type: Dynamic Linker : /cobol/bin/rts32_t can't set protections on segment of length 0*602 at 0*804800 Resolution: This error occurs if you are trying to run the Server Express product in SCO Openserver 5. Server Express is not available for this platform. Please see http://supportline.microfocus.com/productreleaselevels/unix.asp for available products. Currently (Server Express 4.0 SP2 & Server Express 5.0) can only run on SCO UnixWare 7.1.3/7.1.4/Open Server 6.0. Old KB# 3678
Problem: What RPM packages need to be installed on Linux prior to installing Micro Focus Server Express? The following error is returned after running $COBDIR/bin/cobsje unable to load libcobjvm_sun_150 If libcobjvm_sun_150 is on shared library PATH, then ensure 'libjava' and 'java' are found on the PATH/Shared Library PATH. Resolution: It may be the library libjava or java is causing the problems, or it could be another shared object entirely. The resolution is to install the missing RPM for C runtime (libstdc ), which is a pre-requisite package that needs to be installed in order to run the C parts of the Micro Focus Server Express - which includes running the cobsje script.) libstdc -3.4.6-9.i386.rpm and libstdc -3.4.6-9.x86_64.rpm. . Old KB# 3724
Problem: In KB 19658 the following line: "Micro Focus Server Express v4.0 SP1and above supports UTF-8 in a PIC X field. You do not have to do anything special. That is, you do not have to specify any directives. The character is held in one byte." appears to be incorrect when using Oracle. UTF-8 database name conatins a letter that is not ANSI. The letter is like an uppercase O with a forward slash on top of it. The COBOL program gives a "?" for that character. Is there any setting that will proper translate this character? Resolution: Please refer to Oracle's Pro*COBOL Programmer's Guide and also their Globalization Support Guide or consult with Oracle. Environment variables NLS_LANG and LANG should be specified. NLS_LANG=AMERICAN_AMERICA.WE8MSWIN1252 LANG=en_US.UTF-8 Note: The data is stored as UTF-8, so not all the characters are displayable (some are, some are not) if COBOL receives the characters
Problem: I can't use REMOTE DEBUGGING when the operating system of the remote machine is SuSE 9 . A error message about the rm command is displayed Resolution: It is necessary to modify the file $COBDIR/bin/cobrps . The command who am i must be modified to whoami The cobrps file must be : : #------------------------------------------------------------------------------- # @(#)cobrps 1.0 # # $Revision: 1.3 $ # $Date: 29 Jul 1999 15:59:10 $ # $Author: RHS $ # # Remote process list # Output: <processid><tab><other information><newline> # # N.B. # This script must not make ANY assumptions about the environment in which it # executes: in particular, it must not assume that COBDIR, PATH, LIBPATH, # LD_LIBRARY_PATH, etc., are set. #-------------
Problem: This sample demonstrates how to add line numbers to your source program Resolution: INTRODUCTION ========== COBOL source decks (punch cards) had line numbers in colums 1-6. Fixed-format COBOL source files still reserve those columns for line numbers, but they are seldom used. Some programmers prefer to have line numbers in source, but there are no supported methods of doing so. As a programming example, this source demonstrates: - parsing the command line, - determining whether the operating system is Unix or not, - determining the nonblank length of a string, - determining whether or not a string is entirely numeric, - use of CBL_ library routines, - and use of environment variables within a COBOL program. SOURCE FILES: ========== Program Files Description ---------------
Problem: If you are generating a XML document using the Net Express 4.0 or later COBOL XML extensions and if your XML document becomes very big, you will notice that while the document is being generated the performance is good, but when it comes to the last WRITE XML-stream and the file is CLOSED, it can take quite a long time depending on how big the document is and on how much memory the machine has. Resolution: Our XML extensions use a DOM-based parser (Document Object Model). A DOM-based parser, as supposed to an event-based parser, instead of events being fired, a tree is built up which describes the document and which can then be traversed by methods which access the nodes of the tree. So when you create an XML with our COBOL extensions, a tree is being built in memory and, therefore, the tree can not be flushed to disk until it is completed because when you write a node, you also have to write all the sub-nodes. This ensures that you create a proper
Problem: I test my application with Server Express . Now it is not possible to open a file in a module of the application when this file is open in an other module . Resolution: With Server Express, by default , if the file is open with lock mode exclusive in a module , no other module can open this file, even if this other module is in the same run unit . To give permission for opening by an other module in a same run unit , it is necessary to modify the value of the RUNITLOCKDETECT option of the file handler configuration file . An exemple is : echo '[XFH-DEFAUKT]' > my.cfg echo 'RUNITLOCKDETECT=OFF' >> my.cfg EXTFH=./my.cfg export EXTFH cobrun prog Old KB# 3716
Problem: All of the features of FSVIEW are available to you as a command line utility. The commands you specify on the command line define the operation to be carried out by FSVIEW. Information is returned as a scrolling screen output Resolution: In order to get dynamic file tracing for fileshare running in background, you should start fileshare with tracing and then switch it off To get a trace to file from Fileshare, you need to start fs with the options -tr f e.g. fs -s glen -sc -tr f -pf glen.pf will start a server called glen, using password file glen.pf, trace to a file and run synchrounously. To enable and disable fileshare tracing using FSVIEW use admin logon FSVIEW MFTEST server set GLEN trace toggle exit This will produce a text file fsscreen.lst in the fs start directory To get a filehandler trace for fileshare us fsview command as follows admin logon FSVIEW MFTEST server set GLEN xfhtrace toggle
Problem: How to calculate a random number in COBOL? Resolution: The following example shows one method of generating a "random" number. The number generated is not a "true" random number but should suffice for most purposes. The program is written as a sub-routine that can be called from another COBOL program. To simply pass the maximum value for the range of random numbers (e.g. 100 for a number between 1 and 100) and a variable to pass the result back in. If it is the first time the program has been called then the random seed is set based on the time to reduce the chance of a duplicate string on random numbers. working-storage section. 01 ws-first-time pic 9(1) value 0. 01 ws-rnd-seed-
Problem: Map is one of the lesser known and most useful commands. You may find when you're editing that you are repeatedly using a command sequence or maybe a very complex sequence. The map command allows you to define a macro for the editor's command mode. In other words, you can issue it while you type; as soon as you hit the mapped key, the keystroke is replayed Resolution: The command format is map to display currently mapped keys map mykey sequence to map mykey with a sequence of commands unmap key to remove the map. As map is used in command mode, you need to know the key not used in command-mode and are available for your use. These are: G K q V v ^A ^K ^O ^T ^W ^X _ * \\ = Example 1 Initiate vi and type the following: Micro World Focus 2007 Enter command mode by pressing colon (:) and type the following map g dwwP dw delete word (delete actual
Problem: Changing Dialog System application screensets to properly show the Visual Style layout on Windows XP. The Adobe Acrobat file and .zip file attached to this document contain the full Knowledge Base document containing the explanatory screen prints and the example application to show how to accomplish the modernization. Please download them to view the full information. Resolution: For the past 10 years, GUI Dialog System screensets have looked more or less like the following screen shot: This screen shot was made on a Windows XP PC using the classic layout. Switching the XP operating system to the new XP style layout without any change in the Dialog System screenset will result in: which may look like XP on the first view. But only the title bar has got an XP style layout. The rest of the features are still the classic style. This article describes how to get a full Visual Style layout on windows XP f
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.