Browse all forums dedicated to the Rocket® COBOL product family.
Recently active
Problem: Example of how to use the PC_PRINT_FILE Net Express call-by-name routine Resolution: INTRODUCTION ========== This example program demonstrates the use of the Net Express call-by-name library routine PC_PRINT_FILE. This routine will print a file allowing the user to optionally select a printer and font that will be used for printing the document. PC_PRINT_FILE uses the same parameters as PC_PRINTER_OPEN so we use the same copybook definitions. SOURCE FILES: ========= Program Files Description ------------------- ----------------------------------------------------------- PRNTFILE.CBL Source program that makes a call to PC_PRINT_FILE. It will display a printer &nbs
Problem: Is there a compiler directive that will display information regarding data-items? Resolution: The DATAMAP directive causes the Compiler to output information on the data items; both those that you have specified, and those automatically generated by the Compiler, such as the data area for the RETURN-CODE special register. The information is output at the end of the list file. The information on the data items is output in the same order as they are encountered in your program by the Compiler. The first line is the program-id of the program to which the data items belong. This enables you to see the relevant data items for nested programs, or for the various areas of OO class programs (classes, object methods, and so on). For each data item, the following information is listed: The line number The data name The address of the data item, that is the offset from the beginning of the program's data area The size of the data item in bytes The
Problem: Is it possible to change the CTF (Consolidated Tracing Facility) level from within a COBOL program, rather than at the start of the run? Resolution: Two API routines, CBL_CTF_LEVEL() and CBL_TRACER_LEVEL_GET(), can be used to interrogate and to change the trace level. These are unsupported at present, and the API interfaces may change in future releases of the product. This information is therefore made available on the grounds that it may be found of interest and/or use. CBL_CTF_LEVEL() - Specify a Trace Level call "CBL_CTF_LEVEL" using by value flags by value trace-level &
Problem: All terminals use a temporary storage queue right now. How can we convert all to use a recoverable storage queue? Also, is there a way to set the default to recoverable storage queue in place of the temp as it is now? Resolution: If the existing configuration does not use predefined queues, which is the typical usage, then depending on the queue name it might be possible to use a generic TST definition. When you define a Temporary Storage Table (TST) entry the name can be up to 8 characters long. If you specify less than 8 characters then you can still get a generic match. For example, assuming you have terminals A000 and B000 each running the transaction TEST. If the TS queue name is of the form TESTA000 where the transid is prepended to the termid then you can define a protected TS queue of 'TEST'. All TS queues that start with the prefix TEST will match the generic TST entry and use its configuration. Old KB#
Problem: Customer wanted to know if there is any Server Express command-line tool to convert EBCDIC files to ASCII. Resolution: Server Express does not have a command-line utility to convert ASCII and EBCDIC. This is of course often an issue for customers with existing applications on mainframes. In this case it's often true that they can convert files using the file transfer software on a mainframe, or alternatively they purchase Mainframe Express which does let you do this at the command line. It is of course possible to convert between EBCDIC and ASCII using the CHARSET compiler directive. Old KB# 4076
Problem: You may find that even though you didn't set the configuration option LOG=ON in your extfh.cfg (or the file specified in your EXTFH environment variable, see knoledge base article 22486) Resolution: The file handler configuration option LOG specifies whether any unusual file-related situations, such as corrupted files, or automatic file recovery, are noted in a log file for later examination. The configuration option LOGFILE specifies the name for the log file, by default the name is XFHLOG. In the latest versions of the product LOG=ON by default. But the documentation hadn't been updated accordingly (Server Express 4.0 rpi 1058489) but this should be fixed in Server Express 5.0. To display the file contents, you should use the cobfhprint tool which should create a file called XFHLOG.TXT containing information from the XFHLOG file. cobfhprint XFHLOGfilename Currently there are two defects associated wit
Problem: This set of samples is meant as an introduction for the PC_PRINTER library calls Resolution: INTRODUCTION ============ This set of samples is meant as an introduction for the PC_PRINTER library calls. This demo contains 4 separate samples; PCPrinterIntro - This sample is an introduction to the following PC_Printer calls; PC_PRINTER_OPEN PC_PRINTER_INFO PC_PRINTER_SET_FONT PC_PRINTER_CONTROL PC_PRINTER_WRITE PC_PRINTER_LOAD_BMP PC_PRINTER_WRITE_BMP  
Problem: This particular may be encountered when running programs after having migrated from OCDS 4.1.30 to OCDS 4.1.40 or 4.2 or to any version of Server Express. Resolution: The error "libfhutil.so.2.0: open failed" is normally due to the fact that this library file, used in the old file handling utility (fhutils) was dropped in OCDS 4.1.40 and support for it was removed in all successive versions of the product and all versions of Server Express. It was replaced by the Rebuild utility which carries out the same functions (and more) with better performances and the ability to handle larger files. Having being replace with the Rebuild utility, it will therefore be necessary to recompile / relink all the object and executable files. Further information pertaining to the old file handling utility and the necessary steps to migrate to the new Rebuild utility can be found In the online manuals "Programmer's Guide to File Handling" and "Migrati
Problem: The following information explains how to set a breakpoint in Animator on a specific count. Lets say you want to execute a rountne n number of times. The following explains how to set the breakpoint. Resolution: In Animator position the cursor on the line that you want to count. Enter "B"reak, then enter "O"n-count. Enter the number of times you want to execute that line of code before you want to break (stop) the process from executing. (The value must be greater between 2 and 255) Hit the enter key. Control is returned to the Break-point menu where you may select: On count works with :- Ordinary breakpoints : Stops every n'th time Breakpoint If conditions : Stops every n'th time condition is true &
Problem: This program demonstrates how to allow a user to select a font and style for printing using the Windows SDK function ChooseFont in conjunction with the Net Express PC_PRINTER routines. Resolution: INTRODUCTION ========== This program will demonstrate how to allow a user to select a font and style for printing using the Windows SDK function ChooseFont in conjunction with the Net Express PC_PRINTER routines. This function allows you to present a list of available fonts to the user for selection. This can also be done by setting the appropriate printer-flag when using the PC_PRINTER_OPEN call but the ChooseFont function is more powerful. It allows you to present a list of fonts based on certain criteria such as only Truetype, only fixed fonts etc. The criteria flags can be found in the CFDEFINE.CPY copy file. This example will use the selected font to output various text lines to the printer. The lines will be printed in differing point sizes and
Problem: This illustrates how to use the Win32 Api ResetDC to adjust the page size for the printer Resolution: INTRODUCTION ========== This example demonstrates the use of the Win32 SDK function call ResetDC to modify the settings of a printer between print jobs. This program uses the Net Express call-by-name routines PC_PRINTER_OPEN and PC_PRINTER_INFO to select a printer and obtain the printers Device Context Handle. This handle is then used to end the page started by PC_PRINTER_OPEN and in the call to ResetDC in order to change the printers page size to an envelope with landscape orientation. An envelope will then be printed. SOURCE FILES: ========= Program Files Description ------------------- ----------------------------------------------------------- RESETDC .CBL Program that calls the WINAPI functions to reset the device context
Problem: Customer downloaded a Fixpack, to find that it was in the format <name>.tar.encr. What does he do with such a file? Resolution: .encr files are encrypted, so that they can only be unpacked on a machine with a valid Micro Focus UNIX product. The approach is therefore to make sure that COBDIR and so on are set, and then to run the .encr file as an executable. It will magically transform itself into a normal .tar file, which can then be extracted in the usual way. Old KB# 4077
Problem: This question came from a customer who had Server Express and Application Server for 32 bit and 64 bit. But when he does a cob -V cob -V version @(#)cob.c 1.281 PRN=RXCAI/AAI:9g.K4.22.02 PTI=SP1 PTI=Fixpack22.02_13 I see no work It doesn't tell you if the product is on 32-bit or 64 bit. Even the PRN of Server Expres and Application Server for Server Express doesn't show you this difference even though they they could be a different bit. PRN=RXCAK/AAL:9i.T4.40.02 (Development) PRN=R1CAK/AAC:9i.T4.40.02 (Application Server) Resolution: It is actually quite simple to find this out: type in cob -v or cobmode Old KB# 4109
Problem: Installing Application Server with .net 4.0, getting internal error 2908 when trying to apply SRN90N40.exe Net Express with .net fixpack. Resolution: install .net sdk framework 1.1, then apply the SRN90N40.exe Old KB# 4104
Problem: To setup the Java environment with Micro Focus COBOL run the command . $COBDIR/bin/cobsje -v -J <Java_Home> If running on HP/UX 11.11 the cobsje script will abend with the error: ksh: COBCPY: parameter not set Resolution: This is a problem with HP/UX 11.11. The workaround is to set the environment variable COBCPY to anything prior to running the cobsje script: export COBCPY=A . $COBDIR/bin/cobsje -v -J <Java_Home> This is not a problem running on HP/UX 11.00. Old KB# 4073
Problem: According to the documentation, a fileshare server can be run as a background task using the following command line: fs >server-1.log 2>&1 & However after running this command, the following is displayed on the command line: [1] Stopped fs >server-1.log 2>&1 and an rts32 process is left running while can only be terminated with a kill -9 Resolution: Problem here seems to be that the fileshare password file needs to be available when starting the server as a background task. This is normally configured in the fs.cfg file, however this file does not seem to get automatically picked-up when starting the server as a background task. The following command lines will correctly start the server in background mode: 1. fs < fs.cfg >server-1.log 2>&1 & 2. fs -s
Problem: When writing a customised file handler on OCDS, the file ufhtab.o is provided to give various functions. This file has to be linked in to the runtime system. There seems to be no equivalent to this file in Server Express. Resolution: The cob command line to link an application with a user callable file handler has changed: you no longer need to specify the file handlers for all the different types of files, and the module ufhtab.o is therefore no longer required. It's also recommended that you specify the file handler with the CALLFH compiler directive, rather than using the -m flag. ** This option may be withdrawn in a future release of Server Express. ** Old KB# 4080#ServerExpress#RMCOBOL#COBOL#AcuCobol#netexpress
Problem: The example project MSMQLE works fine in NET Express but transfering it to a Visual Studio project it does not compile. Are there any instructions for doing this or is there a .NET example of using MSMQ available? Resolution: The MSMQOLE demo will not compile in Visual Studio as it consists of calls to unmanaged code -- the win32 APIs and the MSMQ objects, for instance. In .NET, you would add a reference to the managed System.Messaging .NET object. Please see the attached demo, which simply sends a message to a Private queue called 'MSMQTest'. If you change the 'QueuePathName' in the MSMQTEST.CBL source file in the MSMQOLE demo to have this 'MSMQTest' private queue receiving the messages, you can run the demo as a receiver and the message from the .NET sample will be displayed in the output window of the MSMQOLE demo. Otherwise it will be there in the Queue messages for the 'MSMQTest' pr
Problem: Trying to anim Pro*COBOL programs results in a blank screen. Animating pure COBOL program works fine. CTF and truss traces show a 115 error in dispatch.gnt and then the process appears to hang. Resolution: The problem can be resolved by applying an IBM patch to AIX for APAR IY80008. Apparently the issue shows up when the bos.rte.libpthread package is version 5.3.0.30. If you use 5.3.0.0 debugging works correctly. The issue does not show up on our AIX 5.1 or AIX 5.2 machines, which use an older still version of libpthread. You can find a little more information on the problem via this link: http://www-1.ibm.com/support/docview.wss?uid=isg1IY80008 There's another link at the top of this page to go to a download page to get the fix. Old KB# 4116
Problem: This example program demonstrates the use of the Net Express call-by-name library routine PC_PRINTER_WRITE. It will read the line sequential file PRNTRECS.DAT and output the records one at a time to the default system printer. This program also demonstrates the use of variable length line sequential files defined with the RECORD IS VARYING IN SIZE clause. Resolution: INTRODUCTION =========== This example program demonstrates the use of the Net Express call-by-name library routine PC_PRINTER_WRITE. It will read the line sequential file PRNTRECS.DAT and output the records one at a time to the default system printer. This program also demonstrates the use of variable length line sequential files defined with the RECORD IS VARYING IN SIZE clause. SOURCE FILES: ========== Program Files Description -------------------- -----------------------------------
Problem: Memory management is enabled by default since WrapPack all05n40.exe and might highlight memory problems in existing applications causing them to fail with the new run-time error 252. Resolution: memory_strategy Sets a memory management strategy. Syntax: >>-----set memory_strategy=---strategy-specification------>< Parameters: strategy-specification A numeric value representing one or more of the following flags (see Comments for information about valid combinations): Value Meaning 0x00000001 Check bytes strategy: prepend and append check bytes to each memory allocation 0x00000002 Check freed memory strategy: monitor for subsequent corruption the last n memory blocks freed, where n is the current value set using the memory_free_check_size run-time tunable 0x00000004 Reuse strategy: allow freed memory being monitored for corruption to be used to satisfy allocation requests 0x40000000 Compatibility strategy: maintain
Problem: You might want to hide or make invisible a control (e.g. input field) in a HTML form based on some values or events. Resolution: The best way to do this is to use JavaScript, a programming language that is common on Web pages. You can have JavaScript to determine when to hide a field. Although you can do many things with JavaScript, it would require you to know about HTML codes as well. The following JavaScript makes input2 invisible when the onclick_func function is executed and the value of input1 is "fano": function onclick_func() { if (document.form1.input1.value == "fano") document.form1.input2.style.display = 'none' } There are so many references of JavaScript on the Internet, and you will be able to find ways to enhance interaction with your web pages. Old KB# 4053
Problem: Is there an equivalent feature to the Animate | DateWarp feature in the Net Express IDE, to be used outside of the IDE for runtime? Resolution: Yes, there is. The runtime tunables datewarp_dynamic and timewarp_dynamic. REF: Go to the Net Express help menu and in the 'Index' tab, enter the keyword 'datewarp_dynamic' or 'timewarp_dynamic' Or go to the 'Contents' tab and located under the Reference | runtime system | runtime tunables for the datewarp_dynamic topic datewarp_dynamic Specifies whether the day, month, and year values specified by the current_day, current_month, and current_year tunables return static or "rolling" values. Syntax: >>-----set datewarp_dynamic=---.-TRUE-.------------->< &
Problem: Using the Print feature (File > Print) for some Dialog System screensets fail with error 114. Resolution: The problem is caused by a control that is somehow positioned off the window. To determine the problem, an export file must be produced from the screenset. Below is an example: From the export file Object {NoName} Type TEXT Parent WIN1 Start (2080,65472) Display "PROC" Stylename {Default-Font} End Object #{NoName} This object is attached to WIN1 but the position places it off the window. When print runs, it tries to place this in the screenset image, but because it is off the window, it tries to place it in a location outside the image causing the 114.
Problem: How to set a Conditional Breakpoint in Animator. Resolution: You can set a Conditional Breakpoint in Animator. This is not the same as a hard breakpoint. A hard breakpoint occurs when Animator executes a specific statement. A Conditional Breakpoint is a test of a data-item. When that test becomes true, execution stops. Below are some valid examples of breakpoints that may be used by animating our demonstration program pi.cbl. PI > 3.14 N < 25 STRING = "entrypoint" loop-counter > <value> When the breakpoint is set, the COBOL line will be highlighted. Remember, you do not specify the word "if" when setting the breakpoint. Old KB# 4070
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.