Presentation is loading. Please wait.

Presentation is loading. Please wait.

www.strongback.us About Us: Strongback Consulting IBM Advanced Business Partner – Rational, WebSphere, Lotus, Information Management SVP certified – Strongly.

Similar presentations


Presentation on theme: "www.strongback.us About Us: Strongback Consulting IBM Advanced Business Partner – Rational, WebSphere, Lotus, Information Management SVP certified – Strongly."— Presentation transcript:

1

2 www.strongback.us About Us: Strongback Consulting IBM Advanced Business Partner – Rational, WebSphere, Lotus, Information Management SVP certified – Strongly focused on Enterprise Modernization, Agile Transformations, and DevOps – Key Industries Served: Finance, Insurance, Healthcare, Manufacturing, Government – Rational Design Partner for HATS and other Rational enterprise modernization technologies Discover us at: http://www.strongback.us Subscribe to us at http://blog.strongbackconsulting.com Socialize with us on Facebook & LinkedIn http://www.facebook.com/StrongbackConsulting http://www.facebook.com/StrongbackConsulting http://www.linkedin.com/company/290754

3 www.strongback.us 3 Your Instructor Kenny Smith – Principal Consultant @ Strongback Consulting – Developed courses for multiple Rational IDE’s – Past speaker at IBM’s RSDC, Innovate, and InterConnect, and N. FL Rational User Group – Major projects: Multiple RDz rollouts, several large systems modernizations, many custom development gigs – Languages: Java, COBOL, VB, HTML, XML, SQL, JavaScript, Perl, Python, JACL – http://about.me/smithkenny http://about.me/smithkenny

4 www.strongback.us What is Java? Platform neutral programming language Concurrent, class-based, and object oriented Most similar to C/C++ syntax Compiled into bytecode, which is run by a Java Virtual Machine – Write once, run anywhere 4

5 www.strongback.us Why Java on System z? 5  Abundance of Java and Java skills  zAAP Processors - cost effective workload management  Combining of traditional batch with modern frameworks  Access to MVS using the JZOS API

6 www.strongback.us Abundance of Java #1 Programming language – Tiobe– September 2015 – C ranks #2 (frequently trades places with Java) – COBOL ranks #20 – Assembler ranks #11 Ubiquity of architectural frameworks – Unit testing, relational object mapping, security, dependency injection, etc. 6

7 www.strongback.us Java Frameworks Don't reinvent the wheel, just realign it. Anthony J. D'Angelo, The College Blue Book Don't reinvent the wheel, just realign it. Anthony J. D'Angelo, The College Blue Book 7

8 www.strongback.us zAAP Processors – Cost Effective Solution A specialty z processor engine Attractively priced execution environment for web apps Simplifies and reduces server infrastructures Maximizes the value of your mainframe investments Lowers the overall cost of computing for WebSphere Application Server and other Java JIT on the z has greatly increased performance on the z. 8

9 www.strongback.us Where does Java run? The JVM runs in Unix System Services (USS) Source code can be compiled anywhere Class and jar files written to USS directories for running in the JVM Workloads on Java are qualified to run on zAAP processor 9

10 www.strongback.us z/OS z/OS UNIX with Open Systems Interfaces 10 HFS UNIX System Services zFS WLM SMF Language Environment (LE) API (C Functions) Interactive Shell (commands)

11 www.strongback.us z/OS Unix Files Found in Remote Systems View z/OS Unix Files section – Home = your home folder in OMVS Typically /u/username – Root = / (zFS system root folder) – Filters = everything else You specify the settings for the filter z/OS Unix shells – Open one or more Unix shells – Each shell separate from each other

12 www.strongback.us 12 How do I Write Java?

13 www.strongback.us RAD And Java Like RDz, built on Eclipse Can “shell share” with RDz, providing more features than either alone – CICS Web Service Development – Can also shell share with Data Studio Highly effective editors, wizards, and visualization tools Includes Java code review tools (Software Analyzer) Designed to handle Java EE development – Wizards for web development (JSF, JSP, Struts, etc.) – Database development (SQL editors, JPA wizards) – WebSphere Application Server environment 13

