In our series of articles, we mentioned that we would be writing about programming tips and techniques to support cross-platform program development without causing your Easytrieve programs to change. Although still important as a topic, it occurred to us that most of you have not seen the new Windows product and therefore may not appreciate why that topic may be important to you. So, we switched gears, took our development hats off and put on an old marketing one. However, we promise this article will be technical in nature so don't stop reading now.
Easytrieve Report Generator, release 11.x
We write a lot of Easytrieve programs. Although we are fluent in a number of programming languages, we seem to fall back to Easytrieve as our first choice for developing an application. There are two features that we appreciate in release 11.x that have little to do with the technology. The first is the unification of the documentation under a single "bookshelf". We can now search for a topic and get a list of every document where it is addressed whether it is the command syntax in the Reference Guide or usage examples in the User Guide. This dramatically reduces the time it takes to find what you are looking for. The second feature is the ability to type a keyword into the GUI, double-click that keyword and press CTRL+F1. This brings up a pop-up window with the syntax of the statement. Often, a person can't remember the parameters to use or confuse the syntax with another language. Our documentation group has done a great job to improve your productivity by supplying these two features.
With this release, the Easytrieve compiler is a common code-base for all platforms that are supported. This positions us to enhance the Easytrieve language with new features and functionality and to make those features available everywhere. It also ensures that a program written on one platform will migrate to another without changing logic. This is a focus for the Windows product... it is not only a stand-alone platform for running Easytrieve programs against local data but a Programmer workbench when other platforms are the execution target.
Within this release, one of the new language features that we find appealing is the PROGRAM super-activity. This has been available within Easytrieve Online as well as the UNIX platforms but for those batch users, perhaps a brief example will provide you with in-sight as to how it can be used to streamline your applications. Given the following code snippet...
PROGRAM NAME SELECT-RPT DEFINE Which-Job S 1 N EXECUTE FIRST-JOB CASE Which-Job WHEN 1 THRU 2 EXECUTE JOB1 WHEN 3 THRU 4 EXECUTE JOB2 END-CASE JOB INPUT PERSNL NAME FIRST-JOB START(START-RPT) FINISH(END-RPT) * In here the value for Which-Job is set * based upon some criteria within the records processed * or based on some accumulated total. JOB INPUT EMPLOYEE NAME JOB1 JOB INPUT DEPARTMENT NAME JOB2
As you are aware, Easytrieve, in the past, has sequentially executed your code. Going from one JOB activity to the next until it reaches the end of the Easytrieve code. Now, using a PROGRAM activity, you can direct which JOB activities get executed based upon logic. In this case, we use something in the first JOB activity to dictate what additional report is needed.
We could, at this point, go into a long discussion about using the visual debugging capability on Windows but describing it in words just doesn't seem to work. Functionality like setting a "watch" on a field and auto-stepping through a program to view the value change for that field is probably better seen than written. We will say that, when working with client issues, the first step we take is to bring their source into Windows. Once we compile the program, we view it in "analyze" mode to get a simple picture of how it works. This looks something like this:
At this point, we can start to examine the program flow and look for the point of failure. In some cases, we have to mock-up a row of input data which, for testing purposes, is pretty easy to do as long as we have the file definitions. Now, we can debug and step through the program. If we want to follow a certain flow within the program, we simply change the appropriate value within the Data Director to ensure an IF or CASE path is taken. This allows us to quickly find what is causing the issue. Used internally within our Support groups, the Windows version allows us to quickly narrow down whether an issue is a programming problem or a product problem.
The last feature that we want to expose in this article (and once again, its functionality could be a whole topic by itself), is the Configuration Manager. In simple terms, this allows you to visually explore and change the Easytrieve Options Table that controls the product functionality. A snapshot looks like this:
Worth mentioning is that the Configuration Manager allows you to generate an Options Table that can be targeted for any platform that Easytrieve supports. So, we can make changes and then select the "Build" menu and generate a file for z/OS (or UNIX). Once generated, we simply FTP that file to a dataset on z/OS and point our JCL to use it. This same GUI also manages Printer Set Definitions (PSD files) which can be used to control output generation through the extended printer support that is built into Easytrieve. PSD files can be used to generate HTML output or to control the fonts and layout used within reports that get sent directly to printers... but that is a topic for a different time.
We've highlighted just a few of the features within the new Windows version of Easytrieve. Our hope is that we have exposed enough of the product to generate even a fraction of the excitement that we, in Development, have regarding this product.