Java and Z/OS (And Rdz)

Java and Z/OS (And Rdz)

® IBM Software Group Java and z/OS (and RDz) Jon Sayles – [email protected] © 2016 IBM Corporation IBM Software Group | Rational software Merrill Class . They’ll have RDz exposure . Terms & Concepts & Vocabulary Remove fear of Java Analogies – Procedural vocabulary 20 – 30 students - mix of young + old (mostly old) dudes . Call COBOL from Java Java doesn’t create an .exe Objects . z/OS Java Standard z/OS environment JCL – pointing to Unix Aware of JVM – can call COBOL http://www.s390java.com/index.htm IBM Software Group | Rational software Trademarks Trademarks The following are trademarks of the International Business Machines Corporation in the United States and/or other countries. For a complete list of IBM Trademarks, see www.ibm.com/legal/copytrade.shtml: AS/400, DBE, e-business logo, ESCO, eServer, FICON, IBM, IBM Logo, iSeries, MVS, OS/390, pSeries, RS/6000, S/30, VM/ESA, VSE/ESA, Websphere, xSeries, z/OS, zSeries, z/VM The following are trademarks or registered trademarks of other companies Lotus, Notes, and Domino are trademarks or registered trademarks of Lotus Development Corporation Java and all Java-related trademarks and logos are trademarks of Sun Microsystems, Inc., in the United States and other countries LINUX is a registered trademark of Linux Torvalds UNIX is a registered trademark of The Open Group in the United States and other countries. Microsoft, Windows and Windows NT are registered trademarks of Microsoft Corporation. SET and Secure Electronic Transaction are trademarks owned by SET Secure Electronic Transaction LLC. Intel is a registered trademark of Intel Corporation * All other products may be trademarks or registered trademarks of their respective companies. NOTES: Performance is in Internal Throughput Rate (ITR) ratio based on measurements and projections using standard IBM benchmarks in a controlled environment. The actual throughput that any user will experience will vary depending upon considerations such as the amount of multiprogramming in the user's job stream, the I/O configuration, the storage configuration, and the workload processed. Therefore, no assurance can be given that an individual user will achieve throughput improvements equivalent to the performance ratios stated here. IBM hardware products are manufactured from new parts, or new and serviceable used parts. Regardless, our warranty terms apply. All customer examples cited or described in this presentation are presented as illustrations of the manner in which some customers have used IBM products and the results they may have achieved. Actual environmental costs and performance characteristics will vary depending on individual customer configurations and conditions. This publication was produced in the United States. IBM may not offer the products, services or features discussed in this document in other countries, and the information may be subject to change without notice. Consult your local IBM business contact for information on the product or services available in your area. All statements regarding IBM's future direction and intent are subject to change or withdrawal without notice, and represent goals and objectives only. Information about non-IBM products is obtained from the manufacturers of those products or their published announcements. IBM has not tested those products and cannot confirm the performance, compatibility, or any other claims related to non-IBM products. Questions on the capabilities of non-IBM products should be addressed to the suppliers of those products. Prices subject to change without notice. Contact your IBM representative or Business Partner for the most current pricing in your geography. References in this document to IBM products or services do not imply that IBM intends to make them available in every country. Any proposed use of claims in this presentation outside of the United States must be reviewed by local IBM country counsel prior to such use. The information could include technical inaccuracies or typographical errors. Changes are periodically made to the information herein; these changes will be incorporated in new editions of the publication. IBM may make improvements and/or changes in the product(s) and/or the program(s) described in this publication at any time without notice. Any references in this information to non-IBM Web sites are provided for convenience only and do not in any manner serve as an endorsement of those Web sites. The materials at those Web sites are not part of the materials for this IBM product and use of those Web sites is at your own risk. 3 IBM Software Group | Rational software Java and the software world IBM Software Group | Rational software Why Learn Java? . Common code across platforms Java code can be reused in CICS, WAS, Batch, and other application program platforms . Modern, powerful, easily available developers/tools Allow to extend usage of the mainframe while using a more modern programming language and tooling Most of today’s investment by the world’s primary software vendors involves Java . Even things like ODM, Business Rules, etc. wrap around Java . Large code base of pre-built applications, tools, frameworks and design patterns . Legacy of agile development processes (JUnit, etc.) replacing Waterfall lif . You’re not retiring next week . Cost, cost, cost: Java can be run more cheaply than COBOL or other traditional mainframe languages when using a zAAP processor IBM Software Group | Rational software Java == “Write once…run anywhere” The key is the “isolation of program from hardware …” IBM Software Group | Rational software Java Bytecode – Isolating programs from hardware IBM Software Group | Rational software Java Programs Bytecode the Java Virtual Machine 1. 2. 1. You code in a file named: Xxxxx.java Java Virtual Machine 2. You compile to a Java class: Xxxxx.class 3. You run your program on any supported java platform - using a Java 3. Virtual Machine (a JVM) IBM Software Group | Rational software Java Tools … RDz – as a Java SDK IBM Software Group | Rational software Java and procedural programming constructs IBM Software Group | Rational software Java COBOL – Development similarities . Java source file COBOL source file . Java class file COBOL module . Java bytecode COBOL “object module” (COBOL Compiler output) . Java virtual machine the z/OS operating system . There are many many, many additional parallels between Java and COBOL – especially at the language level IBM Software Group | Rational software Java COBOL – Programming similarities (1 of 2) IBM Software Group | Rational software Java COBOL – Programming similarities (2 of 2) • Package Library • Class Module • Method Subroutine • Variables Variables • Statements Statements: Math, I/O (QSAM/VSAM), Conditionals, Branching, Database (DB2, IMS, etc.), CICS, IMS TM, Display, U.I. – etc. IBM Software Group | Rational software How to write and test Java using RDz IBM Software Group | Rational software Java development and RDz Perspectives . COBOL tools are in the z/OS Projects Perspective IBM Software Group | Rational software Java development and RDz Perspectives . Java tools are in the Java Perspective IBM Software Group | Rational software Java development using RDz . Open the Java Perspective: Package Explorer view . Create a Java Project . Create a Package . Create a HelloWorld Class . Run as a Java Application . Set Break points . Step through code to branch to the method . Debug as Java application . Port the Package to z/OS (UNIX File System) . Drag & Drop a file to UNIX . Search in USS IBM Software Group | Rational software Open the Java Perspective This is the Java Perspective … (different Views will display) IBM Software Group | Rational software Create a Project, Package and Class . Right-click inside of the Package Explorer View and select: New > Java Project Name the Project HelloWorldProject and click Finish . Right-click over the HelloWorld Project and select: New > Package Name the Package: helloWorldPackage and click Finish (note - lower case “h”) . Right-click over the helloWorldPackage and select: New > Class Name the Class: HelloWorld Click Finish Your new java Class file IBM Software Group | Rational software Your first example Java Class (code) . From the slide notes, copy and paste the following code into the HelloWorld Class . Press Ctrl/S to save your work Note that if you get any syntax errors, check the package name or redo this paste step The code is embedded in this slide’s Notes area IBM Software Group | Rational software Run as a Java Application . From the Package Explorer; expand your project > package > class . Select HelloWorld.java and Run it As a Java Application Note the System.out.println results in the Console view. IBM Software Group | Rational software Debug as a Java Application . Double-click your mouse over the left-hand frame of your source file, to create 3 breakpoints on the System.out.println statements (as shown in the screen capture) . From the Package Explorer; expand your project > package > class . Select HelloWorld.java and Debug it As a Java Application Note; You will be prompted to switch to the Debug Perspective … do so IBM Software Group | Rational software Debugging Java . From the Debug toolbar Use Step into - to run a statement, and step into a called method Use Step return - to run the remaining code in a called method, returning to the Next Sequential instruction Use Step over - to run a statement - and run through all of the code in a called method Use Resume - to run to the next breakpoint, or to normal EOJ Use Terminate - to halt your debug session You can alter variable values on the fly IBM Software Group | Rational software Export to Remote JAR file - 1 of 2 . Return to the Java Perspective . Right-click over your helloWorldPackage, select Export . Type rem in the filter, select Remote JAR file and press Next > . Check the box for your Project . Click Browse… IBM Software Group | Rational software Export to Remote JAR file - 2 of 2 . Expand your named Connection to z/OS . Scroll down inside of the Unix System Services directories until you see: u <your TSO ID> .

View Full Text

Details

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