1. Home
  2. /
  3. Natural-scripting Typing Test
  4. /
  5. Simple Natural Program

Simple Natural Program - Natural-scripting Typing CST Test

Skip to main content
CodeSpeedTest
Languages
Start TypingJump into a test — pick any languageAdaptive TrainingUnlock chars as you master themPractice DrillsFocused sessions targeting weak spotsDaily ChallengesNew coding challenges every dayRace ModeCompete against others in real timeAI OpponentRace against an AI at your WPM levelTournamentsLive coding speed tournamentsArcade GamesZType, Overkill Survival, Glyphica & moreGamificationXP, coins, badges & quests
LeaderboardGlobal rankings for every languageCertificatesEarn verifiable Bronze / Silver / Gold certsActivityDaily streaks & historical analyticsProfileYour stats, badges & achievements
Browse Languages500+ languages with real code examplesBlogTips, guides & deep divesFree ToolsWPM calculator, typing speed report & moreFAQCommon questions answeredGetting StartedNew to CodeSpeedTest?AboutOur story & missionSupportGet help — Pro users get priorityContactGet in touch with the team
Pricing
Mode:
Duration:
1
Coding works best on desktop or with an external keyboard.
CodeSpeedTest

Improve your coding speed, code accuracy, and programming syntax WPM with practice sessions across 500+ programming languages.

Quick Links

HomeAboutFeaturesGetting StartedLanguages

Legal & Support

Pro ⚡ PricingContactPrivacy PolicyTerms of Service

Connect

CodeSpeedTest on GitHubCodeSpeedTest on TwitterEmail CodeSpeedTest

© 2026 CodeSpeedTest. All rights reserved.

Simple Natural Program — Natural-scripting Code

Print a greeting message.

DEFINE DATA LOCAL
	END-DEFINE
WRITE 'Hello, Natural World!'
END

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.

Quick Explain

  • ▸Natural is a 4GL (Fourth Generation Language) designed for rapid application development.
  • ▸It provides procedural constructs and some modularization capabilities.
  • ▸Widely used for database-driven business applications on mainframes and server environments.
  • ▸Supports event-driven and batch processing tasks.
  • ▸Ideal for enterprises needing maintainable, database-integrated solutions.

Core Features

  • ▸Strong support for database access and record handling
  • ▸Procedural programming constructs (IF, PERFORM, LOOP)
  • ▸Error handling and transaction management
  • ▸Callable subprograms for reusable logic
  • ▸Integration with batch and online environments

Learning Path

  • ▸Learn Natural syntax and program structure
  • ▸Understand database integration with Adabas
  • ▸Practice writing modular subprograms
  • ▸Explore batch and online processing
  • ▸Master enterprise integration patterns and workflow automation

Practical Examples

  • ▸Generating daily banking transaction reports
  • ▸Validating insurance claims in batch
  • ▸Updating master customer records in Adabas
  • ▸Automating payroll calculations and data transfers
  • ▸Integrating with legacy ERP systems for inventory updates

Comparisons

  • ▸Natural vs COBOL: Natural is higher-level and faster to develop
  • ▸Natural vs Java: Natural is database-centric, Java is general-purpose
  • ▸Natural vs RPG: Natural is procedural 4GL, RPG often tied to IBM i systems
  • ▸Batch vs Online Natural programs: batch for reports, online for real-time interaction
  • ▸Natural vs modern scripting: Natural excels in legacy enterprise environments

Strengths

  • ▸Rapid development for business applications
  • ▸Readable and maintainable syntax
  • ▸Efficient database operations for large datasets
  • ▸Mature, stable language with decades of use
  • ▸Compatible with legacy mainframe and server systems

Limitations

  • ▸Proprietary, mainly tied to Software AG ecosystem
  • ▸Limited modern IDE and tooling support compared to contemporary languages
  • ▸Steep learning curve for newcomers unfamiliar with 4GLs
  • ▸Less community support than mainstream languages
  • ▸Primarily suited for database-centric applications, not general-purpose programming

When NOT to Use

  • ▸New web applications or microservices
  • ▸High-performance computing tasks
  • ▸Non-database-centric scripting
  • ▸Applications requiring modern GUI frameworks
  • ▸Rapid prototyping outside mainframe or Natural ecosystem

Cheat Sheet

  • ▸READ/WRITE -> database operations
  • ▸IF/ELSE -> conditional logic
  • ▸PERFORM -> call subprogram
  • ▸DEFINE DATA -> declare variables
  • ▸ON ERROR -> error handling

FAQ

  • ▸Is Natural still used today? -> Yes, in enterprise and mainframe environments.
  • ▸Can Natural integrate with modern systems? -> Yes, via EntireX or APIs.
  • ▸Is Natural object-oriented? -> Mostly procedural, some modularization.
  • ▸Can I run Natural outside mainframes? -> Yes, server-based environments supported.
  • ▸Is learning Natural useful today? -> Valuable for maintaining legacy enterprise applications.

30-Day Skill Plan

  • ▸Week 1: Basic syntax, variables, and control flow
  • ▸Week 2: Database reads, writes, and simple reports
  • ▸Week 3: Subprograms and modular coding
  • ▸Week 4: Batch processing and transaction management
  • ▸Week 5: Integration, optimization, and best practices

Final Summary

  • ▸Natural Scripting is a 4GL language for database-driven enterprise applications.
  • ▸Supports batch, online, and event-driven processing.
  • ▸Highly readable and modular for rapid business logic development.
  • ▸Integrated with Adabas and other enterprise databases.
  • ▸Still relevant for legacy system maintenance and enterprise automation.

Project Structure

  • ▸Source Natural programs (.NAT or .PRG files)
  • ▸Subprograms and modules for reusable logic
  • ▸Database definitions and views
  • ▸Job control or scheduling scripts for batch processing
  • ▸Documentation of logic and data flow

Monetization

  • ▸Legacy Natural application support
  • ▸Enterprise system integration consulting
  • ▸Workflow automation for mainframe systems
  • ▸Reporting and analytics development
  • ▸Modernization and migration services

Productivity Tips

  • ▸Use subprograms for reusable logic
  • ▸Keep database operations efficient
  • ▸Document business rules clearly
  • ▸Test incrementally in batch or online environment
  • ▸Optimize loops and conditional processing

Basic Concepts

  • ▸Natural Objects: variables, arrays, and structures
  • ▸Subprograms and functions for modularity
  • ▸Database access via direct read/write or view definitions
  • ▸Control flow: IF, PERFORM, LOOP, GOTO
  • ▸Error handling via ON ERROR or transaction rollback

Official Docs

  • ▸https://documentation.softwareag.com/natural
  • ▸https://www.softwareag.com/en_corporate/products/natural.html
  • ▸https://techcommunity.softwareag.com

More Natural-scripting Typing Exercises

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

Practice Other Languages

CReactPythonC++RustTypeScriptKotlinPHPJavaC#RubyMqlCqlN1qlCypher