Programming Guide

Programming Guide

Natural Programming Guide Version 6.3.13 for UNIX October 2012 This document applies to Natural Version 6.3.13 for UNIX. Specifications contained herein are subject to change and these changes will be reported in subsequent release notes or new editions. Copyright © 1992-2012 Software AG, Darmstadt, Germany and/or Software AG USA, Inc., Reston, VA, United States of America, and/or their licensors. Detailed information on trademarks and patents owned by Software AG and/or its subsidiaries is located at http://documentation.softwareag.com/legal/. Use of this software is subject to adherence to Software AG's licensing conditions and terms. These terms are part of the product doc- umentation, located at http://documentation.softwareag.com/legal/ and/or in the root installation directory of the licensed product(s). This software may include portions of third-party products. For third-party copyright notices and license terms, please refer to "License Texts, Copyright Notices and Disclaimers of Third-Party Products". This document is part of the product documentation, located at http://documentation.softwareag.com/legal/ and/or in the root installation directory of the licensed product(s). Document ID: NATUX-NNATPROGRAMMING-6313-20121005 Table of Contents Preface .............................................................................................................................. xv I Natural Programming Modes .......................................................................................... 1 1 Natural Programming Modes ................................................................................. 3 Purpose of Programming Modes ....................................................................... 4 Setting/Changing the Programming Mode ....................................................... 5 Functional Differences ....................................................................................... 5 II Object Types .................................................................................................................. 11 2 Using Natural Programming Objects .................................................................... 13 Types of Programming Objects ........................................................................ 14 Creating and Maintaining Programming Objects ............................................ 14 3 Data Areas ............................................................................................................. 15 Use of Data Areas ............................................................................................. 16 Local Data Area ................................................................................................ 16 Global Data Area .............................................................................................. 17 Parameter Data Area ........................................................................................ 26 4 Programs, Functions, Subprograms and Subroutines .......................................... 31 A Modular Application Structure .................................................................... 32 Multiple Levels of Invoked Objects ................................................................. 32 Program ............................................................................................................ 34 Function ............................................................................................................ 37 Subroutine ........................................................................................................ 39 Subprogram ...................................................................................................... 44 Processing Flow when Invoking a Routine ...................................................... 46 5 Processing a Rich GUI Page - Adapter .................................................................. 49 6 Maps ...................................................................................................................... 51 Benefits of Using Maps .................................................................................... 52 Types of Maps .................................................................................................. 52 Creating Maps .................................................................................................. 53 Starting/Stopping Map Processing ................................................................... 53 7 Helproutines .......................................................................................................... 55 Invoking Help .................................................................................................. 56 Specifying Helproutines ................................................................................... 56 Programming Considerations for Helproutines .............................................. 57 Passing Parameters to Helproutines ................................................................ 57 Equal Sign Option ............................................................................................ 58 Array Indices .................................................................................................... 59 Help as a Window ............................................................................................ 59 8 Multiple Use of Source Code - Copycode ............................................................. 61 Use of Copycode .............................................................................................. 62 Processing of Copycode ................................................................................... 62 9 Documenting Natural Objects - Text ..................................................................... 63 Use of Text Objects ........................................................................................... 64 Writing Text ...................................................................................................... 64 iii Programming Guide 10 Creating Component Based Applications - Class ............................................... 65 11 Using Non-Natural Files - Resource .................................................................... 67 Use of Resources .............................................................................................. 68 Shared Resources ............................................................................................. 68 Private Resources ............................................................................................. 69 API for Processing Resources ........................................................................... 69 III Defining Fields ............................................................................................................. 71 12 Use and Structure of DEFINE DATA Statement ................................................. 73 Field Definitions in DEFINE DATA Statement ................................................ 74 Defining Fields within a DEFINE DATA Statement ........................................ 74 Defining Fields in a Separate Data Area .......................................................... 75 Structuring a DEFINE DATA Statement Using Level Numbers ..................... 75 13 User-Defined Variables ........................................................................................ 79 Definition of Variables ...................................................................................... 80 Referencing of Database Fields Using (r) Notation ......................................... 81 Renumbering of Source-Code Line Number References ................................. 82 Format and Length of User-Defined Variables ................................................ 83 Special Formats ................................................................................................ 85 Index Notation ................................................................................................. 87 Referencing a Database Array .......................................................................... 89 Referencing the Internal Count for a Database Array (C* Notation) .............. 97 Qualifying Data Structures ............................................................................. 100 Examples of User-Defined Variables .............................................................. 101 14 Function Call ...................................................................................................... 103 Calling User-Defined Functions ..................................................................... 104 Function Result ............................................................................................... 105 Evaluation Sequence ...................................................................................... 105 Restrictions ..................................................................................................... 105 Syntax Description ......................................................................................... 106 Example .......................................................................................................... 110 15 Introduction to Dynamic Variables and Fields .................................................. 115 Purpose of Dynamic Variables ....................................................................... 116 Definition of Dynamic Variables ...................................................................

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    724 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us