Browse all forums dedicated to the Rocket® COBOL product family.
Recently active
The following information pertains to UNIX/Linux platforms, for commands entered on the command line (i.e. at a shell prompt), or commands within makefiles or build scripts. If you are already familiar with the "cob" command and its flags (including the "-x" flag), you might briefly review the following introduction, then skip to the section below named "Problem". Introduction To create a system executable, use the "cob" command with the "-x" flag. For example: cob -x myprog.cbl ./myprog In this example, "cob -x" invokes the COBOL compiler to compile "myprog.cbl" to object code (creating "myprog.o"), then automatically invokes the system linker "ld" behind the scenes to link "myprog.o" with COBOL runtime libraries to produce a system executable named "myprog". The executable can then be invoked by its name at the command line. If an a
On the bottom of my screen, when I'm editing a COBOL program in Visual Studio, I can see the status of my insert key (OVR/INS), but I can't see whether I've got CAPS LOCK on. Is there something I can poke to show me the status of my CAPS LOCK key?
Hi! I must set a Image like this in C#: imageArtikel.Source = new BitmapImage(new Uri(Bild)); Have anyone done it before? #SetIMAGESourcemanuelinWPF
In some terminal emulators, certain byte values may not be printable in the current character set used. For example, in the terminal emulator Putty, the character set may be set to ISO 8859-1 West Europe, or similar. Changing the character set to UTF-8 will correct this problem, and allow Data File Editor to correctly display records containing this kind of binary data. In Putty, this setting is found under Window->Translation.#ServerExpress
I've compiled up a lot of .obj files from with VisualCobol 2.1 using Visual Studio. I need to get these running on a linux server using cobrun. I tried grabbing the obj files and using "cobrun programname.obj" and get an error "217 Incompatible host for native code file" Now I know I'm missing something fundamental, but cant seem to find it in the help. Any pointers would be greatly appreciated. Steve
I'm using a Visual COBOL trial licence to migrate one program developed using a very old COBOL version to a newer one, and im facing a problem related to file handling. The program needs to open a physical file twice at the same time, using INPUT and I-O modes. Below is one part of the code: (...)FILE SECTION.FD ARQDK7 RECORD CONTAINS 1461 CHARACTERS VALUE OF FILE-ID IS NOMSOR-DK7 DATA RECORD IS REG-DK7. 01 REG-DK7. 05 CHAVE-DK7 PIC X(16). (...) FD ARQDK7-CP RECORD CONTAINS 1461 CHARACTERS VALUE OF FILE-ID IS NOMSOR-DK7-CP DATA RECORD IS REG-DK7-CP. 01 REG-DK7-CP. 05 CHAVE-DK7-CP PIC X(16). (...) PROCEDURE DIVISION MOVE "name_of_file" TO NOMSOR-DK7.MOVE "name_of_file" TO NOMSOR-DK7-CP. OPEN I-O ARQDK7.OPEN INPUT ARQDK7-CP.(...) The I-O mode handles all the data process.The INPUT mode is used only for verification while the program runs. Thanks in advance.#COBOLFILE#COBOL
In order to get the InfoExpress server to create files with the correct permissions, you will need to execute the InfoExpress server from a shell script that sets the correct umask. This should allow you to control the shell that the InfoExpress server is created in. This will give you control over the permissions of files created using InfoExpress.UNIX-like operating system, have the function, "umask", which can be used to change the default permissions for newly created files for any user.For more information regarding umask, please consult the man pages for your operating system.
Starting with the availability of file version 3 for release version 6.6, RM/COBOL has supported the creation of index files greater than 2 GB. With the release of version 7.5 and file version 4, the default file index file version supports these large files.There are several steps to adding support for large files for existing index files: 1. The first step is to make sure that the Operating System supports the creation of files greater than 2 GB. This may involve changing the file system, a kernel setting, or even the ulimit associated with a user account shell. Your systems support person will need to accomplish this, as each Operating System may do it differently.2. Next, edit/create the default configuration file (runcobol.cfg) located in the RM/COBOL installation directory. Add the following two records to that file: ----------------------RUN-FILES-ATTR LARGE-FILE-LOCK-LIMIT=512RUN-INDEX-FILES USE-LARGE-FILE-LOCK-LIMIT=YES ----------------------**The default LARGE-FILE-LOCK-LIMIT
The online Designer help discusses this topic in detail. However, the following is a simple guide to setting it up. This guide assumes that you have created a new catalog and have imported the FDs of all the files you wish to use. All files MUST have the same structure and data definition. If you wish to 'merge' data from files that have dissimilar structures, then create a table per file and merge the data in your ODBC enabled application using SQL JOIN.1. Open each FD, right click, and select Add File Label. Ensure the name is unique for each FD. It helps to give the File Label the same name as the FD. 2. Create a table and drag all the fields (including the File Label field) from the first FD.3. Click the table connection toolbar button. You should see the table connection for the first FD. For each FD (data file), highlight the element Table Name and click the add table connection toolbar button. For the Path Name enter the name of the data file to access and for the File L
This applies to programs using file names that do not specify a path. To create new files via the InfoExpress server rather than in the current working directory, use the following configuration record:DISABLE-LOCAL-ACCESS-METHOD=UNQUALIFIED-NAMESHowever, this option affects only where new files are created; it does not affect finding existing files in the current working directory.If you have files in the current working directory with names that match what the program is looking for, but want the request to go through InfoExpress, there are some undocumented DISABLE-LOCAL-ACCESS-METHOD options that should work for you. These are: ALWAYS, INX-ORG, REL-ORG, and SEQ-ORG. ALWAYS means that the local access method is disabled for *every* file, including program and temporary files. (You probably don't want to use this one.)The three xxx-ORG options mean that the local access method is disabled for all files of that organization (Index, Relative, and Sequential files, respectively). If
[Migrated content. Thread originally posted on 17 February 2011]Hello,is there a way to add libraries to the classpath in Eclipse.I have a class in a .jar file (code below) :package com.easypaygroup.javacobol;public class Content { private String content = "Initial value"; public void showContent(){ System.out.println(content); } public static void main(String[] args) { Content content = new Content(); content.showContent(); }}And i have a COBOL JVM project with the following source : program-id. testjava as "testjava". environment division. configuration section. data division. working-storage section. procedure division. invoke type java.lang.System::out::println("help") invoke type com.easypaygroup.javacobol.Content::showContent(). goback. end program testjava.I do not get it compiled in Eclipse. Adding the jar library to the classpath in Eclipse doesn
There is a incompatibility between the directive ZEROSEQ and the directive for the precompiler p(prexml) to use XML files 000001$SET ans85 p(prexml) endp charset"ASCII" 000004 IDENTIFICATION DIVISION. 000020 ENVIRONMENT DIVISION. 000023 INPUT-OUTPUT SECTION. 000024 FILE-CONTROL. 000025 000026 select factura-XML assign to ID-ARCHIVO-FAC *>"factura.xml" 000027 organization is XML 000030 000031 document-type is 000032 "www.sat.gob.mx/.../cfdv22.xsd" 000036 file status is file-status-spec, 000038 FILE STATUS IS ID-STAT. I have the following file in the project directory:
Hello, I'm looking to print images using PCL, I've found a utility called mkpcl, which converts an image into a raster graphic to print which works great. The problem I'm having is that the file generated can be quite large, and I'm losing some of the formatting when I'm attempting to segment the file into a smaller print line to print in a report in a COBOL application. Is there a way to embed one PCL file in another, or for me to send the whole PCL graphic file to the printer and have it print on the same page as the report I'm printing without having to try to string it into print lines?
Please confirm receipt of the detailed e-mail attachment I sent, at your request, to you at Bernd.riemke@riemke-it.de regarding setting up my colleagues with Micro Focus COBOL.
Problem: A “CallNamedPipe failed” error appeared in the debug window of the Net Express IDE after executing an application using Net Express version 5.1. This same application ran without any errors 24 hours earlier and the customer’s IT team had made some system changes since the last run. After further testing it was determined that this same error occurred when running any program within the IDE including one of the example programs that is supplied with Net Express. What could be the cause of this error? Resolution Using the Process Monitor, which is an advanced monitoring tool for Windows, can provide details to what might be causing the error. This utility can be downloaded from http://technet.microsoft.com/en-us/sysinternals/bb896645 and can be used to open and view a log file. Once setting the utility to monitor all activity associated with MFNET.EXE for a single execution of the COBOL program, a log file is produced. In this case, the log file produced by this util
Problem: Customer is looking for a way to do a text search for a COBOL identifier and include all programs within a Visual Studio project or solution. Is this possible? Resolution: Use the Find In Files option to search for a text string within your project or solution or elsewhere. Under Edit-->Find and Replace-->Find In Files Select the desired location to search, such as Project or Solution in the Look in dropdown list along with any other options like case matching, etc.
Problem: Customer has a Windows Forms application that uses a form with a number of TextBox controls on it.When they press "tab" or click the mouse on another control, the data is processed. When they press "enter" nothing happens. Customer asks: How can I have the enter key behave like the tab key? Resolution: In the properties for the form set the KeyPreview property to true. Create a KeyDown event handler for the form and place the following code into it: method-id Form1_KeyDown final private. procedure division using by value sender as object e as type System.Windows.Forms.KeyEventArgs. if e::KeyCode = type System.Windows.Forms.Keys::Return set e::Handled to true set e::SuppressKeyPress to true invoke type SendKeys::Send("{TAB}") end-if. end method.
Problem: Customer has an application that is reading an indexed file which contains sveral fields defined as PIC X.These fields may contain ANSI characters like the German ä/ö/ü/ß"... After reading a record and moving a field containing these characters to a TextBox control the characters are not being displayed properly. The move statement looks like: move field1 to textBox1::Text How can these characters be displayed correctly in the textbox control? Resolution: If the field that you are reading in is defined as PIC X then it will be read as ANSI data. The TextBox::Text property uses Unicode as do all .NET strings so the data needs to be converted before it is displayed. The following example will work where my-ansi-field would contain German characters read from a file: 01 my-ansi-field pic x(5). 01 myarray type Byte[].... set myarray to my-ansi-field 
Problem: Customer is migrating his application from Net Express to Visual COBOL. The application is a mixture of COBOL and C programs where there is a main entry point WinMain that resides within a C library. Under Net Express they used a makefile to call the system linker directly in order to link this so that the C WinMain would be the main entry point and the COBOL objects would be alternate entry points. The customer now wishes to compile and link this in the same manner but using a Visual COBOL project to do the build instead of a makefile. The program builds and links OK but it is not picking up the WinMain in the C .LIB as the main entry point so it does not start correctly. When they try to specify WinMain as the entry point on the COBOL Link tab of the project properties it gives them an error that this entry point cannot be found. How can they use this link scenario from within a Visual COBOL project? Resolution: Add the following to the additional directives on the bott
Problem: Customer has a WPF application that has a main form that launches other forms.When one of these other forms is closed they would like to be able to pass some data entered in the form back to the main form. How can this be accomplished? Resolution: This can be done by creating a method within the main form that will be invoked automatically when one of the other forms is closed by attaching the method to the FormClosed event handler for the child forms. If the data that was entered in the child forms is stored as a property then that data can be read from within the main forms method that is attached. Here is an example that has a main program that displays a new form using the Show method and then attaches a local method to the FormClosed event so that it will be invokes automatically when the form is closed. That method is then used to read the property set in the child form and populate a TextBox on the main form with the text. Example: Here is the code for Window
Problem: Customer has a Windows Forms application which uses a MaskedTextBox control.When the control is entered using the Tab key there is no problem as the cursor will be in the starting position.If a user instead clicks in the center of the control the cursor remains in the center of the control.Customer asks: Is there a way to force the cursor to the right or left edge of a MaskedTextBox? I want the insertion point to always be on the right for numeric data and on the left for text. Resolution: You could do something like the following in the MouseUp event for the MaskedTextbox control: method-id maskedTextBox1_MouseUp final private. procedure division using by value sender as object e as type System.Windows.Forms.MouseEventArgs. invoke type SendKeys::Send("{HOME}") end method. If your control's RightToLeft
Problem: Customer is developing a WPF application and would like to display a Windows Message Box that has a Yes and No button. How can the application tell which one of these buttons was pressed after returning? The Message Box is being displayed as follows: invoke type System.Windows.MessageBox::Show("My Text", "My Caption", type System.Windows.MessageBoxButton::YesNo, type System.Windows.MessageBoxImage::Question, type System.Windows.MessageBoxResult::Yes, type System.Windows.MessageBoxOptions::RightAlign) Resolution: The result is returned from the Show method as type System.Windows.MessageBoxResult so you can just test for the result directly in a conditional statement like: evaluate type System.Windows.MessageBox::Show( "My T
Problem: Customer is converting from ACUCOBOL to Visual COBOL managed .NET and they are receiving a compiler error on a program that is doing embedded SQL access. They have host variables defined as PIC X(5) COMP-X. Are these allowed in Visual COBOL? Resolution: In Visual COBOL when using OpenESQL these host variables would need to be defined as PIC X(4) COMP-X/COMP-5 for integer columns or PIC X(8) COMP-X/ COMP-5 for bigint columns. There is a chart that shows compatible COBOL data types for host variables here: There’s further detail on all the host variable definitions supported by OpenESQL – as well as the DB2 ECM– under here .
Problem: Customer is developing a Windows Forms application and would like it to display a LoginForm to do user authentication and then to exit the application if it fails or continue on and display the main form if successful. How can this be done? Resolution: Change the main.cbl program to display the loginform first and then start the application with the main form depending on the results of the login. Example: main.cbl class-id winformlogin.Main. method-id Main static attribute System.STAThread. local-storage section. 01 mainForm type winformlogin.Form1. 01 loginForm type winformlogin.LoginForm1. 01 myresult type DialogResult. procedure division. set loginForm to new winformlogin.LoginForm1 set myresult to loginForm::ShowDialog if myresult = type DialogResult::OK set mainForm to new winformlogin.Form1() invoke type System.Windows.Forms.Application:
Problem: Customer is trying to define an ISAM file within a class program within an ASP.NET Web Application.The compiler is flagging an error that points to the file status data-item that is defined in the select clause. The error is as follows: COBCH1268 : A static file cannot reference instance items …\\Default.aspx.cbl The program is shown below: class-id mywebsite_Default is partial inherits type System.Web.UI.Page public. input-output section. file-control. select test-file assign to "C:\\TEST.DAT" &n
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.