You can edit almost every page by Creating an account and confirming your email.

Natural (Programming language)

From EverybodyWiki Bios & Wiki


Natural is a programming language designed to simplify the implementation of business solutions. It takes a very pragmatic and non-theoretical approach to common programming tasks such as database access. Natural, which includes a built-in screen-oriented editor, has two main components: the system and the language. The system is the central vehicle of communication between the user and all other components of the processing environment. The language is structured and less procedural than conventional languages. Natural source programs may be pre-compiled or dynamically "compiled" during execution. A platform independent byte code (object) format is then executed in a platform dependent environment. While originally developed for mainframe computers, Natural has also been available on Windows and Linux/Unix platforms for several years.[1]

History

The first versions of Natural for mainframes were developed from 1975 by Peter Pagé with the assistance of Margit Neumann. From the beginning, Natural enabled an interactive mode of operation on mainframes, which was initially only rarely possible in this environment. Natural was originally developed for MVS, VSE and BS2000 but was later on, it was ported to VMS, OS2, Unix/Linux and Windows. The Natural development environment has also been integrated into Eclipse IDE (NaturalONE).

Programming Modes[2]

Natural offers two ways of programming:

Reporting Mode

Reporting mode may be useful for the creation of adhoc reports and small programs which do not involve complex data and/or programming constructs.

Structured Mode

Structured mode is intended for the implementation of complex applications with a clear and well-defined program structure.

Capabilities

Natural is an application development environment for large-scale, mission-critical solutions. Its aim is to be easy to learn and to reduce development, maintenance time and costs by using a powerful high-level programming language syntax in a highly interactive environment. In its wide spectrum of capabilities, these are a few of the most important ones: • Application Connectivity • Application Operation and Security • DevOps • Database Interface As a variety of database models and technologies exist, an application platform must provide multiple database interfaces and access methods (SQL, native database interface) to manage the business data. • Application zIIP Optimization On IBM z/OS mainframes, Application zIIP Optimization moves application workload from the expensive IBM General Purpose Processor to a less expensive IBM® zIIP™ processor for execution, reducing monthly license charges and costs for new hardware and hardware maintenance.

Database Connection

In Natural, many data storage systems can be accessed either with proprietary access commands, which can be highly efficient, or via standard SQL. Such data storage systems are mostly DataBase Management Systems (DBMS). The most common DBMSs supported by Natural are: - Adabas - VSAM - Db2 - Oracle - Microsoft SQL Server On z/OS Natural is runnable in any TP monitor environment (E.g.: CICS, Com-plete, IMS TM), a distinguishing feature that makes Natural easy to use and offers flexibility to the user; as applications written in Natural can be ported to a wide range of operating platforms without any change being required.

4th Generation Programming Language

Natural is a proprietary fourth-generation programming language (4GL), which means that Natural typically operates with multiple large collections of information and data at once. A 4GL is characterized as a “non-procedural” or “program-generating” language, thereby Natural programs can be "run" in an interpretative manner or "executed" as compiled objects.[2] Compiled programs can more directly use operating system services and run faster. Natural objects (programs, maps, data areas, etc.) are stored in libraries, similar in structure to a Windows directory, and can be named with identifiers up to 8 characters long. Natural provides both online and batch execution. Batch programs can read/write up to 32 work files and print up to 32 reports. Natural also supports an interactive debugger that allows developers to step through the code and display the contents of variables.

'Hello World!' with Natural

1. Create a user library

• In the command line (indicated by Command ===> in the Natural main menu), enter the following: LOGON TUTORIAL where "TUTORIAL" is the name of the library that you create.

2. To create a new program

• Make sure that you have logged on to the library named TUTORIAL. • At the bottom of the Development Functions menu, enter the following information and press ENTER:

Code .. C    Type .. P   Name .. HELLO_______________                                                                                                           
                                                                              

Command ===> Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF12---

     Help Menu  Exit                                               Canc

"C" stands for the function Create Object, "P" stands for the object type program, and "HELLO" is the name of the program to be created.

• Enter the following code in the program editor:

  • The "Hello world!" example in Natural.

DISPLAY "Hello world!" END /* End of program

3. To run a program

• In the program editor's command line, enter one of the following: RUN or R [3]

Example – Adabas

Natural applications, especially in conjunction with Adabas, are known to be extremely performant. FIND EMPLOYEES WITH NAME = 'FLETCHER' DISPLAY NAME FIRST-NAME CITY END-FIND

Result: 
       Name               First-Name              City        

________________________________________

      Fletcher             Timothy              Detroit             
      Fletcher             Lilly                Pittsburgh
      Fletcher             Gilbert              Tampa     

In order to simplify the process for the users, Natural generates the corresponding Adabas Direct Commands in the background. These are S1, L1 and RC for this example. The buffers in the background are: Record Buffer (RB): Fletcher Timothy Detroit Search Buffer (SB): AE,20,A. Value Buffer (VB): Fletcher Formal Buffer (FB): AE,20,A,AC,20,A,AJ,20,A.

Translation and runtime

Natural source code is traditionally compiled into Natural intermediate code, which is then interpreted by the Natural runtime environment. This approach is similar to that of the Java Virtual Machine. However, many installations use the Natural Optimizer Compiler, which for the most part generates machine instructions directly instead of intermediate code. This can significantly increase the efficiency of Natural programs.

References


This article "Natural (Programming language)" is from Wikipedia. The list of its authors can be seen in its historical and/or the page Edithistory:Natural (Programming language). Articles copied from Draft Namespace on Wikipedia could be seen on the Draft Namespace of Wikipedia and not main one.

  1. Stein, Jochen (2009). A Natural Tutorial. Search this book on
  2. Stein, Jochen (2009). A Natural Tutorial. Search this book on
  3. "Natural First Steps".