Application Programming Guide

Application Programming Guide

Airline Control System Version 2 IBM Application Programming Guide Release 4.1 SH19-6948-20 Note Before using this information and the product it supports, be sure to read the general information under “Notices” on page xiii. This edition applies to Release 4, Modification Level 1, of Airline Control System Version 2, Program Number 5695-068, and to all subsequent releases and modifications until otherwise indicated in new editions. Order publications through your IBM representative or the IBM branch office serving your locality. Publications are not stocked at the address given below. A form for readers’ comments appears at the back of this publication. If the form has been removed, address your comments to: ALCS Development 2455 South Road P923 Poughkeepsie NY 12601-5400 USA When you send information to IBM, you grant IBM a nonexclusive right to use or distribute the information in any way it believes appropriate without incurring any obligation to you. © Copyright IBM Corporation 2003, 2016. US Government Users Restricted Rights – Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp. Contents Figures .................................... ix Tables .................................... xi Notices ................................... xiii Programming interface information ........................... xiii Trademarks ................................... xiv About this book ................................ xv Who should read this book .............................. xv How this book is organized .............................. xv ALCS services .................................. xvi TPF compatibility ................................. xvii Note on the example code .............................. xvii Chapter 1. Overview of ALCS .......................... 1 1.1 What ALCS provides ............................... 1 1.2 Agent sets ................................... 2 1.3 Functions performed by ALCS ............................ 2 1.4 Processing a message ............................... 3 1.5 Using information from previous messages ........................ 6 1.6 Application programs in ALCS ............................ 6 1.7 Direct access files ................................ 8 1.7.1 Fixed-file records ............................... 8 1.7.2 Pool-file records ............................... 9 1.7.3 Chains of pool-file records ........................... 10 1.7.4 Recovering long-term pool-file records ....................... 11 1.7.5 Application global area............................. 12 1.7.6 General files and general data sets ......................... 12 1.7.7 Virtual file access............................... 13 1.8 Sequential files ................................. 13 1.9 Communication with users, other systems, and other applications ................ 13 1.10 ALCS applications ............................... 14 Chapter 2. Communication ........................... 15 2.1 Communication facilities .............................. 15 2.2 Receiving input messages ............................. 16 2.3 Validating input data ............................... 18 2.4 Sending response messages to the originating terminal.................... 18 2.5 Sending unsolicited messages ............................ 18 2.6 Message formats ................................ 19 2.7 APPC communication calls and conversation services .................... 19 2.7.1 ZSTAT message counts and data collection statistics ................... 19 2.7.2 Program preparation ............................. 19 2.7.3 Including CPI-C calls in application programs ..................... 19 2.7.4 Including APPC/MVS calls in application programs ................... 21 2.7.5 APPC/MVS calls with asynchronous notification of completion ............... 23 2.7.6 Ending the conversation ............................ 24 2.8 Message Queue Interface (MQI) ........................... 25 2.8.1 ZSTAT message counts and data collection statistics ................... 26 2.8.2 Program preparation ............................. 26 2.8.3 Including MQI calls in application programs ..................... 26 2.8.4 MQI calls with asynchronous notification of completion.................. 27 2.8.5 Closing MQI objects.............................. 30 © Copyright IBM Corp. 2003, 2016 iii 2.9 Optimized Local Adapters (OLA) for WebSphere Application Server ............... 30 2.9.1 WAS Bridge ................................ 30 2.9.2 ZSTAT message counts and data collection statistics ................... 31 2.9.3 Program preparation ............................. 31 2.9.4 Including OLA calls in application programs ..................... 31 2.9.5 Testing the return code ............................. 32 2.9.6 Unregistering and releasing connection handles .................... 32 2.10 3270 Screen mapping support............................ 32 2.11 TCP/IP support ................................ 33 Chapter 3. Data in ALCS ............................ 37 3.1 Using direct access files .............................. 37 3.1.1 File addresses ................................ 37 3.1.2 Standard record header............................. 38 3.2 Reading and writing DASD records .......................... 39 3.2.1 Reading DASD records............................. 40 3.2.2 Writing DASD records ............................. 41 3.2.3 Sequential files ............................... 42 3.3 Serialization .................................. 42 3.3.1 Serialization - forcing exclusive access to resources ................... 44 3.3.2 Serializing access to the application global area..................... 45 3.3.3 SYNCC monitor-request macro and global C function ................... 51 3.3.4 ALCS services for accessing DASD records ...................... 52 3.3.5 Summary of ALCS services for DASD processing .................... 53 3.3.6 Offline access to general files and general data sets ................... 54 3.4 Using sequential files ............................... 54 3.4.1 System sequential files ............................. 55 3.4.2 Real-time sequential files ............................ 55 3.4.3 General sequential files............................. 55 3.4.4 Several entries using the same general sequential file................... 55 3.4.5 ALCS services for sequential file processing ...................... 57 3.4.6 Summary of ALCS services for sequential files ..................... 57 3.5 Global records and fields.............................. 58 3.5.1 Global directories .............................. 58 3.5.2 Keypointing global records ........................... 59 3.5.3 Logical global records ............................. 59 3.5.4 Using globals - attention ............................ 60 3.5.5 Global area serialization ............................ 61 3.5.6 C functions for processing globals ......................... 62 3.5.7 How a C language application program accesses the global area ............... 62 3.5.8 ALCS services for global area handling ....................... 64 3.6 Global area protection............................... 64 3.6.1 Global area protect key............................. 65 3.6.2 Using global area protection ........................... 65 3.7 Using Structured Query Language (SQL) ........................ 66 3.7.1 Preparation................................. 67 3.7.2 Making SQL calls .............................. 67 3.7.3 Distributing application logic across several programs .................. 68 3.8 Designing databases for use with ALCS......................... 68 3.8.1 Performance and design ............................ 68 3.8.2 TPF Database Facility (TPFDF) .......................... 69 3.8.3 Portability ................................. 69 3.9 Organizing data................................. 70 3.9.1 Standard structures .............................. 70 3.9.2 TPF Database Facility (TPFDF) .......................... 70 3.10 Record classes ................................. 70 3.10.1 Fixed files ................................. 71 3.10.2 Pool files ................................. 71 3.10.3 Short-term pool file ............................. 72 3.10.4 Long-term pool file ............................. 72 3.10.5 Choosing which class of record to use ....................... 72 iv Airline Control System Version 2: Application Programming Guide 3.11 Protecting data................................. 73 3.12 Commit and backout .............................. 74 3.12.1 Single-phase commit ............................. 74 3.12.2 Two-phase commit .............................. 75 3.12.3 ALCS commit and backout services ........................ 75 3.12.4 Keeping a transaction log ........................... 75 3.12.5 Sequential update technique .......................... 75 3.12.6 Why ALCS does not provide a synchpoint manager................... 77 3.12.7 Other considerations ............................. 78 3.13 Utility programs ................................ 78 Chapter 4. The entry control block (ECB) and other entry storage .......... 81 4.1 Format of the ECB ................................ 81 4.2 ECB work areas 1 and 2 .............................. 82 4.2.1 Work area fields ............................... 83 4.3 ECB local program work area ............................ 84 4.4 ECB data levels and storage levels .......................... 85 4.4.1 ECB data levels ............................... 85 4.4.2 ECB storage levels .............................. 86 4.5 Entry origin fields ................................ 87 4.6 User register save areas .............................. 87 4.6.1

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    322 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