1. Home
  2. /
  3. Natural-scripting
  4. /
  5. Natural Subroutine Example

Natural Subroutine Example - Natural-scripting Typing CST Test

Loading…

Natural Subroutine Example — Natural-scripting Code

Call a subroutine to greet a user.

DEFINE DATA LOCAL
	1 USERNAME (A20)
END-DEFINE
INPUT 'Enter your name: ' USERNAME
PERFORM GREET(USERNAME)
END
DEFINE SUBROUTINE GREET(NAME)
	WRITE 'Hello, ' NAME
END-SUBROUTINE

Natural-scripting Language Guide

Natural Scripting refers to the use of the Natural programming language (from Software AG) to create applications, automate business logic, and interact with databases, especially within mainframe and enterprise environments.

Primary Use Cases

  • ▸Automating enterprise business processes
  • ▸Building database-centric applications on mainframes
  • ▸Creating batch jobs for reporting and transaction processing
  • ▸Rapid prototyping of business logic applications
  • ▸Integrating with legacy systems and middleware

Notable Features

  • ▸English-like syntax for easier readability
  • ▸Seamless integration with Adabas databases
  • ▸Supports batch, online, and event-driven applications
  • ▸High-level procedural abstractions for rapid development
  • ▸Modularization via subprograms and functions

Origin & Creator

Developed by Software AG in the 1970s as a high-level language to simplify application development on mainframe and later client-server systems.

Industrial Note

Commonly used in banking, insurance, and logistics industries for large-scale transaction processing, often interfacing with Adabas or other enterprise databases.

More Natural-scripting Typing Exercises

Simple Natural ProgramNatural Loop ExampleNatural Database Read ExampleNatural Conditional ExampleNatural Input and Display ExampleNatural Arithmetic ExampleNatural Loop with DatabaseNatural String ManipulationNatural Exit Condition in Loop

Practice Other Languages

CReactPythonC++RustTypeScriptKotlinPHPJavaC#RubyMqlCqlN1qlCypher