![VM/ESA Network Computing with Java and Netrexx](https://data.docslib.org/img/3a60ab92a6e30910dab9bd827208bcff-1.webp)
IBML VM/ESA Network Computing with Java and NetRexx Kris Buelens ** Bengt Heijnesson ** Dave Jones ** Salvador Torres International Technical Support Organization http://www.redbooks.ibm.com This book was printed at 240 dpi (dots per inch). The final production redbook with the RED cover will be printed at 1200 dpi and will provide superior graphics resolution. Please see “How to Get ITSO Redbooks” at the back of this book for ordering instructions. SG24-5148-00 IBML International Technical Support Organization SG24-5148-00 VM/ESA Network Computing with Java and NetRexx November 1998 Take Note! Before using this information and the product it supports, be sure to read the general information in Appendix C, “Special Notices” on page 161. First Edition (November 1998) This edition applies to Virtual Machine/Enterprise Systems Architecture (VM/ESA), Version 2 Release 3.0, Program Number 5654-030, and subsequent releases. Note This book is based on a pre-GA version of a product and may not apply when the product becomes generally available. We recommend that you consult the product documentation or follow-on versions of this redbook for more current information. Comments may be addressed to: IBM Corporation, International Technical Support Organization Dept. HYJ Mail Station P099 522 South Road Poughkeepsie, New York 12601-5400 When you send information to IBM, you grant IBM a non-exclusive right to use or distribute the information in any way it believes appropriate without incurring any obligation to you. Copyright International Business Machines Corporation 1998. All rights reserved. Note to U.S. Government Users — Documentation related to restricted rights — Use, duplication or disclosure is subject to restrictions set forth in GSA ADP Schedule Contract with IBM Corp. Contents Figures . ix Tables . xi Preface . xiii The Team That Wrote This Redbook ........................ xiii Comments Welcome . xiv Chapter 1. Introduction . 1 Chapter 2. Overview of NetRexx and Java on VM/ESA .............. 3 2.1 Java, NetRexx, OpenEdition, and the BFS ................... 3 2.2 Overview of the SFS ................................ 3 2.2.1 SFS Servers and File Pools ......................... 3 2.3 Overview of the BFS ................................ 8 2.3.1 POSIX Terminology . 8 2.3.2 Directory Entries for POSIX BFS Usage .................. 10 2.4 Some Common SFS and BFS Commands ................... 11 2.5 The Java Environment Under VM ........................ 12 2.6 SFS and BFS Directory Structures ........................ 13 2.6.1 An SFS File Space .............................. 13 2.6.2 A BFS File Space ............................... 14 2.6.3 Combining File Spaces : SFS Aliases - BFS Links ............ 14 2.7 Installing Java and NetRexx without the Shell and Utilities ......... 16 2.7.1 Major Steps to Install “Shell-less” Java and NetRexx ......... 17 2.8 Adding a NetRexx Developer User ID ...................... 20 Chapter 3. Tools Used During the Project ..................... 21 3.1 XEDIT . 21 3.1.1 PROFILE XEDIT . 21 3.2 BFSLIST - Listing the Contents of a BFS Directory .............. 22 3.2.1 OPENVM LISTFILE . 22 3.2.2 POSIX Shell and Utilities ........................... 23 3.2.3 BFSLIST . 24 3.3 BFSTREE - Listing a BFS Directory Tree .................... 27 3.4 NetRexx Compile . 29 3.4.1 NRC EXEC - NetRexx Compile ....................... 29 3.4.2 NRC XEDIT - NetRexx Compile ....................... 30 3.5 JC EXEC - Java Compile ............................. 31 3.6 NetRexx Run . 31 3.6.1 NRR EXEC - NetRexx Run .......................... 31 3.6.2 NRR XEDIT - NetRexx Run .......................... 32 3.7 Tools for the POSIX Shell Users ......................... 32 3.8 SETCENV - Setting C Environment Variables ................. 33 3.8.1 Important Environment Variables ...................... 33 3.8.2 Setting Environment Variables from CMS ................. 34 3.8.3 More About Classpath ............................ 34 Chapter 4. Comparing REXX to NetRexx ...................... 37 4.1 REXX′s Position . 37 4.1.1 The REXX Language ............................. 37 Copyright IBM Corp. 1998 iii 4.1.2 REXX Compilers . 38 4.1.3 Hello World in REXX ............................. 38 4.2 NetRexx′s Position . 38 4.2.1 Hello World in NetRexx ............................ 38 4.2.2 Hello World in Java .............................. 38 4.2.3 The NetRexx Language ........................... 39 4.2.4 NetRexx and Compilers ........................... 39 4.3 NetRexx Syntax Introduction ........................... 39 4.3.1 Basic Syntax Differences ........................... 40 4.3.2 Data Types . 40 4.3.3 Case . 42 4.3.4 REXX Instructions . 42 4.3.5 Function Calls . 45 4.3.6 Subroutines and User Defined Functions ................. 47 4.3.7 Exit or Return ................................. 49 4.3.8 Stems - Array Variables - Indexed Strings ................ 50 4.3.9 The main() Method - Input Parameters .................. 52 4.3.10 Comparing NetRexx to Object Oriented REXX ............. 53 Chapter 5. AboutFrame, a Reusable Class ..................... 55 5.1 The AboutFrame Picture ............................. 55 5.2 What is AboutFrame? ............................... 55 5.3 AboutFrame: User Interface ........................... 56 5.4 AboutFrame: Program Interface ......................... 56 5.4.1 Approach with Classic Languages ..................... 56 5.4.2 An OO Solution ................................ 56 5.5 Classes and Methods ............................... 57 5.5.1 Class - What is it? ............................... 57 5.5.2 Methods - What are they? .......................... 58 5.5.3 Variables in the Class ............................ 60 5.6 AboutFrame: the Class Definition ........................ 60 5.6.1 AboutFrame: Overview of the Program .................. 61 5.6.2 AboutFrame Section One: The Class Itself ................ 63 5.6.3 AboutFrame Section Two: The Constructor Method ........... 64 5.6.4 AboutFrame Section Three: Other Methods ............... 66 5.6.5 AboutFrame Section Four: Event Classes ................. 67 5.6.6 Avoiding Empty Frames ........................... 73 Chapter 6. Reading and Writing Files from NetRexx ............... 75 6.1 Reading BFS Character Data Files ....................... 75 6.1.1 Reading CMS Character Data Files .................... 75 6.2 Reading from the console ............................. 77 6.2.1 Useful Control Sequences .......................... 77 6.3 Writing BFS Character Data Files ........................ 78 6.3.1 Writing CMS Character Data Files ..................... 78 6.4 Working With Binary Files ............................. 79 Chapter 7. Code Pages - ASCII <> EBCDIC Issues ............... 81 7.1 History, Experience . 81 7.2 Background Information - Codepages ..................... 82 7.3 Internationalization . 83 7.3.1 Streams? . 83 7.3.2 Java IO Support ................................ 83 7.4 VM Java Codepage ................................ 84 7.4.1 Solution for Client Server Programs .................... 84 iv VM/ESA Network Computing with Java and NetRexx 7.5 IBM Network Station and Codepages ...................... 85 Chapter 8. TCP/IP Networking . 87 8.1 Translating between EBCDIC and ASCII .................... 87 8.1.1 readLine() and printLn() ........................... 87 8.2 Simple TCP/IP Client ................................ 88 8.3 Simple TCP/IP Server ............................... 88 8.3.1 Extending the Server ............................. 91 8.3.2 Starting the Server .............................. 91 Chapter 9. Java and CMS ............................... 93 9.1 Executing non-Java Programs .......................... 93 9.1.1 Using Runtime.exec() . 93 9.1.2 Using JNI . 94 9.2 The cms.util Package ............................... 94 9.3 Running CMS Execs ................................ 95 9.3.1 The CMSRexx Class ............................. 95 9.4 Running CMS Pipelines with NetRexx ..................... 96 9.4.1 fitting *>java .................................. 96 9.4.2 fitting *<java .................................. 97 9.4.3 The CMSPipe Class .............................. 97 9.5 Installation Instructions . 100 Chapter 10. The GUIMON Sample Program ................... 101 10.1 GUIMON - Pictures ............................... 101 10.2 GUIMON - Installation Instructions ...................... 103 10.2.1 Installing the GUIMON Monitor ..................... 103 10.2.2 Installing the GUIMON Client ...................... 105 10.2.3 Installing the GUIMON Server ...................... 106 10.2.4 Installing Client and Server Files .................... 107 10.3 GUIMON - Functional Overview ........................ 110 10.3.1 GUIMON - the Monitor .......................... 110 10.3.2 GUIMON - the Server ........................... 111 10.3.3 GUIMON - the Client ............................ 112 10.4 GUIMON - the Client-Server Communication ................ 113 10.4.1 Request Formats . 113 10.5 GUIMON Record Format Requirements ................... 117 Chapter 11. Running NetRexx and Java Applications on a Network Station 121 11.1 Network Computing - Extending VM/ESA Resources into the Network 121 11.2 VM/ESA as a Network Station Server .................... 122 11.3 Support Delivery Mechanism ......................... 122 11.4 Hardware Requirements for VM/ESA .................... 122 11.5 Software Requirements for VM/ESA ..................... 122 11.6 Major Steps to Install VM/ESA Network Station Code .......... 123 11.6.1 Download the Network Station Code .................. 123 11.6.2 Prepare
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages219 Page
-
File Size-