Browse all forums dedicated to the Rocket® COBOL product family.
Recently active
Problem: When a Dialog System program is busy, it does not accept input from the keyboard or mouse clicks. This can be shown very easily by changing the default arrow-like shape of the mouse pointer to an hourglass shape, which users are generally familiar with, and changing it back when the control flow returns to the Dialog System. Resolution: The Dialog System function to accomplish this is the SET-MOUSE-SHAPE function. It does this when the following lines are included in your dialog: SET-MOUSE-SHAPE $WINDOW "SYS-Wait" RETC SET-MOUSE-SHAPE $WINDOW "SYS-ARROW" or SET-MOUSE-SHAPE $WINDOW "SYS-Wait" CALLOUT "MyProgram" 3 MyParameter SET-MOUSE-SHAPE $WINDOW "SYS-ARROW" The attached demo shows the use of
Problem: "You are trying to use a data-name which you have not declared, or which you have misspelled." This error occurs at compile time. The unknown operand is listed in the message. Resolution: First insure that the operand is spelled correctly. Check the compiler directives used to compile the program. These may be listed in the compile command or be included from a directives file such as COBOPT. There is a directive "REMOVE", that tells the compiler that the specified word is no longer to be considered as a COBOL Reserved Word. If there is a corresponding statement "REMOVE(XXXXXX)" take out this directive and try the compile again. Check with you Systems Administrator to find out why the command was removed in the first place. Old KB# 3700
Problem: How do I find files larger than a specified number of blocks? Resolution: The following script shows how one might use -size to return a full listing of files in a recursive find. We display the owner, size and location. support 1884712 ./products/SX50EAP/lib/libcobcheck.so support 1884712 ./products/SX50EAP/lib/libcobcheck.so.2 #! /bin/sh # largerthan # find a standard file from current directory, larger than n-bytes if [ $# -lt 1 ] ; then echo "usage: largerthan nunmber-of-bytes [user] " exit 1 fi if test $2 then USR=" -user $2 " fi find . -size $1c -type f $USR -print | xargs ls -l | awk '{ print $3 "\\t" $5 "\\t" $9 }' Old KB# 3712
Problem: The demonstration shows the four methods of specifying directives to the Cobol compiler("cob" ccommand) Resolution: BUILD W/RELEASE: Any version of Server Express or Object Cobol Developer Suite INTRODUCTION ========== The demonstration shows the four methods of specifying directives to the Cobol compiler ("cob" command) SOURCE FILES: ========== Note: All required files are in copydemo.tar Program Files Description ---------------- -----------------------------------------------------------= picpy*.cbl Slightly modified versions of $COBDIR/demo/debug/pi.cbl Copy Files: ---------------- ----------------------------------------------------------- COPYFILE.CPY
Problem: ========================================================== Multi-Threaded COBOL socket's server & MonoThreaded COBOL client. ========================================================== Related KB: Mono-Threaded COBOL Socket client & server. http://supportline.microfocus.com/mf_kb_display.asp?kbnumber=23142 Resolution: ========================================================== Multi-Threaded COBOL socket's server & MonoThreaded COBOL client. ========================================================== 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 -xagt &
Problem: Is there an option that allows you to type in data in the first line of a drop down list box? It seems it always protects it. Resolution: A Dialog System list object that has an entry field at its top part is a Selection Box, not a List box. With Selection Box, you can make it Simple, Drop Down, or Drop Down List. If you make it as Drop Down List, the first line or the entry field will be in read-only. You will need to change the option to Drop Down to allow you to type in data from the entry field. Old KB# 3763
Problem: I would like to sort with mfsort in a script file called by command at . Resolution: The file status 9/037 can be displayed during a sort , if the size of the repertory defined in the environment variable $TMPDIR is not right. When the command at is used , it is necessary to verify the values of all environment variables recovered by the script file called by command at. Old KB# 3727
Problem: Why is the C Compiler and C Compiler needed for Server Express? Resolution: The C language development system and tools are required on all UNIX systems, in order to create linked executables using Micro Focus COBOL Developers Suite products. The COBOL product utilizes the C language development tools, such as the link editor and the system assembler, when building these executables. The C development tools used by Micro Focus for adapting and testing the COBOL Developers Suite product are the tools supplied by the Operating System vendor. This defines the 'Reference Environment' used by Micro Focus in reproducing and correcting defects reported by users. Some vendors supply the C development system as a part of the Operating System, and others sell the development tools as a separate piece of software. If the user does not intend to create linked executables of any kind, then there is no requiremen
Problem: Is it possible to immediately begin animating a Dialog screenset while animating the COBOL program, to view how the screenset deals with the data passed to it from the program. How is the environment established? Opening up a screenset from within the project and setting a breakpoint on the first line, is an option. However, a separate screenset is started with DSGRUN from within the COBOL program. Resolution: To break immediately into the Dialog System code by changing the call to Dialog System from DSGRUN to DS. For example: 78 dialog-system VALUE "DS". *78 dialog-system VALUE "DSGRUN". - i.e. comment out this line and replace &nbs
Problem: The ab command can correct your common typos in vi automatically. Resolution: Vi can be initialized by a list of initializations in a file called .exrc located in your home directory. .exrc holds map, set and ab commands The file is read by vi and ex on startup. The ab command takes the form of ab [abbreviation] [expansion] This can be used to correct typos on the fly by using ab [typo] [correction] For example: ab teh the ab preform perform .exrc can be created by vi. Add your mappings and abbreviations to this file as you find you need them. Old KB# 3708
Problem: The Sample demonstrates how to call _CODESET to translate character data between ASCII and EBCDIC. Resolution: BUILD W/RELEASE: Any version of Server Express or Net Express or Object Cobol Developer Suite SOURCE FILES: ========== Program Files Description ---------------- ----------------------------------------------------------- atoe.cbl Sample of ASCII to EBCDIC to ASCII conversion Note: Source is in Unix format. It will not display correctly in Windows Notepad, but will display corectly in Wordpad. It will display, compile, and animate correctly
Created On: 02 March 2008 Problem: How do you setup rsh on SuSE SLES? Resolution: First it is recomended that you install the rsh package from yast. The r-tools are not a default package in the SuSE Standard installation. After installing the rsh package you need to edit /etc/xinet.d/rsh. Set the Option Disable from yes to no and modify the default Server args from -aL to -L. Then restart the xinetd with rcxinetd processes. Check with netstat -an |grep '514' to find out if rsh is listen on the port. Remote Publish only needs rsh, not rlogin. Incident #23364 Old KB# 3703
Problem: On the same computer , I would like to work in different modes . Resolution: To manage working mode , it is necessary to use either command cobmode or environment variable COBMODE . The Working Mode can be global ( defined in $COBDIR directory ) : cobmode -s The Working Mode can be user ( defined in $HOME directory ) : cobmode -u The Working Mode can be local ( defined in the local working directory ) : cobmode -d The Working Mode can be in local environment environment variable COBMODE cobmode -s : modifies $COBDIR/etc/cobmoderc cobmode -u : modifies $HOME/.cobmoderc cobmode -d : modifies ./ cobmode $COBMODE overrides all others working modes The local Working Mode overrides t
Problem: If you have migrated an application from Windows to UNIX/Linux, which uses line drawing (to draw boxes etc), you may find that it doesn't work as expected. Under Windows, you may have inserted the specific characters used to draw (corners, vertical and horizontal lines etc) into working storage fields, or your screen section, and displayed these directly onto the screen. If you port these to a UNIX or Linux environment, the characters used for drawing may not be correctly represented, the possible exception being if you use ansi emulation. Resolution: The best way to solve this, is to use the CBL_GET_SCR_LINE_DRAW library routine. This will load the characters required for line/box drawing into working-storage screen section fields, for manual drawing. This allows you to load the required characters without needing to be concerned with the terminal emulation being used, and provides a platform independent way (
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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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
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.