|Issue 3, 2011||Download pdf|
Have you heard about NaturalONE? I’m sure you have, it’s been around for a while now. For us experienced “Natural” mainframe programmers, the better question is what does it mean for me? Must I learn a new version with new or enhanced statements? Must I learn a new program editor? Well, I have news for you - it’s a new Era for developing Natural applications. NaturalONE has a new and unbelievable program editor that has capabilities like code completion, a parser (syntax checker that keeps on checking your syntax as you type), a “mini “ XREF, an outline view, a “Debugger” and many, many more “goodies”.
Ever feel “stuck” behind when new programmers come around, look at our “green screen”, and watch us type—”.I” to insert a new line in the editor or “.M” to move a field in the map editor—instead of using the mouse? Well, that’s exactly how I felt but worse. As a Natural instructor for more than 10 years, I found it was not so simple to convince a Java or C# programmer—sent to the course I was teaching—that the Natural programming language—which has been around for more than 30 years—is simpler and shorter than programming in Java. “You want to tell me that people still work in mainframe?” is a remark I heard more than once (a day) during the course. “That’s how you draw/design your user interface?” they would incredulously exclaim.
Well I have news—good news— for you, those days are over. With NaturalONE’s new IDE (integrated development environment)—that’s a fancy way to describe the new environment (Eclipse) that Natural is developed in—life is going to change for us. Almost all Java programmers around the world now use Eclipse as their standard development environment; now, we will be using it as well. We will now code in a friendlier and easier editor with NaturalONE in Eclipse, while accessing many more tools than we ever had or even dreamt of having when coding in Natural.
The time has come to get down to the details. Let’s start with the screen displayed when we start NaturalONE and look at the main/ largest window that appears in the middle of the screen. This is known as the “Source Editor”, shown in Figure 1.
To start programming, all you do is type the command(s) you need. “Hey that’s not new,” you say, “We’ve been doing that for many years—since we started programming in Natural.” I’ll tell you the truth—so have I—since I started programming in Natural more than 20 years ago. The good news is NO MORE! You no longer have to memorize the syntax of each and every Natural statement. Start typing the beginning of the statement you want to code, press CTRL+SPACEBAR, and see what happens—a little window pops up that contains all of the Natural statements that correspond to what you typed. If you don’t type anything, and just press CTRL+SPACEBAR, a list of all of the Natural statements will be displayed. As you type letter after letter, the possible statements will narrow down until you finally choose a specific statement. You can also compose the whole statement by pressing CTRL+SPACEBAR a few more times until the statement is complete.
Another cool feature of NaturalONE is the Parser. Now you do not have to “Check” your syntax by bringing the cursor to the top of the screen and typing “Check” or “C” as a shortcut. Just start typing a statement and look to the left of the line you are typing. There you will see a red box with a white “X” in it—this means that there is a syntax error in your code on that line—as shown in Figure 2. To see the error details, place the cursor on that “little red box” and an error message will appear, such as:
E_0218: Error in construction of DECIDE ON/DECIDE FOR statement.
(Empty NONE clause)
The minute you correct the syntax, you will notice that the red box on the left disappears. This means that you won’t have to “Check” your program for syntax errors anymore. The minute you see that there are no more “Little Red Boxes” or “Little Red Lines” (a marker on the right that shows you all the locations in your program with syntax errors) your program has no more syntax errors.
Let’s look at another great feature of the new source editor: “Help”! No, I don’t mean I need help, I mean: “How do we look for help in this new development environment”? The good news is we no longer need to turn pages in those big heavy books (more trees for the world!). All the documentation that you need is automatically loaded when you install NaturalONE on your computer. It’s so easy to use! All you have to do is press “PF1”—I know there is no “PF1” key on your keyboard anymore, today it’s called “F1”, but to me it will always be “PF1”—and the relevant help is automatically opened with the answer to your question just a few clicks away.
There are many, many additional interesting and time-saving features that can’t be covered here, such as:
- Color coding the syntax
- Automatic indentation of the source with CTRL+ALT+S
- Commenting sections of the source code by selecting it with the mouse and pressing CTRL+ALT+C
But let’s talk about one very important feature before we end—“Callnat”. In order to code a “Callnat” to call a subprogram, we first opened up the subprogram somewhere, either performed the “List” command and wrote out the list of the subprograms parameters down on a little piece of paper, or even fancier, used the mouse to copy it and paste it in our “calling program” right after the “Callnat” statement. Guess what? It’s a lot simpler: just locate the place you want to insert the “Callnat” statement and press ALT+SHIFT+C to open a window that displays the available libraries. Choose the desired library, select “Subprogram” from the “Object type” drop-down box (to narrow down the list and display subprograms only), choose the name of the subprogram you wish to call and press “OK”. That’s it—you just got the correct syntax needed to call the subprogram—no syntax errors, no runtime (parameter) errors when you run the program and call the subprogram.
The advantages I described above are just a few of the capabilities of the NaturalONE Source Editor; and only the tip of the iceberg of the vast capabilities of the new Eclipse environment used by NaturalONE. I not only think—I know—that as you start working with NaturalONE (just as I did not long ago), you will see a new world of programming in Natural. A world we previously only dreamed of and were jealous of, assuming it only existed for other programming languages. But NO MORE! Today, we mainframe programmers can now use exciting, new tools and gain admiration from those young programmers who drop by and marvel at the ease and flexibility with which we develop and manage large systems!
NaturalONE will get you excited again when you program with it.Try it, you’ll like it – I tried it and like it very much!
Download your free trial today at www.NaturalONE.com