Version 4.2.6 for Mainframes (Update)

Programming Guide

This guide is complemental to the Natural reference documentation in that it provides basic information and some longer, in-depth articles on various aspects of programming with Natural. You should be familiar with this information before you start to write Natural applications. See also First Steps. This tutorial contains a series of sessions which introduce you to some of the basics of Natural programming.

Natural Programming Modes Describes the differences between the two Natural programming modes: Reporting Mode and Structured Mode.

Generally, it is recommended to use structured mode exclusively, because it provides for more clearly structured applications. Therefore all explanations and examples in this documentation refer to structured mode. Any peculiarities of reporting mode will not be taken into consideration.

Object Types Within an application, you can use several types of programming objects to achieve an efficient application structure. This document discusses the various types of Natural programming objects, such as data areas, programs, subprograms, subroutines, helproutines, maps.

Defining Fields Describes how you define the fields you wish to use in a program.

Accessing Data in a Database Describes various aspects of using Natural to access data in an Adabas database and in various non-Adabas databases supported by Natural.

On principle, the features and examples described for Adabas also apply to other database management systems. Differences, if any, are described in the relevant interface documentation and in the Statements documentation or Parameter Reference.

Controlling Data Output Discusses various aspects of how you can control the format of an output report created with Natural, that is, the way in which the data are displayed.

Further Programming Aspects Discusses various other aspects of programming with Natural.

Statements for Internet and XML Access Gives an overview of the Natural statements for internet and XML access, specifies the general prerequisites for using these statements in a mainframe environment and informs about the general restrictions that apply.

Designing Application User Interfaces Provides information on components of Natural which you can use to design user interfaces for your applications.

NaturalX Describes how to develop object-based applications.

Natural Reserved Keywords Contains a list of all keywords and words that are reserved in the Natural programming language.

Referenced Example Programs

The previous sections of the Programming Guide contain several examples of Natural programs. In addition, links are provided there to further example programs (mainly for reporting mode) which are contained in this separate section.

Notes:

  1. All example programs shown in the Programming Guide are also provided in source-code form in the Natural library SYSEXPG. The example programs use data from the files EMPLOYEES and VEHICLES, which are supplied by Software AG for demonstration purposes.
  2. Further example programs of using Natural statements are provided in the Natural library SYSEXSYN and are documented in the section Referenced Example Programs in the Statements documentation.
  3. Please ask your Natural administrator about the availability of the libraries SYSEXPG and SYSEXSYN at your site.
  4. To use any Natural example program to access an Adabas database, the Adabas nucleus parameter OPTIONS must be set to TRUNCATION.

Note:
For information on Natural Application Programming Interfaces (APIs), see: SYSEXT - Natural Application Programming Interfaces and SYSAPI - APIs of Natural Add-On Products in the Utilities documentation.

Top of page