Natural
Vorlesung Jena April 2011
Karlheinz Kronauer
Enterprise Transaction Systems
Agenda - Software Development with Natural
Overview
Natural in the history of Programming Language
Some Natural programming examples
Customer business processes supported with Adabas and Natural
Natural - Integrated Development Environment (IDE)
Architecture
Natural on Mainframes
Natural for Windows and the SPoD concept
Natural Concepts
Language concepts
Working modes with Natural (Mainframe, Open Systems)
The Natural Program - Structure, Data and Object Types
Database Access in Natural
NaturalONE
Programming languages extract
http://people.mandriva.com/~prigaux/language-study/diagram.png
2 May 2011 | Software AG - Get There Faster | 3
30 Years Heritage of Technology Leadership Natural
1979 1994 2001 2006
First Mainframe 4GL Natural on Natural Development Natural for Eclipse
Natural Open Systems Server Mainframe Natural Business Services
1985
Established First Platform
Independent Language 2002
1969 Natural, 2000 Natural Development 2010
Software AG founded Predict Natural Engineer Server Unix and Linux Natural ONE
1971 1990 2000 2002/2003
First Mainframe Natural for DB2 First Mobile Fleet Company to Watch
Database developed by Management System Intelligent Enterprise Magazine
Peter Schnell
1983 1999 2002 2007
TAPS (Trade Analysis and Process System) IPO Frankfurt Stock SCP Award Natural for AJAX
Worlds Largest Clearing House System Exchange MDAX Outstanding service award
Germanys Top 50 Stock received 6 years in a row
2 May 2011 | Software AG - Get There Faster | 4
The History
First major Natural release in 1979
Version V1.2 , Batch, IBM
3 years later - 1982
Already 500 customer installations
Second major release in 1987
Natural Version 2 with interactive programming
Data and Map editors
CICS support
Third major step in 1994
GUI development environment on Windows
Integrated tools
Object oriented approach
Today
Single point of development concept
All major platforms supported
Natural 2006 - New technologies support, XML, Web Services, Unicode
Eclipse development platform, NaturalONE, Rich Web-UI (AJAX)
Business process extraction
2 May 2011 | Software AG - Get There Faster | 5
Programming Languages - Characteristics
3GL 4GL
COBOL Natural
PL/1, REXX Focus, CA IDEAL, Progress 4GL
Style Procedural, OO Non-procedural, OO
Runtime Compiler & Linker Interpreter (& Compiler)
Platforms Mainframe, Mainframe, UNIX, Linux,
(UNIX, Linux, Windows) Windows
TP-Monitor Explicit Implicit (driver)
programming
Native user interface Terminal Terminal, Web/AJAX
2 May 2011 | Software AG - Get There Faster | 6
Hello world - Examples
Description Description
This program demonstrates the text output This program demonstrates the text output
function of the ALGOL programming function of the NATURAL programming
language language
This code runs on a Unisys (Burroughs) A- This code runs on Mainframe, Unix and
series mainframe. Windows machines
----------------------------------------------------------- -----------------------------------------------------------
Source Code Source Code
// this is a comment /* this is a comment
BEGIN WRITE "HELLO WORLD!"
FILE F (KIND=REMOTE); END
EBCDIC ARRAY E [0:11];
REPLACE E BY "HELLO WORLD!";
WHILE TRUE DO
BEGIN
WRITE (F, *, E);
END;
END.
-----------------------------------------------------------
Notes: This program has NOT been tested due to the
inability to locate the necessary compiler. ----------------------------------------------------
2 May 2011 | Software AG - Get There Faster | 7
Cobol vs.Natural ( Example with DB2 access)
PROCEDURE DIVISION.
Coding SQL Syntax
EXEC SQL.
.
complex
DECLARE procedural
CURSOR ABC WHERE
SELECT ENAME; ENO SAL
SQL coding
FROM declare cursor / open / fetch
EMP *
WHERE SAL > ZSAL FIND XYZ WITH SAL > ZSAL
simple NATURAL command
AND ENAME = SMITH AND ENAME = SMITH
WITH HOLD.
FIND
END EXEC .
/* . . . normal processing
A Cobol program is . 20 timesEND-FIND
longer than a Natural program
EXEC SQL. (NATURAL)
Natural
OPEN ABC. programs are easy to use and to maintain
END EXEC.
LOOP. No command-level CICS programming skill required
EXEC SQL.
FETCH ABC INTO :XEN, :XEM :XSAL.
END SQL.
IF SQLCODE NOT = ZERO
GO TO END_LOOP.
.
normal processing
.
GO TO LOOP.
END-LOOP. (COBOL)
2 May 2011 | Software AG - Get There Faster | 8
COBOL vs. NATURAL ( VSAM Example )
PROCEDURE DIVISION.
*
Coding CICS/VSAM Syntax
SRCH-INIT.
MOVE SNAMEC TO BRKEY-SNAME, MAX-SNAME.
complex
MOVE procedural
LOW-VALUES EXEC CICS coding
TO BRKEY-ACCT.
SRCH-RESUME.
start browse / read next / end browse
EXEC CICS STARTBR FILE('ACCTIX') RIDFLD(BRKEY) GTEQ
simple NATURAL command
RESP(RESPONSE) END-EXEC.
IF RESPONSE = DFHRESP(NOTFND) GO TO SRCH-ANY.
FIND
IF RESPONSE NOT = DFHRESP(NORMAL) GO TO Find ACCTIX with BRKEY =
OTHER-ERRORS. aaaaaa
ASRCH-LOOP.
Cobol program is 20 times longer than a*** Natural
normalprogram
processing ***
EXEC CICS READNEXT FILE('ACCTIX') INTO(ACIXREC)
Natural programs areRIDFLD(BRKEY)
LENGTH(ACIX-LNG) easy to use and END-FIND
to maintain END-EXEC.
RESP(RESPONSE)
IF RESPONSE = DFHRESP(ENDFILE) GO TO SRCH-DONE.
No command-level CICS programming skill required
IF RESPONSE NOT = DFHRESP(NORMAL) GO TO OTHER-ERRORS.
**** normal processing ***
GO TO SRCH-LOOP.
SRCH-DONE.
EXEC CICS ENDBR FILE('ACCTIX') END-EXEC.
*
2 May 2011 | Software AG - Get There Faster | 9
Success Driven by Customer Confidence
Mark Sinnott The ease-of-use of Natural for a single
Hibernian point of development has increased the
Ireland productivity of our developers...
Thomas Reiman With Natural we can work towards the
Universa
Universa insurance implementation of a Service-Oriented
Versicherung Germany Architecture
Steve Hogan With Adabas and Natural, Software
Nissan AG is future proofing [our] systems with
Australia the ability to extend them to SOA.
2 May 2011 | Software AG - Get There Faster | 10
Customer examples
Police Bavaria
Pharma Gehis(Celesio, Sanacorp, Anzag)
Apollo Optik
Peek und Cloppenburg
London Police
Banking Morgan Stanley, JPMorgan, Banco do Brasil
Social insurances: US, Spain
Travelba, Lexcom
2 May 2011 | Software AG - Get There Faster | 11
Application Systems Requirements
Multiple-Layer Architecture - distributable
Portable to diverse platforms
Interoperable with existing applications
Extensible and scalable
CUI, GUI, Rich Web-UI
Access to different databases
Online and batch operation
2 May 2011 | Software AG - Get There Faster | 12
Natural Principles
Easy Language: Vocabulary and grammar
One Statement - many functions
Simple Database access
Easy to learn, easy to use
Fast (interpreter concept); immediate execution
Integrated development environment; comprehensive tool set
Performance to support mission critical applications
Ease of maintenance
2 May 2011 | Software AG - Get There Faster | 13
Mainframe Application Architectures
Frontend Integration Programs Databases & Files
Terminal
Online/OLTP
Web
Applications
Browser
DB
Web Web/Application
Server
Online/OLTP
Applications
Windows Windows
(Fat-Client) Applications
DB
Batch
Applications
UNIX, Linux, Windows Mainframe
2 May 2011 | Software AG - Get There Faster | 14
Natural Architecture - Overview
2 May 2011 | Software AG - Get There Faster | 15
Natural Development Environments
Natural ONE
Natural IDE, Natural ISPF
Character-based Natural for Windows Natural for Eclipse
Natural Runtime
Natural Development Server
Natural
2 May 2011 | Software AG - Get There Faster | 16
The Natural Language concepts
Natural Syntax is 4 GL
High level syntax elements
Hiding Complexity
Language enhancements for all platforms
Natural source code compiles to objectcode/GP (Generated Program)
Object code will be interpreted
Similar to Java VM concept
Natural Runtime required
Natural on Mainframe Optimizer produces machine code
2 May 2011 | Software AG - Get There Faster | 17
Natural at runtime
A Natural program can be executed
both online and batch without changing the code.
platform independent on Mainframe, Unix/Linux, Windows
A Natural program can be immediately executed (run)
Implicit compile
Adhoc mode
A Natural program can
call any other 3 GL program with call interface.
be invoked from a 3 GL program.
A Natural online program can
start a Batch job
2 May 2011 | Software AG - Get There Faster | 18
More Natural Characteristics
Platform independent (Mainframe, Unix/Linux, Windows)
Implementation Language
Assembler + Natural + C > Mainframe
C/C++ + Natural -> Unix/Linux
Java, C/C++ (Runtime) -> Eclipse
Single Point of Development (SPoD)
Remote Development of Mainframe / Unix / Linux applications from Natural
for Windows and NaturalONE (Eclipse)
Extended XML-Handling integrated in Language (Parse/Serialize)
Unicode Support
Various user I/O options: maps, Rich Web (AJAX)
2 May 2011 | Software AG - Get There Faster | 19
All Database Systems One Language
Natural SQL
DML
Database
Interface
Adabas RDBMS Tamino
DB2, VSAM, Oracle, XML
2 May 2011 | Software AG - Get There Faster | 20
Natural DML Statements - Natural SQL Statements
READ PHYSICAL SELECT
READ BY ISN
READ LOGICAL
HISTOGRAM
FIND PROCESS
GET SQL
STORE
UPDATE INSERT
DELETE UPDATE
DELETE
END OF TRANSACTION
BACKOUT TRANSACTION COMMIT
ROLLBACK
2 May 2011 | Software AG - Get There Faster | 21
Example A Natural program displaying database records
DEFINE DATA LOCAL
1 CRUISE VIEW OF SAG-TOURS-E-CRUISE
2 CRUISE-ID
2 START-DATE
2 END-DATE
2 START-HARBOR
2 DESTINATION-HARBOR
END-DEFINE
FIND CRUISE WITH START-HARBOR = 'BAHAMAS'
DISPLAY CRUISE
END-FIND
END
Page 1 2010-12-31 12:00:00
CRUISE
CRUISE-ID START-DATE END-DATE START-HARBOR DESTINATION-HARBOR
5085 20120424 20120508 BAHAMAS BAHAMAS
5086 20120426 20120324 BAHAMAS VIRGIN ISLANDS
5068 20111016 20111029 BAHAMAS BAHAMAS
5069 20111023 20111105 BAHAMAS BAHAMAS
5044 20120611 20120624 BAHAMAS ST. CROIX
5070 20120430 20120513 BAHAMAS MIAMI
2 May 2011 | Software AG - Get There Faster | 22
How to develop Natural applications ?
Natural ISPF NaturalONE in Eclipse
Charater-based terminal emulation Eclipse-based development tools
Tightly linked in other mainframe Local and remote development
utilities and custom-developed tools Integrated terminal emulation
Source-code management mostly in Source-code versioning
mainframe-based systems (e.g. CVS or Subversion)
2 May 2011 | Software AG - Get There Faster | 23
Natural Development Tools Editors
Map
Editor
Program Data
Editor Editor
DDM
Editor
Dialog Layout
Editor/Wizard painter/AJAX
2 May 2011 | Software AG - Get There Faster | 24
LIST Objects in a Library
***** NATURAL LIST COMMAND *****
User SAG - LIST Objects in a Library - Library SAG
Cmd Name Type S/C SM Version User ID Date Time
--- *________ *__________ *__ * *______ *________ *__________ *________
__ KFZ-1 Program S/C S 4.1.03 SAG 2005-07-08 17:16:32
__ KFZAEN Subroutine S/C S 4.1.03 SAG 2005-07-08 17:16:22
__ KFZAEN-M Map S/C S 4.1.03 SAG 2005-07-08 17:16:24
__ KFZLOE Subroutine S/C S 4.1.03 SAG 2005-07-08 17:16:22
__ KFZLOE-M Map S/C S 4.1.03 SAG 2005-07-08 17:16:24
__ KFZNEU Subroutine S/C S 4.1.03 SAG 2005-07-08 17:16:22
__ KFZNEU-M Map S/C S 4.1.03 SAG 2005-07-08 17:16:24
__ KFZNEU-T Map S/C S 4.1.03 SAG 2005-07-08 17:16:25
__ LAYOUT-M Map S/C S 4.1.03 SAG 2005-07-08 17:16:25
__ LDA1 Local S/C 4.1.03 SAG 2005-07-08 17:16:21
__ LIANP0 Program S S 2.2.07 SAG 1995-03-17 21:38:24
ed MENU Program S/C S 4.1.03 SAG 2005-07-08 17:16:32
__ MENU---M Map S/C S 4.1.03 SAG 2005-07-08 17:16:25
__ MENU---P Program S/C S 4.1.03 SAG 2005-07-08 17:16:32
70 Objects found
Command ===>
Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF12---
Help Print Exit Sort -- - + ++ > Canc
2 May 2011 | Software AG - Get There Faster | 25
Natural Library Concept - Storing Natural Objects (FUSER)
Libr.: SAGTOURS MENU (OBJ)
MENU (SRC)
0010 Error in ...
FUSER in Adabas file (Mainframe) FUSER in file system (Open Systems)
FUSER
SAGTOURS
SAGTOURS
MENU (OBJ)
MENU (SRC) ERR 0010 Error in ...
0010 Error in ...
GP MENU (OBJ)
SRC MENU (SRC)
In Natural Linux/Unix/Windows : File system
In NaturalONE : Eclipse Workspace 2 May 2011 | Software AG - Get There Faster | 26
NaturalONE
Key Features and Benefits
2 May 2011 | Software AG - Get There Faster | 27
Strategy: Application Development with Natural
Tools Applications Skills
Application
Editor
Maintenance
Debugger Existing Natural
Documentation Application Developer
DB Schema
Data Browser Application
Natural
Young IT Professionals
Modernization and Students
EntireX
Adabas
DB2 End-Users
New
Applications
Goal Goal Goal
Decrease Complexity & Deliver Business Manage Alternations
Increase Productivity Requirements Faster of Generations
2 May 2011 | Software AG - Get There Faster | 28
NaturalONE - all in ONE
Data Natural
Edit
Browsing
Utilities
Debug Help Predict
Schema
Test Generation
Document Map Editor
DDM Web/AJAX Page
Versioning
Map to AJAX converter
Construct Java, .NET
Web Services Integration
Code Generation EntireX
XML SOA Governance
2 May 2011 | Software AG - Get There Faster | 29
Cross-Platform Application Development and Runtime
Mainframe, OpenVMS
Remote
Development Natural Development Server & Runtime
NaturalONE
Local Development and Runtime
UNIX, Linux, Windows
2 May 2011 | Software AG - Get There Faster | 30
NaturalONE Resources
NaturalONE Download Site
Community Edition
Travel Support Demo
Application & Tutorials
www.NaturalONE.com
Support through NaturalONE
Forums
Developer Community
New NaturalONE Forums
New Community Sites
Launched on March 2nd
Press Release
New Site (video, fact sheet)
GSC Enablement Program
Customer training
2 May 2011 | Software AG - Get There Faster | 31
Natural Development Environments
Natural ONE
Natural IDE, Natural ISPF
Character-based Natural for Windows Natural for Eclipse
Natural Runtime
Natural Development Server
Natural
2 May 2011 | Software AG - Get There Faster | 32
All-in-ONE Development Environment
NaturalONE delivers a powerful and easy-to-use set of application lifecycle capabilities
to current users of Natural, as well as Java, or COBOL developers
2 May 2011 | Software AG - Get There Faster | 33
All-in-ONE Development Environment
NaturalONE provides all features
required for development of web
applications and services
NaturalONE IDE can be extended by
leveraging Eclipse Open source
plug-ins and co-exist with other
Software AG Eclipse Plug-Ins
Meet business users needs more IT organization has more agility to
quickly make platform choices
2 May 2011 | Software AG - Get There Faster | 34
Create code locally that runs natively on major
production platforms
Developers need not change the NaturalONE
library and the application structure
Runtime Platforms
Organisations can keep their
established life cycle management
Companies can continue to use
existing production environment Mainframe Linux UNIX Windows
while developing using Eclipse
Higher development productivity Fast transition to Eclipse based IDEs
2 May 2011 | Software AG - Get There Faster | 35
SOA, service oriented development and generation of
web services
Includes all development tools to
create new or enhance existing
services
Easy generation of web services ,
Java proxies ,
Definition and documentation of
Natural Business Services
Enterprise business functions quickly Saves development time, everything
exposed as web services is generated
2 May 2011 | Software AG - Get There Faster | 36
Development/Generation of Web applications
All development tools included to
create Rich web interfaces
Conversion tools for modernizing
existing applications included
Web Applications can be instantly
tested through a built-in in browser
Screen wizards helps developers Modern application UIs helps to
to see results very quickly satisfy end-users
2 May 2011 | Software AG - Get There Faster | 37
Code Snippets from Developer Community
Developer Community
Share Natural source
code between developers
Enter source code
snippets in the Developer
Community
2 May 2011 | Software AG - Get There Faster | 38
Code Snippets from Developer Community
Source Code snippet
shown in search view
Can be pasted to source
editor
2 May 2011 | Software AG - Get There Faster | 39
Other Key Features of NaturalONE
Natural Documentation Tool
Data browser
Predict and NEE plug-ins
Integration with Subversion
Ant Deployment Tools
Generation of CRUD Services
Debugging, testing tools and
unit test for Natural NaturalONE with Natural Engineer plug-in
2 May 2011 | Software AG - Get There Faster | 40
Thank you
NaturalONE v8.2
Major Enhancements
Eclipse Version support
Build on Eclipse v3.6.1
AJAX enhancements
New Design features for web pages
Local and server side scrolling
BLOB support for AJAX Applications
Edit mask support
Natural Construct support
Frame and model editor
Protect generated lines in editor
Construct objects referenced in dependency view
2 May 2011 | Software AG - Get There Faster | 42
NaturalONE v8.2
Major Enhancements
Major enhancements for the developer
Mark all occurrence of a field
Debugger enhancements
Edit dialogs
List command on server view (objects locked)
Resolve Time stamp conflicts
Check, if source on server is younger the source uploaded
Ensures consistency in shops, where developers are still working both on
mainframe and with NaturalONE
Code snippets from Natural Community
Retrieve Natural Code from Community
Copy and re-use code in NaturalONE editor
2 May 2011 | Software AG - Get There Faster | 43
NaturalONE v8.2
Major Enhancements
Predict support
Consider Predict information redefines and array boundaries while
including data fields from a DDM
Edit/Display Predict documentation NaturalONE navigator view/editor
Natural Documentation Natdoc
New Natdoc view
Show and change documentation simultaneously with the source code
Command view for mainframes
View representing a remote server perspective
Command and program execution
2 May 2011 | Software AG - Get There Faster | 44
NaturalONE v8.2
Major Enhancements
Enhanced Parser Checks
Semantics Check
Content assist shows only variables with correct data types
Editing Shows parser error immediately if data type does not fit
Check for correct workfile number
Check for correct array boundaries
Natural Security private Mode support
Special profile in Natural Security for private mode with default settings
Mainframe only for v8.2.2
Customer tested and proofed
2 May 2011 | Software AG - Get There Faster | 45
NaturalONE 8.2
Enhanced design features
for AJAX Applications
Switch automatically
visibility on user Input
Enter data (here First
Name) and Save
button becomes
visible
2 May 2011 | Software AG - Get There Faster | 46
NaturalONE 8.2
Enhanced design features
for AJAX Applications
Switch between local
and server side
scrolling
automatically
2 May 2011 | Software AG - Get There Faster | 47
NaturalONE 8.2
BLOB Support
At Design Time
And at Runtime
2 May 2011 | Software AG - Get There Faster | 48
NaturalONE 8.2
Edit masks for AJAX Applications
Check Edit mask on client
All major Natural edit
masks supported
2 May 2011 | Software AG - Get There Faster | 49
NaturalONE 8.2
Natural Construct for NaturalONE
Provide major Natural
Construct functionality in
NaturalONE
Re-use existing Construct
assets (models, cust. Dev.
Models)
Outline view and protected
lines in editor
2 May 2011 | Software AG - Get There Faster | 50
NaturalONE 8.2
Easy invoke Construct
models
Familiar Wizard
interface with all
the options of
Construct
Uses Eclipse
standards
2 May 2011 | Software AG - Get There Faster | 51
NaturalONE Editor Support
Protected Editor
Lines for
Generated Objects
(read-only)
Can only add/edit
code in User Exits
Outline View
supports
navigating and
generating Exits
2 May 2011 | Software AG - Get There Faster | 52
NaturalONE Dependencies and NATdoc
Dependency view
shows related Dependency
objects including View shows
Construct runtime
related objects
including
Generates NATdoc Construct
automatically and runtime
links to NATdoc for
runtime Generates
NATdoc
automatically
and links to
NATdoc for
runtime
2 May 2011 | Software AG - Get There Faster | 53
NaturalONE Construct Wizards
Design Custom Models with XML
2 May 2011 | Software AG - Get There Faster | 54
NaturalONE v8.2
Major enhancements for the developer
Mark all
occurrences
of a field
2 May 2011 | Software AG - Get There Faster | 55
NaturalONE v8.2
Major enhancements for the developer
NaturalONE Debugger
Natural Stack data
view in debugger
2 May 2011 | Software AG - Get There Faster | 56
NaturalONE 8.2
Major enhancements for the developer
NaturalONE Debugger
Natural source
program called not
found
Option, to download
from server
2 May 2011 | Software AG - Get There Faster | 57
NaturalONE 8.2
Major enhancements for the developer
NaturalONE Debugger
Load natural sources
automatically, that
are not in local
project
Natural program is
now in NaturalONE
project
2 May 2011 | Software AG - Get There Faster | 58
NaturalONE 8.2
Consistency Check
Parallel
development in
server (e.g.
mainframe) libraries
and NaturalONE
Resolve Server time
stamp conflicts in
Natural sources
2 May 2011 | Software AG - Get There Faster | 59
NaturalONE 8.2
NaturalONE
Documentation view
Documentation
during development
time
Navigate through the
documentation view
Changes in program
documentation
directly appear in
the view
2 May 2011 | Software AG - Get There Faster | 60
NaturalONE v8.2
Maintaining Natural
Windows dialogs
from NaturalONE
Right click on Server
view
Opens Dialog Editor
in Natural Studio
Editing, testing,
execution
2 May 2011 | Software AG - Get There Faster | 61
NaturalONE 8.2
Predict integration
Import Data Fields
Import information
from Predict
Redefinitions
Edit masks
Array boundaries
2 May 2011 | Software AG - Get There Faster | 62
NaturalONE 8.2
Predict integration
Predict
Documentation
Edit/Display Predict
Descriptions
In Navigator view
Read/Update Fdic
on server
2 May 2011 | Software AG - Get There Faster | 63
Code Snippets from Developer Community
New in Developer
Community
Share Natural source
code between developers
Enter source code
snippets in the Developer
Community
2 May 2011 | Software AG - Get There Faster | 64
Code Snippets from Developer Community
Now in NaturalONE
Search criteria requested
via help key
Search for source code
snippets in the community
Different search options
Title
Footer
Content
Description
2 May 2011 | Software AG - Get There Faster | 65
Code Snippets from Developer Community
Results shown in search
view
Select one hit for details
2 May 2011 | Software AG - Get There Faster | 66
Code Snippets from Developer Community
Source Code snippet
shown in search view
2 May 2011 | Software AG - Get There Faster | 67
Code Snippets from Developer Community
Select source code to be
copied
Copy Source Code to
NaturalONE editor
2 May 2011 | Software AG - Get There Faster | 68
NaturalONE Command View for Mainframes
Command View
Issue Natural Commands
related to mainframe server
environments
Output in NaturalONE
output window
Example : List Command
2 May 2011 | Software AG - Get There Faster | 69
NaturalONE Command View
Command View
Issue Natural Commands
related to server environment
Invoke Natural utilities on
the server
2 May 2011 | Software AG - Get There Faster | 70
NaturalONE 8.2
Planned Availability
FCS : December 2010
GA : April 2011
2 May 2011 | Software AG - Get There Faster | 71