Browse all forums dedicated to the Rocket® COBOL product family.
Recently active
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 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 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 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 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 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 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
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:
We are trying to use the new button color feature in 9.2, but can't get the colors to work as a variable. The value can be negative, so we are using signed variables. The max color value is FFFFFF (16,777,215 = 8 digits). In the sample excerpt below, Button 1 shows with a Pink background. The other two buttons have a maroon background. How can we set the colors at runtime? Working-Storage Section. 78 RGB-Pink value X#CBC0FF.01 ws-color-pic pic S9(8).01 ws-color-int usage is signed-int. Screeen Section. 01 main-screen.03 push-button line 2 col 10 title "Button 1" background-rgb RGB-Pink.03 push-button line 2 col 30 title "Button 2" background-rgb ws-color-pic.03 push-button line 2 col 50 title "Button 3" background-rgb ws-color-int. Procedure Division. move RGB-Pink to ws-color-pic, ws-color-int.display main-screen.display message "stop".destroy main-screen.stop run. #ButtonRGBColor
Because one of our providers does no longer support ORACLE, I must use SQL-server from Microsoft. Is it possible to use in one program embedded ORACLE and Microsoft SQL-server. When it is possible, where can I find documentation about it,
Hi, how to close a LoginForm passing control to MDIForm without closing the application?
It was suggested at Micro Focus sales that possibly Chris Glazier or maybe Jim Baum would be the person to help me get my 2 newbie colleagues set up. We've just purchased licenses for one developer and one execute-only (I already have developer). I want for my developer colleague to be set up exactly like me, and the execute-only colleague to be as nearly like me as possible. With whom should I communicate, and to whom (and how) may I send specifications?
We have several web services running using BIS/IIS in a test environment; we're able to consume those services from C# and from ASP web pages. We need to ensure we can consume them with an Extend Cobol program as well - first attempts were abysmal (no doubt reflecting lack of understanding of XML extensions). Is there a sample program provided with BIS which demonstrates consuming a BIS web service?
I saw the post dated 21 October about Emails. We use a third party product which we embed in our RM/Cobol source program - it enables us to create pdf files and auto email them out as attachments with a covering note all from within the source program. You can use overlay images so it's perfect for sending invoices, statements etc. Can only be used with Linux/Unix. We've used it for one of our Customers for over a year with no problems and it only costs 350Euro as a one-off price!!. You can 'cc' the email, you can use the built in SMTP client on its own if you like (ie you don't need to attach a pdf). Visit www.form2pdf.se for more info.
I am trying to install Visual Cobol on my laptop. I am running Windows 8.1, my visual cobol serial number is 600000526614, product name is, Visual COBOL for Visual Studio Personal Edition, version is 2.1.Update 1. My problem is once I click the install button it flips to a blank and does nothing, it doesn't matter if I try the full install or the web install. I have tried both types several times with the same results.
Boa tarde companheiros. Eu sou um analista de sistemas e programador cobol, com mais de treze anos de esperiência. Só que infelismente tivi um acidente que afetou a minha memória e, me afastou do cobol por anos. Agora estou me recuperando, mas a minha memória ainda tem problemas. Eu baixei o Visual cobol for visual studio 2012 shell, mas estou com inúmeros problemas. Primeiramente o visual studio está em inglés, e eu não consigo nem começar um programa, pois o ingles é um idioma que eu não conheço. O cobol tem comandos que eu não conheço ou esqueci. Eu estou presizando de informações sobre o visual studio em português e livros ou apostilas de visual Cobol em português. Certo de minha recuperação, conto com a ajuda de voçes. Até no site da Micro Focus eu tenho dificuldade de navegar. Me ajudem por favor, pois eu gosto muito do COBOL, e já até fiz um fluxograma, só me falta programar e executa-lo. Antecipando meus agradecimentos espero. Sidney dos Passos sidney.dos.passos@gmail.co
I'm editing a COBOL program. Across the very bottom of my screen is a blue bar that says Ln 46 Col 11 Ch 10 OVR I know what Ln and Col and OVR mean, but what does "Ch" mean, please?
We are looking at a process that will allow a user to write files to a local drive using a combination of: 1. C$OPENSAVEBOX (type 4) to select a folder to write the file 2. C$COPY to copy the file from the server to the local machine The above works fine as long as the user has write access to the folder selected. So we are attempting to check write access to a folder before we let the user "pick" that folder. We are attempting the following: 1. C$OPENSAVEBOX (type 4) to pick a folder 2. C$COPY to copy a small test file to folder 3. If no Error is returned from C$COPY the user has the rights to that folder 4. C$DELETE to delete small test file from folder This is where my question comes in...all items above work great except #4...the delete command will not remove the file. The C$DELETE command returns 1 (error) every time it is ran. Any help would be great with this or any different way for us to check user access to write to a folder would help also.
Hi! I read a isam file with german letter like "ä/ö/ü/ß"... On debug time i can see the right letter... if i make a move like this: move ort to textBox1::Text then there is a bug in the textBox1:Text it looks like then ASCII not ANSI!? What is wrong? #WPFTextBoxgermantext
How do I include data access in a website developed with Visual COBOL? I created a new COBOL ASP.NET web site, which works, but as soon as I add SELECT and FD statements for a file access I get compile errors. Maybe the syntax is wrong, or I have to link in some module for data access? Error 1: Undeclared identifier _MF_LINK_TEST-FILE C:\\Users\\Test\\AppData\\Local\\Temp\\_cd5836_2\\About.aspx.il Error 2: COBCH1268 : A static file cannot reference instance items …\\Default.aspx.cbl 11 55 Temp1-ASP-NET-WEB = results from the " FILE STATUS IS FS" statement. The full program is shown below: class-id Temp1_ASP_NET_WEB._Default is partial inherits type System.Web.UI.Page public. INPUT-OUTPUT SECTION.
Using instant SQL with rmcobol ruintime 32-bit oracle connection works well, when migrate to linux 64-bit runtime rmcobol the same library doesn´t work shows the error : libiodbc.so.2 wrong ELF class ELF CLASS32 What can be the problem? #linuxcobol#RMCOBOL
I've got 30 programs in a project, and I want to quickly locate every place in every program where the variable EDITFILE-PEER-TOPIC is referenced. Do I have to search through each program separately, or is there a way to do it with a single command?
I feel a bit uncomfortable asking so many questions, but I do appreciate the answers a lot. Especially so since I am growing very fond indeed of Visual Cobol. It seems to wrap the best of MF Cobol, AcuCOBOL, and even R/M Cobol all into one neat package. Color me impressed... I could even learn to like the Eclipse editor, except it insist on putting a strikethrough line on every data item I type in a COBOL program. Doesn't affect the program compiling, just drives me nuts trying to read my own code. There seems to be a lot of advantages to using Eclipse, so I am trying to stick in there and stay away from ISPF or XEDIT... but - it ain't easy. ;) I see this both on Linux and Windows, so it is probably just something stupid I am doing. Example: FD CN00. 01 CN00-RECORD. 05 CN00-ID PIC X(18). 05 CN00-NAME PIC X(33). -Paul
Dear Sir, I am using Micro Focus Visual Cobol with Eclipse and when I Compile my program and try to RUN with Debbugins I get an error " Linkage Section Ítem Not Initializad". Please could you say WHERE I can SET Linkage Section to TRUE without use a COBCONFIG file ? Many Thanks in advanced for Your Help. PJM
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.