Code Comments
Programming Forum and web based access to our favorite programming groups.Jiapj wrote: > I want to compile and run a "hello world" program written with COBOL, > I have a windows 2003 and have installed Micro Focus's Net Express, > but I don't know how to compile my hello.cbl file and which enviroment > variable need to be set, > > Does anyone would help me? any link, site or document is > appreciated. > Very thanks in advance. > Kellie has given you a solution sort of free-hand. The following is the long term approach if you were building a project in Net Express containing either a few or many programs. (Read up on some of this from the help files before trying it - the on-line manual 'Getting Started' covers the following in detail). From the N/E IDE screen - 1 - Select File---> New----->Project 2 - (1) Type = Empty Project, (2) Name of Project - can enter 'Hello' (3) Folder Name - \Cobol\examples\hello - It wont find this folder so will ask if you want to create it - Yes 3 - Now you see a blank project screen without any files 4 - Select File---->New----> Program 5 - up comes a blank file 6 - enter the following source starting at Column 8 :- *>----------------------- display 'Hello World' *>----------------------- The above is a complete program with Micro Focus - you can try adding the other stuff later. Save the above as 'Hello' (the suffix 'cbl' is understood) 7 Back to the IDE - Project----->Add Files to Project - select your Hello.cbl from list 8. Select Project ----> Rebuild All. (Alternatively you can 'open' your hello.cbl and select Project----->Compile (shows name of opened Hello.cbl). 9. Any typos make corrections and go through 8 again. 10. Run clean compiled program - click on the 'runner' icon just below the Menu item 'Project' The above probably looks a bit complicated but not when you have taken a few cracks at it. It you want to get into 'windowing' using GUIs substitute your code for Item 6 above with Hello2.cbl), and then follow 7 onwards. Example I've given above in Item 6 is a DOS text window. You have three options for Windowing :- (a) using APIs - check examples in demo folder (b) Dialog System = File----->New---->Dialog System Screenset - the Dialog Systgem has at least one demo for each control you can use (c) Dialog Editor = File----->New----> Resource file - Check out the GUI demos where a combination of Object Oriented classes and the contents of the Resource file are used together. Once you start writing some programs with volume, familiarize yourself with the Animator feature which helps you check out why things have gone wrong. Jimmy
Post Follow-up to this messagePowered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.