Browse all forums dedicated to the Rocket® COBOL product family.
Recently active
Problem: If the runtime receives a file status 98 on a Vision file it means the file has been corrupted. How can the Vision file be fixed? Resolution: To recover a corrupt Vision file which is returning a file status 98, use the "-rebuild" option of the Acucobol file utility, vutil. Keep in mind that the Vision file system has redundancies built into it, so that different rebuild options (-k #) will use different algorithms to rebuild the file. If one fails, another may succeed. At the end of a rebuild operation, you will be prompted with "Do you wish to replace the original file?" If N (NO) is chosen, the rebuilt file will be retained, such as it is, in the current working directory. It will be named VTMP####. * vutil -rebuild filename * vutil -rebuild -k 0 filename (rebuild on primary key) * vutil -rebuild -k 1 filename (rebuild on 1st alternat
Problem: Does AcuGT have a similiar routine to RM/COBOL's C$SCRD routine? Resolution: For screen captures, use: W$BITMAP Routine This routine is a collection of related operations that handle bitmap (BMP and JPG) images. Only Windows machines can actually display bitmaps. On all other machines, this routine returns an error code. Usage CALL "W$BITMAP" USING WBITMAP-CAPTURE-DESKTOP , parameters, GIVING BITMAP-HANDLE Refer to the ACUCOBOL-GT Appendices manual, Appendix I, for details on this routine's operation codes and parameters. Old KB# 2719
Problem: The runtime fails with a "Memory alignment error". How can this be resolved? Resolution: A "Memory alignment error" occurs in response to a Bus Error signal. This signal is generated on some UNIX machines (but not all) when a multi-byte data item is accessed on an inappropriate memory boundary. These machines require that integers and long data items be aligned on a certain byte boundary and involves how the CPU fetches data and the optimizations present in the machine's instruction set. For example, if a program accesses a 4-byte long data item that is not aligned on a memory address that is divisible by 4, a memory alignment error would occur. Data correctly aligned: data 1 = a|a|a|a| data 2 = b|b|b|b| Data misaligned: (data 2 doesn't begin at the start of the 4-byte address) data 1 = a|a|b|b| data 2 = b|b| | | COMPILE SWITCHES TO USE The most common solution to memory alignment err
Problem: The print file is opened to do some write statements to print part of the report then use this code to get the write-cursor's current position: INITIALIZE WPRTDATA-DRAW. MOVE WPRTUNITS-PIXELS TO WPRTDATA-DRAW-UNITS. MOVE 1 TO WPRTDATA-DRAW-SHAPE. CALL "WIN$PRINTER" USING WINPRINT-SET -CURSOR, WINPRINT-DAT A &nb
Problem: On some systems it may be desirable to have more than one version of the Acucorp product suite operating concurrently. However, doing so may cause concerns about compatibility in license management using multiple versions of the acushare utility concurrently. Resolution: In version 7.0, the acushare utility, which provides shared memory and licensing management, has been rewritten to use network sockets (rather than the previous IPC message queues). Due to this change, old and new versions of acushare may run simultaneously on the same system. However, acushare versions 6.x and earlier cannot be used with extend7 or extend8 products. Conversely, acushare versions 7.x and 8.x cannot be used with pre-extend7 products. Each version of acushare must be installed in and started from separate directories. Example: /opt/acucorp/610/bin/acushare -start /opt/acucorp/700/bin/acushare -start Note in the example below that the IPC key has cha
Problem: After upgrade from 7.0 to 8.0 problems with signed numeric fields that have a value of zero have been encountered. Here is the situation: A numeric field is defined as PIC S9(7) TRAILING SEPARATE. In this particular data file the value is zero, when viewing this field in the debugger in hex it's value is 30303030 30303030 The program has this statement: IF NUM-FIELD NOT = ZEROS In version 7 the above statement is not true because the value of that field is zeros. Now compile the program using version 8 and run with version 8 runtime the above statement is true. This is causing programs to break. Example: 01 NUM-FIELD PIC S9(7) TRAILING SEPARATE. (hex value 30303030 30303030) Here is an example of how version 8 reacts to these statements compared to version 7. IF NUM-FIELD = ZEROS (version 7 says YES, version 8 says YES) IF NUM-FIELD NOT = ZEROS (version 7
Problem: What does this entry, seen in the runtime trace file, mean? Using SAFE mode for file access Resolution: On Windows systems, the speed of file access to Vision files located on a shared drive can vary. The cause of this variability is attributed to interaction between the way Windows handles file locks and the way it caches shared files on the local system. In Version 4.3.1, to overcome that variability and improve performance, the method used to open Vision files on Windows shared drives was changed. Subsequently, although most users experienced good performance and no problems, some users experienced sporadic file corruption problems (file status 98). To minimize the possibility of these errors, in Version 5.2.1 ACUCOBOL-GT reverted to the pre-4.3.1 method of opening files which is noted in the runtime trace as 'safe mode'. Although this method can
Problem: When ordering ports for the Linux operating system it is necessary to know the glibc version that is installed on the target machine to avoid a port mismatch. Resolution: From the command line type the following command: rpm -q glibc This should return output similar to: glibc-2.3.2-5 For ordering purposes, the glibc version in this example would be version 2.3. Example command line syntax and output: user@my_linux:~> rpm -q glibc glibc-2.3.2-5 On recent Linux distributions, the version can be found by simply running the library as if it were an executable: prompt% /lib/libc.so.6 GNU C Library stable release version 2.2.5, by Roland McGrath et al. [...] The first line of the output contains the version number. Another way to determine the version is to see what version string is embedded in the library itself: prom
Problem: At times it is desirable to execute more than one print job at a time. Resolution: Getting Started with ACUCOBOL-GT Version 8.0 Chapter 2: Windows Installation > 2.5 Printing and Spooler Issues > 2.5.3 Printing Multiple Jobs Simultaneously If it is desirable to print multiple jobs at the same time, multiple File Descriptors must be opened that point to "-P SPOOLER" or "-P SPOOLER-DIRECT" simultaneously. For example, there may be two simultaneous print jobs: SELECT FIRST-FILE ASSIGN TO PRINTER "-P SPOOLER". SELECT SECOND-FILE ASSIGN TO PRINTER "-P SPOOLER". ..PROCEDURE DIVISION. .. OPEN OUTPUT FIRST-FILE. OPEN OUTPUT SECOND-FILE. and both will print to the default Windows printer without interf
Problem: When trying to run an ACUCOBOL-GT application with Version 8 or even do a "wrun32 -v" version check "The system cannot execute the specified program" error occurs. The problem occurs when the ACUCOBOL-GT Runtime was not installed on the Windows machine where it is attempting to execute. It could be that the bin directory was copied from another Windows machine (ISVs often deploy their applications this way), or in a network environment where client PCs map to the ACUCOBOL-GT bin directory on a server. The underlying cause is that Version 8 is built with Visual Studio 2005 which not only binds the Runtime to new Microsoft dlls (MFC80 vs MFC71, etc) but to specific versions of those dlls. When the ACUCOBOL-GT Runtime Version 8 is installed on a given Windows machine the installer detects whether those dlls are present and installs those that are missing. When the bin directory is copi
Problem: In configuration section of a COBOL program, a computer name may specified following the OBJECT-COMPUTER phrase. With the 8.0 compiler, the following forms of the OBJECT-COMPUTER statement cause the compiler to hang and consume excessive cpu resources. The compiler must be terminated by a control-C (command-line) or via the Windows Task Manager: OBJECT-COMPUTER. OBJECT-COMPUTER. multiple words separated by spaces. The first form generates a compiler error in 7.2, as it is invalid syntax without the "computer-name" argument. But in 8.0 it just hangs the compiler. The second form is explicitly described as acceptable syntax in the docs (RM 4.2.2). In all cases above where "8.0 hangs", it occurs on both Windows and Unix. In addition, AcuBench hangs when trying to parse the source for copybooks
Problem: How can you detect if a printer is on or off when running a COBOL program on a Windows platform? Resolution: This can be done using the WIN$PRINTER routine and specifying the WINPRINT-GET-PRINTER-STATUS op-code. There is a sample program called prndemox.cbl that demonstrates the use of the WIN$PRINTER routine. It can be found the Sample sub-directory where ACUCOBOL-GT is installed, e.g.: C:\\Program Files\\Acucorp\\Acucbl800\\AcuGT\\sample\\prndemox.cbl It requires 4 copybooks: acugui.def winprint.def fonts.def crtvars.def It is also attached to this KB Item. Attachments: prndemox.zip Old KB# 2693
Problem: Commenting out the NO_SOCKETS variable in the config85.c and then relinking the runtime the Acu the products no longer function as they cannot communicate with the AcuShare license manager. Resolution: In version 7.0 and later when making changes to the config85.c do not make changes to the NO_SOCKETS section. Acushare needs the sockets to communicate so if the sockets are remove the products will no longer function. /* If you set NO_SOCKETS to 1, then the runtime will not need to link */ /* with any sockets libraries. Note that CLIENT and ACUCONNECT both */ /* require sockets, so setting this to 1 will automatically imply */ /* NO_ACUCONNECT and NO_CLIENT. &nbsp ; &
Problem: Some reports need to be sent to a certain printer because the report requires a particular type of form or requires the special capabilities of a certain printer. Resolution: Getting Started with ACUCOBOL-GT Version 8.0 Chapter 2: Windows Installation > 2.5 Printing and Spooler Issues > 2.5.1 Spooler Formatting > 2.5.1.2 -Q <printername> If it is desirable to utilize the Windows spooler to format report pages, but a particular printer need to be used, assign the print file to: PRINTER1 -Q \\\\printername in the configuration file ("CBLCONFI"). Printername is the printer designation as given in the Printers folder under Settings in the Start menu. The name may be up to 80 characters long and contain embedded spaces. The name may not include the semicolon character (;) or be surrounded by single or double quotes. The pages are printed in the manner described in "-P SPOOLER" above. The sample
Problem: How to make work the CGI demo Oscars with Apache on Windows. Resolution: First you need the runtime installed on the computer with the samples demo folder and Apache installed. My demo was made with Apache 2.2 and AcuCobol GT runtime 8.0 but older versions should work fine. First of all you should copy header.htm, footer.htm, body.htm and oscars.acu on the cgi-bin folder set-up for Apache. On my example that folder was : C:\\Program Files\\Apache Software Foundation\\Apache2.2\\cgi-bin You can copy as well oscars.htm at the location you are going to install html pages, for example on my demo was : C:\\Program Files\\Apache Software Foundation\\Apache2.2\\htdocs Here, open oscars.htm and modify the POST sentence to reflect your installation : <FORM method="post" action="http:\\\\par-gfollana.microfocus.com:8080\\cgi-bin\\oscars.acu"> Open httpd.conf and add the following line of code : ScriptInterprete
Problem: For some reports, it may be desirable simply to print to the default printer using the default font. Resolution: Getting Started with ACUCOBOL-GT Version 8.0 Chapter 2: Windows Installation > 2.5 Printing and Spooler Issues > 2.5.1 Spooler Formatting > 2.5.1.1 -P SPOOLER If it is desirable to utilize the default printer and font, simply assign the print file to "-P SPOOLER". For example, to assign "PRINTER1" to the spooler, enter the following line in the COBOL configuration file ("CBLCONFI"): PRINTER1 -P SPOOLER By default, the runtime system assigns the "PRINTER" device to the spooler. This may be changed in the configuration file by assigning "PRINTER" to some other name. When the runtime opens a file assigned to "-P SPOOLER", it automatically initiates a job with the Windows spooler and constructs print pages in accordance with t
Problem: How to capture a screenshot of a window into a bitmap Resolution: You have to use this syntax: CALL "W$BITMAP" USING WBITMAP-CAPTURE-IMAGE, "C:\\AcuSamples\\bitmap\\Resource\\image.bmp", 0, | 0 = active window is captured 0, | 0 = The entire window is captured, including the title bar, window frame, menu, etc. 1, | 1 = monochrome, 32 = 32-bits per pixel GIVING w-BITMAP-HANDLE If W-BITMAP-HANDLE = 1, you will find your screenshot in the saved .bmp file. For further details, see: Appendix I: ACUCOBOL-GT Library Routines > I.1 Library Routines > W$BITMAP Old KB# 2736
Problem: During a program run, the error message Perform Stack Overflow occurred. Resolution: This error message normally indicates that an AcuCOBOL-GT program exceeded the number of levels PERFORM statements can be nested within paragraphs or sections. A PERFORM statement is nested if the statement contains a PERFORM statement against another paragraph/section. This error can occur if a PERFORM statement did not exit properly. By default, the amount of nesting allowed by the runtime is set to 128. That is, 128 PERFORM againstg a paragraph/section that contains a PERFORM statement against another paragraph/section. This value can be increased by setting the runtime variable PERFORM_STACK to a higher value in the configuration file. If a paragraph/section is not exited correctly, the perform stack will not clear down properly. Normally the end of a section is marked by the EXIT verb and the end of a paragraph is marked by another paragraph name (for exampl
Problem: db2Initialize call failed with = -0000004904 ** External Compiler Module message ** DB0100 SQL4904N The pointer to parameter "piPidLength v95" of ** function "sqlainit" is not valid. when working against DB2 Version 9.5. Compiling with the DB2 directive returns "critical errror - DB2Initialize API not found". Compiling with the DB2 directive returns "DB00010 DB2 rejected an unspecified option" Resolution: The error regarding piPidLength is resolved in Net Express and Server Express 5.0 WP4. Generally, if you receive errors regarding DB2Initialize, you will need to compile your application with the DB2(UDB-VERSION=x) compiler directive, where x should be : V8 : DB2 v8.x V9 : DB2 v9.1 V95 : DB2 v9.5 You can determine the version of the DB2 client software by invoking db2level Old KB# 2290
Problem: Is it possible to force a program to be reloadedupdate with a shell command ? Resolution: The option -n of the command castran can be used to replace the CICS transaction CPMT NEWCOPY The documentation file of this command is attached. This file is come from Server Express 5.0WS4 Attachments: rhcomm25.htm Old KB# 2292
Problem: Browser displays HTTP:500 - The website cannot display the page when submitting a form and running a script in cgi-bin. (8)Exec format error logged in $ErrorLog/error_log Resolution: This happens because Apache expects to run an executable and finds a script. You need to add a #! to the top of the script to tell UNIX to execute that script using the interpreter specified. for example: #! /bin/sh Old KB# 2265
Problem: When compiling with Server Express 5.0 on HP/UX Itanium 11.31 you may encounter the following warning message: cobAAA027397/ldtab.s:92: warning 4018: invalid size This article explains the reason why the message is returned. Effectively, however, the warning can simply be ignored. It should be fixed in Server Express 5.1 which is currently scheduled for mid-2008. Resolution: Originally HP's assembler contained a bug; a certain size was documented as being in words whilst in practice it had to specified in bytes. In version 11.31 HP fixed this bug but it did unfortunately introduce a problem of incompatability, thus, causing the warning message. In Server Express 5.1 the code wiill be changed so as to work with both assemblers. Old KB# 2281
Problem: If there are multiple copies of MFDS running, by default cobesdebug will only connect to the one running on port 86. Therefore only the regions running under that copy of MFDS will be available to cobesdebug. Resolution: cobesdebug uses the mf-client.dat to determine which port to use to connect to MFDS. Modify $COBDIR/etc/mf-client.dat to point to whatever port MFDS is using. Ex. mrpi://localhost:8686 Old KB# 2303
Problem: In my application , the Display verbs are described with color clause , but all screens are displayed without colors Resolution: Cobol system uses Unix terminfo database. So the terminfo entry ( $TERM )must be defined with the colors entries. The example is for vt220 & xterm . Attachments: colour.tar Old KB# 2329
Problem: Some application return Unix return-code that is not validated to zero. In these applications, the return-code is not used by the Cobol module . With others applications , the return-code is used , but the return-code of the application is not validated to a right value Resolution: Some third party software use a return-code between its subprogram. In this case , the application returns a value that is not null. The compiler directive -C DEFAULTCALLs=4 can be used if all CALL verbs must not return the return-code. If some CALL verb must return a value of return-code , it is necessary to use CALL-CONVENTION clause. An example is attached. If it is not use with CALL-CONVENTION, a CALL verb is used with the value of DEFAULTCALLS that is by default zero. Attachments: prog.cbl Old KB# 2334
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.