APL2 Programming: System Services Reference
Total Page:16
File Type:pdf, Size:1020Kb
IBM APL2 Programming: System Services Reference Version 2 Release 2 SH21-1054-01 IBM APL2 Programming: System Services Reference Version 2 Release 2 SH21-1054-01 Note! Before using this information and the product it supports, be sure to read the general information under “Notices” on page xii. Second Edition (March 1994) This edition replaces and makes obsolete the previous edition, SH21-1054-0. The technical changes for this edition are summarized under “Summary of Changes,” and are indicated by a vertical bar to the left of a change. This edition applies to Version 2 Release 2 of APL2, 5688-228, and to any subsequent releases until otherwise indicated in new editions or technical newsletters. Make sure you are using the correct edition for the level of the product. Order publications through your IBM representative or the IBM branch office serving your locality. Publications are not stocked at the address below. A form for reader's comments is provided at the back of this publication. If the form has been removed, address your comments to: IBM Corporation, Department J58 P.O. Box 49023 San Jose, CA, 95161-9023 United States of America 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 International Business Machines Corporation 1984, 1994. All rights reserved. US Government Users Restricted Rights – Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp. Contents | Notices . xii | Programming Interface Information ........................... xii | Trademarks . xiii About This Book .................................... xiv Who Should Use This Book .............................. xiv | APL2 Publications . xiv | Conventions Used in This Library ............................ xv | Summary of Changes ................................. xvii | Product . xvii Part 1. Interactive and Batch Processing ...............................1 Chapter 1. Introduction to APL2 System Services ................ 3 APL2 System Structure .................................. 3 APL2 Support Features .................................. 5 Invocation Options . 5 APL2 Session Manager ................................ 5 APL2 Libraries, Workspaces, and Data Files .................... 6 Batch Processing of APL2 .............................. 6 Shared Variables and Auxiliary Processors ..................... 6 Workspaces Distributed with APL2 ......................... 6 External Names . 7 Chapter 2. APL2 Invocation and Termination ................... 8 Starting APL2—The APL2 Command under CMS and TSO ............ 8 Continuing with the Invocation Options ......................... 8 Description of Invocation Options ......................... 11 Session Termination under CMS ........................... 32 Session Termination under TSO ........................... 33 Chapter 3. The APL2 Session Manager ..................... 36 Features of the APL2 Session Manager ....................... 37 The Session Manager Screen ............................. 37 Entering Multiple Lines of Input .......................... 41 The Session Manager Log ............................... 41 Reusing Previous Lines in the Session Log ................... 41 Controlling the Size of and Saving the Session Log ............... 42 APL2 Session Manager Commands ......................... 43 Session Manager Command Summary ...................... 43 COLUMN . 44 COPY . 46 DISPLAY . 50 FIND . 53 HELP . 54 LINE . 54 LOG . 55 PAGE . 56 Copyright IBM Corp. 1984, 1994 iii PFK . 57 PROFILE . 58 SUPPRESS . 61 Session Manager Messages .............................. 62 Chapter 4. APL2 Libraries: Workspaces and Data Files ........... 63 APL2 Libraries, Workspaces, and Data Files under CMS ............. 63 Updating LIBTAB APL2 to Create New APL2 Libraries ............. 64 Accessing Libraries, Workspaces, and Data Files ................ 65 Workspace Names . 65 Data File Names ................................... 66 Transfer Files under CMS .............................. 66 Library Passwords . 67 APL2 Libraries, Workspaces, and Data Files Under TSO ............. 67 Virtual Storage Access Method (VSAM) Library System ............ 68 Sequential Access Method (SAM) Library System ................ 70 Transfer Files under TSO .............................. 73 Security and Integrity of APL2 Data ........................ 73 Chapter 5. Named Editors . 74 Restrictions Using Named System Editors ...................... 74 Using Named System Editors under CMS ...................... 75 Using Named System Editors under TSO ...................... 75 Chapter 6. Batch Processing . 78 Batch Jobs under CMS ................................. 78 CMS Batch Facility Input .............................. 78 CMS Batch Facility Output ............................. 79 Batch Jobs under TSO ................................. 80 TSO Batch Input ................................... 80 TSO Batch Output .................................. 80 Chapter 7. Controlling APL2 Invocation ..................... 82 Providing Input to APL2 ................................ 82 Directing APL2's Output ................................ 83 Controlling APL2's Use of the Screen ........................ 84 DBCS and APLIN/APLPRINT Files .......................... 84 DBCS in Other IBM Products ............................ 84 DBCS in APL2 .................................... 85 Reading DBCS from APLIN ............................. 85 Writing DBCS to APLPRINT ............................ 85 | Chapter 8. Using APL2 across Systems ..................... 86 | Cooperative Processing . 86 | Processor Network Identification .......................... 86 | Processor Profile Structure ............................. 87 | Using the Port Server ................................ 88 | Sending a Share Offer ................................ 88 | Receiving a Share Offer ............................... 88 | Processor Profile Syntax .............................. 89 | Processor Profile Examples ............................. 91 | Transferring Workspaces . 94 | Workspace Transfer between APL2 Systems .................. 94 | Migration of TryAPL2 Workspaces ......................... 95 iv APL2 Programming: System Services Reference | Migration of VS APL Workspaces ......................... 95 | Transferring AP 211 Files ............................... 95 Part 2. Auxiliary Processors ....................................... 97 Chapter 9. Summary of Auxiliary Processors Distributed with APL2 ... 102 | Using Auxiliary Processors ............................... 103 | Using the Share-Offer Utilities ............................. 104 | Suggestions for Use of Auxiliary Processors .................... 105 Chapter 10. AP 100—Host System Command Processor Under CMS ... 107 Associated Workspace . 107 Shared Variable Overview ............................... 107 Initial Value . 108 Communication Procedure . 108 Querying the Operating System .......................... 109 CMS Communication and IMPCP and IMPEX Settings ............. 109 Cautions . 110 Return Codes . 110 Chapter 11. AP 100—Host System Command Processor Under TSO ... 112 Associated Workspace . 112 Shared Variable Overview ............................... 113 Communication Procedure . 113 Querying the Operating System .......................... 114 Return Codes . 114 AP 100 Built-In Commands .............................. 116 Chapter 12. AP 101—Alternate Input (Stack) Processor ........... 127 Associated Workspaces . 127 Shared Variable Overview ............................... 128 Data Formats . 128 Initial Values . 128 Communication Procedure . 129 | AP 101 Commands ................................. 129 Using AP 101 within a Defined Function ..................... 130 Using AP 101 with the TSO Fence Option ...................... 131 Cautions . 132 Return Codes . 133 Chapter 13. AP 102—Main Storage Access Processor ............ 134 Shared Variable Overview ............................... 134 | Commands . 135 Communication Procedure . 135 Formatting the Result from AP 102 ........................ 136 Cautions . 136 Return Codes . 137 Chapter 14. AP 110—CMS File Processor .................... 138 Associated Workspace . 138 Shared Variable Overview ............................... 138 Initial Values . 139 Communication Procedure . 140 Contents v Record Variable . 141 Control Variable . 141 Cautions . 143 Return Codes . 144 Chapter 15. AP 111—QSAM File Processor ................... 146 Associated Workspaces . 146 Shared Variable Overview ............................... 146 Initial Values . 147 Communication Procedure . 148 Cautions . 150 Return Codes . 151 Chapter 16. AP 119—Socket Interface Processor ............... 154 Shared Variable Overview ............................... 154 The APL2 Socket Application Program Interface .................. 154 IUCV Paths and Sockets .............................. 155 AP 119 and TCP/IP Commands Summary ..................... 155 Definition of TCP/IP Terms ............................... 156 Blocking . 158 Using AP 119—The TCPIP Commands ....................... 158 ACCEPT . 158 BIND . 159 CLOSE . 159 CONNECT . 159 FCNTL . 160 GETHOSTID . 160 GETHOSTNAME . 161 GETPEERNAME . 161 GETSOCKNAME . 162 GETSOCKOPT . 162 LISTEN . 163 READ . ..