Version 6.3.13 for UNIX

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.
User-Defined Functions Explains the benefits of using the Natural programming object "function", shows the difference between using function calls and subprogram calls and describes the methods available for defining and calling a function.
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.
Portable Natural Generated Programs As of Natural 5, generated programs are portable across the platforms UNIX, OpenVMS and Windows.
Designing Application User Interfaces Provides information on components of Natural which you can use to design character-based user interfaces for your applications.
Natural Native Interface Describes the Natural Native Interface which enables a non-Natural application to execute Natural code using C function calls.
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 preceding 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. The Natural library SYSEXPG also includes example programs for Natural Functions.
  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.

Notation vrs or vr

When used in this documentation, the notation vrs or vr represents the relevant product version (see also Version in the Glossary).

Note:
For information on Natural Application Programming Interfaces (APIs), see: SYSEXT - Natural Application Programming Interfaces in the Utilities documentation.

Top of page