14 www.strongback.us RDz Enterprise Tools: Unit Testing JUnit: A unit test framework for Java Built into RAD / Eclipse Tests either pass or fail

15 www.strongback.us RDz Enterprise Tools: Software Analysis Allows you to run a static analysis of the resources with which you are working to detect violations of rules and rule categories. Detects violations of specific programming rules and rule categories and generates a report in the Software Analyzer Results view Code can be viewed in a single interface to analyze each component in a multi-language application…. Java, Cobol and others. 15

16 www.strongback.us Rational Developer for the Enterprise 9.5 Rational Developer for the Enterprise Rational Application Developer for WebSphere Software 9.0 Rational Application Developer Rational Developer for System z 9.5 Rational Developer for System z Rational Developer for AIX and Linux 9.5 C/C++ Edition AIX COBOL Edition Rational Developer for i 9.5 RPG and COBOL Tools RPG and COBOL + Modernization Tools, Java Edition RPG and COBOL + Modernization Tools, EGL Edition Rational Business Developer Rational Business Developer 9.5 Rational Business Developer

17 www.strongback.us Comparing Language Features Java Portable – write once run anywhere Object Oriented Connect to CICS via web services No binding of DB2 required Not column sensitive (> 80 chars) Case Sensitive Strongly typed Can be multi-threaded COBOL Syntax specific to compiler (IBM vs Microfocus, etc.) Procedural Call CICS directly Must bind DB2 Column sensitive Not case sensitive Considered non-typed Single threaded

18 www.strongback.us Unique Java Language Features Object oriented: Polymorphism, Inheritance, Composition, Encapsulation Garbage Collection: automated memory management Secure Interpreted: compiled to bytecode, and bytecode executed by JVM Objects and Classes Case Sensitive! – i.e. Customer != customer 18

19 www.strongback.us 19

20 www.strongback.us Organizing Code: Packages vs PDS Java: PackagesCOBOL: PDS’s 20

21 www.strongback.us Instantiating Variables Java public class YieldInfo(){ BigDecimal startBalance; BigDecimal yield; BigDecimal interest; int days; int years; } COBOL 01 yield-info. 03 start-balance pic 9(9)v9(2) comp. 03 yield pic 9(9)v9(2) comp. 03 interest pic v9(7) comp. 03 days pic 9(9) comp. 03 years pic 9(2) comp. 21

22 www.strongback.us Example Conversion COBOL Copybook Java Class

23 www.strongback.us Java Primitive Data Types 23 Data TypeSize (in bits for numeric)Default Value (for fields) byte80 short160 int320 long640L float32 floating point0.0f double64 floating point0.0d char16 (Unicode)'\u0000' boolean1false Anything else is considered an Object!

24 www.strongback.us Other Common Data Types Integer – object wrapper for int Long – object wrapper for long Short – object wrapper for short String – object wrapper for char BigDecimal - complex object that handles currency – NEVER EVER EVER use floating point arithmetic for currency!!! 24

25 www.strongback.us Typical Java Class Structure Package (1) Import statements (3) Class declaration (5) Class variables (6-8) Constructors (10, 13) Methods (20, 28) 25

26 www.strongback.us General Syntax 26 calls the Team default constructor class name instance variable name class variable Statements end in semicolon Code blocks are surrounded by braces

27 www.strongback.us 27

28 www.strongback.us Windows z/OS Accessing Data, and Systems 28 DB2 MSSQL CICS AIX Java (Batch) MQ JMS JDBC Web Service

29 www.strongback.us Accessing DB2 Data Accessing z/OS DB2 Data is no different than Java on distributed JPA Wizards – Java Persistence Architecture – Makes CRUD operations a breeze! – Hardly any SQL has to be written JDBC – Java Database Connectivity – Old school SQL method Other open source frameworks – iBatis, Hibernate, Spring JDBC Templates, etc. 29

30 www.strongback.us JZOS Java API for developers API = Application Programming Interface A framework acquired by IBM & now part of the IBM JVM Preferred method for MVS file access, data type conversion, MVS Console, etc. Includes a batch launcher Uses JNI / C to access MVS datasets, VSAM files, QSAM files, etc. 30

