Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
ADABAS
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Natural (4GL)== Natural is a proprietary [[fourth-generation programming language]]. It was not part of the initial (1971) Adabas release.<ref>{{cite web |url=http://www.pks.de/_old/en/adabas-natural |title=Adabas / Natural β From pioneer to relegator - fast and proprietary for over 40 years }}{{Dead link|date=September 2019 |bot=InternetArchiveBot |fix-attempted=yes }}</ref> Natural programs can be "run" interpretively or "executed" as compiled objects.<ref>{{cite web |url=http://frontline.compuware.com/doc/sb/sb52/html/Strobe%20Options%20Guide/WebHelp/CWSTUO5B/Anfch3/Natural_Program_Activity.htm |title=Natural Program Activity}}</ref> Compiled programs can more directly use operating system services, and run faster. Proponents say that Natural has evolved from a competitor of COBOL to "being in competition with Java as language of choice for writing services ([[Service-oriented architecture|SOA]])."<ref>{{cite web |url=http://tech.forums.softwareag.com/techjforum/posts/list/24345.page |title=Which is better, COBOL/DB2 or Natural/ADABAS |date=July 6, 2011}}</ref> ===About Natural=== 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 objects (programs, maps, data areas, etc.) are stored in libraries, similar in structure to a DOS directory, and can be named with identifiers up to 8 characters. Objects, even if they are of different types, cannot have the same name (within the same library). 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. Versions exist for z/OS, z/VSE, BS2000/OS, Linux, Unix and Windows.<ref>{{cite web|url=https://resources.softwareag.com/adabas-natural/2018-3-fs-natural-app-dev-en-natural-application-development-platform-fact-sheet |title=Resource Library |publisher=Resources.softwareag.com |date= |accessdate=2023-03-22}}</ref> ===Language features=== Natural works not only with Adabas files, but also supports [[Oracle Corporation|Oracle]], [[IBM Db2|DB2]], and others. <!-- Db2 Discombobulated by 2manyCooks --> Sample code: <syntaxhighlight lang="cobolfree"> DEFINE DATA LOCAL 01 EMPLOYEES VIEW OF EMPLOYEES 02 SALARY (1) END-DEFINE READ EMPLOYEES BY NAME AT END OF DATA DISPLAY MIN (EMPLOYEES.SALARY(1)) (EM=ZZZ,ZZZ,ZZ9) AVER(EMPLOYEES.SALARY(1)) (EM=ZZZ,ZZZ,ZZ9) MAX (EMPLOYEES.SALARY(1)) (EM=ZZZ,ZZZ,ZZ9) END-ENDDATA END-READ END </syntaxhighlight> Output: <pre> Page 1 18-08-22 16:42:22 ANNUAL ANNUAL ANNUAL SALARY SALARY SALARY ----------- ----------- ----------- 0 240,976 6,380,000 </pre> The language is [[Strong and weak typing|strongly-typed]], using explicit typing of variables, which may be one of: * Alphanumeric * Numeric [[Zoned decimal]] up to 27 total digits, of which a total of 7 may be to the right of decimal point * Packed Decimal,<ref>{{cite web|url=https://www.ibm.com/support/knowledgecenter/en/ssw_ibm_i_73/rzasd/padecfo.htm|title = Packed-Decimal Format|website = [[IBM]]|date = June 2012}}</ref> same limits as "Numeric") * Integer (1, 2 or 4 bytes, ranging from -128 to 127 / -32,768 to 32,767 and -2,147,483,648 to 2,147,483,647) * Date * Time (which includes the date) * Logical (True or False) * Binary * Control variable paralleling CICS map attribute * Floating Point (4 or 8 bytes) ===The system file=== The system file is an Adabas file reserved for use by Natural, which contains, but is not limited to, the following: * All Natural programs, both in source format (programs) and in object format (compiled), grouped in libraries; * File Definition Modules, or Data Definition Modules (DDM), which describe the fields defined within Adabas or other databases supported by Natural as well as userviews, which are fields groupings/subsets; * Natural error messages; * The texts of the Help function. The system file is not limited to Adabas. Natural can also store programs in VSAM on mainframe operating systems. Natural uses the file system on Windows and various Unix implementations. ====Programs==== Natural objects are identified by names up to 8 characters, the first of which must be alphabetical. The Natural program editor allows source in rows of up to 72 positions. Lines are numbered by 4 digits. This numbering is generated by Natural during program creation. Line numbers used by the compiler and editors, and can have important logical functions in the programs. Comments can be included in two ways: * Full-line comments are identified by a "*" or "**" prefix. * Annotated code lines have a "/*" - everything to its right is a comment. Examples: 0010 * These two lines (0010 and 0020) 0020 ** are comments. 0030 FORMAT LS = 80 /* As well as this part of the line (0030) 0040 * NOTE: The "/*" form has no space between the SLASH and ASTERISK. . . 0200 END "END" or "." indicates the end of a program. A Hello World code example: * Hello World in NATURAL WRITE 'Hello World!' END
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)