Visual COBOL – Modern COBOL Development
Visual COBOL is the new COBOL development product from Micro Focus. We have created this short guide to help you get up and running quickly and easily so that you too can experience the simplicity and the power of Visual COBOL.
Getting Started
Check the readme for pre-requisites
Make sure you have Visual Studio 2010 installed
If you haven’t got it yet, download the Integrated Shell edition here.
Download & Install Visual COBOL from here.
Open up one of the sample solutions
On Windows 7 they’re installed into “\Libraries\Documents\Public Documents\Micro Focus\Visual COBOL 2010\Samples”
Or (much easier!) click the link in the Visual COBOL start menu group
Have fun!
First Visual COBOL Project
If you want to create your first graphical .NET project, why not start with a classic “Hello world”?
In Visual COBOL, follow these steps:
File -> New Project
Select COBOL, then Managed and you’re presented with a long list of the different project types possible with COBOL. Select “WPF Application”, give it a name and click “OK”.
Visual Studio will create a new workspace with the WPF designer ready to paint the new form.Open the Toolbox toolbar which will probably be minimized to the left border of the VS window or click View -> Toolbox.
Drag a button from the Toolbox onto the WPF window
Double click the button in the design view.
This opens “Window1.xaml.cbl” and you’ll see most of the hard work has been done for you - a bunch of COBOL code is ready for you to edit.Position the cursor inside the click-handler:
method-id button1_Click final private.
procedure division using by value sender as object e as type System.Windows.RoutedEventArgs.
<place cursor here>
end method.Add the following line of code on the line following procedure division:
set self::button1::Content to "Hello from WPF"Press F5 to Build and run, or click “Debug -> Start debugging” in the menu bar.
Congratulations! You’re now a WPF programmer!
Next Steps
If you already have some COBOL code, why not try importing and building it in Visual COBOL. Please bear in mind that this release doesn’t support EXEC SQL (coming soon) or mainframe style applications (e.g. EXEC CICS – watch out for news about this from Micro Focus in the next few months).
The trial version of Visual COBOL has a 30-day limited license for personal, non-commercial use only. If you want to extend your trial or find out how to get a full license (and it’s probably more affordable than you think!), then contact Micro Focus at cobol@microfocus.com.
Feedback
Let us know how you get on. Any problems? What do you want to see in Visual COBOL? Send us a mail at cobol@microfocus.com.