31 www.strongback.us Unix System Services JZOS API MVS Calling JZOS Batch JVMLDMxx JZOS PROC JZOS JCL Java Runtime Java class PDS JES MC Programmer writes and submits the JCL

32 www.strongback.us JZOS JCL Skeleton Job Card Location of the JVM Proc Execute the generic proc with vars Location of the output Java shell environment setup

33 www.strongback.us Java Generic PROC A parameterized procedure makes it easier to standardize the environment A sample is included in the JDK for z/OS Found under /usr/lpp/java/J7.0_64/mvstools/samples/jcl – Good for most usage, customize for a given specific instance

34 www.strongback.us Robust Approaches to Java Batch 34 JCL launches batch program Programmer may still need to code functions not provided by Launcher Example is z/OS Batch Container Batch Container provides useful functions Programmer may still need to code functions not provided by Container Example is IBM WebSphere Compute Grid Provides batch programming function as services of the platform Allows programmer to focus on the business logic and not develop "custom middleware" function JZOS JVM Launcher z/OS Batch Container WebSphere Batch

35 www.strongback.us 35 Tools for Modern Java Batch (aka ComputeGrid) Brings compute and data intensive batch processing to WAS, sharing the same business logic used by online systems. Framework and tools make writing, running and managing batch applications a snap. Java EE based packaging and deployment. Projects, wizards and editors streamline the development of xJCL and batch classes. Deploy and submit to WAS, with job progress integrated into the IDE’s console. Batch workspace project xJCLApp WAS Container WAS Scheduler Workbench:RADWDTEclipse Has Capability? (Y, N, Partial)YNN

36 www.strongback.us Where Can I Learn More? Strongback Consulting’s Course Offerings: – RDz COBOL, RDz Java (JZOS), RAD, HATS Our blog http://blog.strongbackconsulting.comhttp://blog.strongbackconsulting.com All our JZOS specific links: https://delicious.com/strongback/search/jzoshttps://delicious.com/strongback/search/jzos Rational software links: https://delicious.com/strongback/search/rationalhttps://delicious.com/strongback/search/rational Java generic links: https://delicious.com/strongback/search/javahttps://delicious.com/strongback/search/java *** Delicious.com is a bookmark sharing site. It may be blocked by your IT department, but allows us to share more links than we have room to list here 36

37 www.strongback.us 37

38 www.strongback.us Socialize with us on Facebook & LinkedIn http://www.facebook.com/StrongbackConsulting http://www.facebook.com/StrongbackConsulting http://www.linkedin.com/company/290754 Subscribe to us at http://feeds.feedburner.com/StrongbackConsulting Discover us at: http://www.strongback.us Watch Us at Youtube http://www.youtube.com/user/strongbackconsultinghttp://www.youtube.com/user/strongbackconsulting https://vimeo.com/user7519232 Call us at: 386-232-8746

39 www.strongback.us 39

40 www.strongback.us Class API Overview: Access MVS Datasets – com.ibm.jzos.Zfile – thin wrapper for JNI calls to C I/O library – com.ibm.jzos.FileFactory - platform-portable file access Access HFS/zFS files – java.io, java.nio – standard Java API – com.ibm.jzos.FileFactory Access the MVS Console – com.ibm.jzos.MvsConsole – interface to MVS console and job log Various z/OS native functions – com.ibm.jzos.ZUtil

41 www.strongback.us Calling Java in batch BPXBATCH – The “original” batch java caller. – Best to run non-Java shell commands on Unix System Services – The STDOUT and STDERR DD names are not allocated as MVS data sets JZOS – The modern batch caller – Uses a specific JVM load module

42 www.strongback.us JZOS Batch Jobs are zAAP eligible IDE Integration with RDz, RAD Can run Java based servers as started tasks Full integration into the Job Entry System Jobs run in the same address space Support for DD statements Move stdin, stdout, and stderr to an MVS Dataset Gives a valid return code (other than just 1)


Download ppt "www.strongback.us About Us: Strongback Consulting IBM Advanced Business Partner – Rational, WebSphere, Lotus, Information Management SVP certified – Strongly."

Similar presentations


Ads by Google