SlideShare a Scribd company logo
1 of 72
FOR MORE INFORMATION PLEASE CONTACT
Xact Consulting A/S
Arnold Nielsens Boulevard 68A
DK-2650 Hvidovre
+45 7023 0100
info@xact.dk
www.xact.dk
Enterprise Modernization
Java is a new Language
on the Mainframe
Copenhagen, 8th January 2016
Michael Erichsen,
Xact Consulting A/S,
michael.erichsen@xact.dk
Agenda
• Why Java on z?
• Which kind of language is Java?
• How is Java implemented on z?
• How do I develop mixed language Java applications on z?
• What is the security setup?
• What do I need to learn?
Second Slot after Lunch?
This is surely the Graveyard Shift!
• What do you think
System.exit()
will do?
• What do you think it will do in
CICS?
Second Slot after Lunch?
This is surely the Graveyard Shift!
• Exactly the same as a
COBOL STOP RUN in CICS!
System.exit() in CICS
13.16.28 STC00106 +DFHSJ0214 CICSTS51 019
13:16:28 CICSTS51 A class in a JVM Server has invoked System.exit(). CICS will shut down immediately.
13.16.28 STC00106 +DFHDU0201 CICSTS51 ABOUT TO TAKE SDUMP. DUMPCODE: ASJS , DUMPID:
1/0023
13.16.50 STC00106 +DFHTM1703 CICSTS51 CICS is being terminated by userid CICSUSER in transaction
HT01 at netname SC0TCP29.
13.16.50 STC00106 +DFHMQ0410 I 01/05/2016 13:16:50 CICSTS51 CICS immediate shutdown detected.
Adapter terminated.
13.16.52 STC00106 BPXP018I THREAD 1F8EBC0000000000, IN PROCESS 67174429, ENDED WITHOUT
BEING UNDUBBED WITH COMPLETION CODE 0033E000, AND REASON CODE 00000000.
…
13.17.03 STC00106 +DFHDU0303I CICSTS51 Transaction Dump Data set DFHDMPA closed.
13.17.03 STC00106 +DFHKE1799 CICSTS51 TERMINATION OF CICS IS COMPLETE.
13.17.12 STC00106 $HASP395 CICSTS51 ENDED
FOR MORE INFORMATION PLEASE CONTACT
Xact Consulting A/S
Arnold Nielsens Boulevard 68A
DK-2650 Hvidovre
+45 7023 0100
info@xact.dk
www.xact.dk
Enterprise Modernization
Why Java on z?
Java on the Big Iron
• Open the mainframe to a new generation of developers
• Portability of applications
• Wide choice of open and closed source packages
• Typical use: Non-mixed, Java only
– E.g. in WebSphere, batch, CICS, IMS, or DB2 Stored procedures
COBOL and PL/I are Native to the Mainframe
Java is also Native
It was just born later
Old or New?
• OO is just a way to do some
categories of computing
– Not something given to Moses on
tablets
• The first OO language, Simula,
was formalized in 1962-1965
– Last version 1986
– Latest Java version 8: 2014
• COBOL was formalized in 1959-60
– Latest ISO standard: COBOL 2014
– Latest version 5.2: 2015
10
FOR MORE INFORMATION PLEASE CONTACT
Xact Consulting A/S
Arnold Nielsens Boulevard 68A
DK-2650 Hvidovre
+45 7023 0100
info@xact.dk
www.xact.dk
Enterprise Modernization
What Kind of Language is Java?
COBOL and other 3GL* Words
• The Compiler creates an object
from a source
*) 3GL: Third Generation
Language, like PL/I and COBOL
COBOL and other 3GL Words
• A pseudo-assembler listing is
produced on the way
COBOL and other 3GL Words
• The Binder (Linker) binds the
object into a program object or
load module
.0..............................................................................
0F000000000000000000000000000000000000000000000000000000000000000000000000000000
30000000000000000000000000000000000000000000000000010000000000000000000000000000
------------------------------------------------------------------------------
...............................................................-........HELLOCOB
000000000000000000000000000000000000000000000000000000000000000600000000CCDDDCDC
30000001000000000000000000000000000000000000000000000000000000000000000885336362
------------------------------------------------------------------------------
.........................................@.......................@......C_CEESG0
000000000000000000000000000000000000000008000000000000000000100008000000C6CCCECF
310100020001000000000000000000000000000010000000000000000000030A0030000A3D355270
------------------------------------------------------------------------------
...03...........................................................................
000FF000000000000000000000000000000000000000000000000000000000000000000000000000
32003000000000000000000000000000000000000000000000000000000000000000000000000000
------------------------------------------------------------------------------
...........................ì.............@..............................C_CODE..
000000000000000000000000000500000000000008000000000000000000100000000000C6CDCC00
300100030001000000000000008800000000000010000000000000000000030A003000063D364500
------------------------------------------------------------------------------
........................................................................HELLOCOB
000000000000000000000000000000000000000000000000000000000000100000000000CCDDDCDC
31020004000300000000000000000000000000001000000000000000000000020300000A85336362
COBOL and other 3GL Words
• The loader loads the program
object into storage
• Allocates static storage
• Fixes up relocatable addresses
• Passes over control
IEWPLMH ...Ì......¢............Ì...........ð...........m...h...................
CCEDDDC40007000000B0000000000007000100000008000000000009000800000001000200000004
9567348000083000000000080100000800040200000C00080300000400080400001C000405000010
------------------------------------------------------------------------------
}00..CEE.......-}00.°Öå. .0.qÕ0................ð...q...*...q.......u...¦....ì0C.
4FF10CCC000000064FF09ED041F29EF30F000000000000080009000500090002000A000700005FC1
700413550028006070010C0C10048F047F0000000000007C0068000C00080004007400300000803C
------------------------------------------------------------------------------
æÈxÈ..j@æÈxd...Óx©..ìææ.ìææ.×õAàxd..×õæ.xd..çææ.vF..xó..xÈ..ìæ..ìææ.ìææ.ìæAàìææ.
C7A70398C7A8021EAB025CC05CC0BCC4A801BCC0A8014CC2AC00AC00A7015C015CC05CC05CC45CC0
04740A1004740A2E740780008004FF14740FFF04740B800856007E01740380008000800480148004
------------------------------------------------------------------------------
C_WSA ................................................................
C6EEC444444444440000000000000000000000000000000000000000000000000000000000000000
3D621000000000000000000000000000000000000000000000000000000000000000000000000000
------------------------------------------------------------------------------
...è..........çá<<!ä!â.ñâ(.ä!â!<...................ì.......ë.........ì.......ë..
00050000000000444444440444244444223232300000000000050000000532320000052320000532
0024040000416185CCF3F2092D03F2FC005E1E10000B00000088000023D39849024048889083D398
------------------------------------------------------------------------------
...............LDLDM....@........@.....@.......@................................
000000000000000DCDCD000080000000080000180010000800100000000000000000000000000000
000000000000000343441000000000400000007000E0000000D00000000000000000000000000000
Java Source
• The Compiler compiles source
into bytecode
• There is no linking/binding for
Java
– Each class is loaded separately on
demand
Java Bytecode
• Java bytecode is the instruction
set of the Java virtual machine
• This is a symbolic representation
Compiled from "Hello.java"
public class dk.xact.michael.BatchHello.Hello {
public dk.xact.michael.BatchHello.Hello();
Code:
0: aload_0
1: invokespecial #8 // Method java/lang/Object."<init>":()V
4: return
public static void main(java.lang.String[]);
Code:
0: getstatic #16 // Field
java/lang/System.out:Ljava/io/PrintStream;
3: ldc #22 // String Hello from batch
5: invokevirtual #24 // Method
java/io/PrintStream.println:(Ljava/lang/String;)V
8: return
}
Java Bytecode
• Each bytecode is
composed by one (or
two) bytes that
represent the
instruction
–Along with zero or
more bytes for
passing parameters
ca fe ba be-00 00 00 33-00 22 07 00-02 01 00 20 .......3 ."......
64 6b 2f 78-61 63 74 2f-6d 69 63 68-61 65 6c 2f dk/xact/ michael/
42 61 74 63-68 48 65 6c-6c 6f 2f 48-65 6c 6c 6f BatchHel lo/Hello
07 00 04 01-00 10 6a 61-76 61 2f 6c-61 6e 67 2f ......ja va/lang/
4f 62 6a 65-63 74 01 00-06 3c 69 6e-69 74 3e 01 Object.. .<init>.
00 03 28 29-56 01 00 04-43 6f 64 65-0d 0a 00 03 ..()V... Code....
00 09 0c 00-05 00 06 01-00 0f 4c 69-6e 65 4e 75 ........ ..LineNu
6d 62 65 72-54 61 62 6c-65 01 00 12-4c 6f 63 61 mberTabl e...Loca
6c 56 61 72-69 61 62 6c-65 54 61 62-6c 65 01 00 lVariabl eTable..
04 74 68 69-73 01 00 22-4c 64 6b 2f-78 61 63 74 .this.." Ldk/xact
2f 6d 69 63-68 61 65 6c-2f 42 61 74-63 68 48 65 /michael /BatchHe
6c 6c 6f 2f-48 65 6c 6c-6f 3b 01 00-04 6d 61 69 llo/Hell o;...mai
6e 01 00 16-28 5b 4c 6a-61 76 61 2f-6c 61 6e 67 n...([Lj ava/lang
2f 53 74 72-69 6e 67 3b-29 56 09 00-11 00 13 07 /String; )V......
00 12 01 00-10 6a 61 76-61 2f 6c 61-6e 67 2f 53 .....jav a/lang/S
79 73 74 65-6d 0c 00 14-00 15 01 00-03 6f 75 74 ystem... .....out
01 00 15 4c-6a 61 76 61-2f 69 6f 2f-50 72 69 6e ...Ljava /io/Prin
74 53 74 72-65 61 6d 3b-08 00 17 01-00 10 48 65 tStream; ......He
6c 6c 6f 20-66 72 6f 6d-20 62 61 74-63 68 0d 0a llo.from .batch..
00 19 00 1b-07 00 1a 01-00 13 6a 61-76 61 2f 69 ........ ..java/i
6f 2f 50 72-69 6e 74 53-74 72 65 61-6d 0c 00 1c o/PrintS tream...
Java at Runtime
• The Java Classloader executes these steps for each class:
– Load
• Loading brings the bytecode into the JVM
– Link
• Verification ensures the class/interface is structurally correct
• Preparation involves allocating memory needed by the class/interface
• Resolution resolves symbolic references
– Initialize
• Initialization gives the proper initial values to the class variables
FOR MORE INFORMATION PLEASE CONTACT
Xact Consulting A/S
Arnold Nielsens Boulevard 68A
DK-2650 Hvidovre
+45 7023 0100
info@xact.dk
www.xact.dk
Enterprise Modernization
How is Java implemented on z?
The JVM is a Set of C++ Programs in zFS
Java Native Interface (JNI) is the Bridge
• JNI enables Java code running in a JVM to call and be called by
native applications and libraries written in other languages
• Functionality implemented in separate C or C++ files
– Convert native arrays to/from Java arrays, native strings to/from Java
strings, instantiate objects, throw exceptions, etc.
Sample COBOL JNI Program
PROGRAM-ID. "DBBATCOB" RECURSIVE.
REPOSITORY.
Class DbBatchJava is "DbBatchJava"
Class jstring is "jstring".
WORKING-STORAGE SECTION.
01 parmString OBJECT REFERENCE jstring.
LINKAGE SECTION.
COPY JNI.
PROCEDURE DIVISION.
Set address of JNIEnv to JNIEnvPtr
Set address of JNINativeInterface to JNIEnv
CALL "NewStringPlatform” USING BY VALUE JNIEnvPtr ADDRESS OF input-string
ADDRESS OF parmString 0 RETURNING RC.
INVOKE DbBatchJava "sayHello” USING BY VALUE parmString RETURNING RC.
Sample called Java Program
public class DbBatchJava {
public static int sayHello(String inputString) {
System.out.println("DB Batch Java received " +
inputString);
return 4711;
}
}
JDBC
• JDBC (Java Data Base Connection)
• Lower part implemented as C++
program objects
• Upper part implemented as Java
classes calling through JNI
• Note that the jar files in the
figure are really symbolic links to
the program objects in the /IBM
folder
Which Runtimes?
• Batch
– BPX
– C:OZ
– JZOS
– BCD
• CICS
– JVMServer
• JCICS
• OSGi
• JDBC Type 2 (Local)
• SQLJ (Static)
– Liberty
• PHP
• Mobile
• Servlets
• JSP
• SAML
• JDBC Type 4 (Over TCP/IP)
• DB2
– Stored procedures
• IMS
– JMP
– JDBC
• MQ
– WMQ API
– jms
• WAS
– ”Classic”
– Liberty
• zLinux
All of them!
FOR MORE INFORMATION PLEASE CONTACT
Xact Consulting A/S
Arnold Nielsens Boulevard 68A
DK-2650 Hvidovre
+45 7023 0100
info@xact.dk
www.xact.dk
Enterprise Modernization
Challenges
Theory and Practice
• Processor been optimized for the
JVM
• JVM has been optimized for the
processor
• You should be at the highest level
of both
– Z13 boxes
– Java 8
• In theory performance
comparable between Java and
3GL
Theory and Practice
• In theory, there is no difference between theory and practice
• But, in practice, there is
Theory and Practice
• Theory
– You understand everything
– Nothing works
• Practice
– Everything works
– Nobody knows why
• Here we unite theory and
practice
– Nothing works
– Nobody understands why
Mainframe Issues
• Virtualization conflicts
• JVM load and initalization CPU
usage
• Garbage Collection Policies
• Heap size tunings
Virtualization Conflicts
• Mainframe has excelled in virtual storage and virtual machines
since the 1960’es
– Based on a set of civilized traffic rules in a multi-tenant system
• Java has its own Virtual Machine
– Raised as a spoiled only child with no manners
– Grabs all the storage it can immediately
• Has been handled on z in different ways over time
• JVM on top of Virtual Storage on top of z/OS perhaps on top of
z/VM on top of PR/SM...?
JVM Load and Initialization
• Can take a lot of MIPS
– You should minimize loads
– You should reuse JVM’s
Shared Class Cache
• A shared class area for one or more JVM’s improves startup time
– Lots of classes are already preloaded
• Switch on shared classes with the -Xshareclasses command-line option
– Virtual memory footprint reduction when using more than one JVM
– Loading classes from a populated cache is faster than loading classes from disk
– Improved startup
– Classes are already in memory and partially verified
– Benefits applications that regularly start new JVM instances doing similar tasks
– Cost to populate an empty cache with a single JVM is minimal
• Both relevant for CICS and batch
CICS OSGi middleware bundles
• JVMProfile option OSGI_BUNDLES
• Middleware bundles installed and activated in the OSGi
framework when JVM is initialized
• OSGI_BUNDLES=/u/example/pathToBundleDirectory/B1.jar,
/u/example/pathToBundleDirectory/B2.jar
Storage Differences
• Storage is static in COBOL,
HLASM, PL/I etc.
• Storage is dynamic in Java
• You should not call from Java to
COBOL with an area that has
not yet been allocated by Java
– Storage violations
– Null pointer exceptions
COBOL Storage Allocation
• WORKING-STORAGE normally
allocated from LE heap storage
– If you declare it, it is being
allocated
• LOCAL-STORAGE allocated from
LE stack storage
• External variables allocated from
LE heap storage
• LE stack storage is automatically
created by LE and is used for
routine linkage and automatic
storage
• LE heap storage is dynamically
allocated at a routine's first
request for storage that has a
lifetime not related to the
execution of the current routine
Java Storage Allocation from LE Heap
• The Java heap that garbage collection manages is allocated
during JVM startup as a contiguous area of memory
– Its size is that of the maximum Java heap size parameter
– Allocate for the maximum heap size to ensure that one contiguous
area will be available should heap expansion occur
• Explicit calls to malloc() by the JVM, or by any native JNI (Java
Native Interface) code that is running under that Java process
– This includes application JNI code, and vendor-supplied native
libraries; for example, JDBC drivers
Garbage Collection
• Java normally does not do explicit
allocation and deallocation
• Deallocation done as Garbage
Collection (GC)
– All active objects marked and copied
away
– All unused deleted by compacting
storage
– Done in different pools to handle
short and long lived objects
separately
Garbage Collection Issues
• Pause time
• Pause predictability
• CPU usage
• Memory footprint
– Virtual footprint
– GC interaction with paging and
swapping
• The unimaginable memory leaks
– Unintended object retention
IBM JVM Garbage Collection Policies
• -Xgcpolicy:optthruput
– For “batch” type apps
• -Xgcpolicy:optavgpause
– For apps with responsiveness
criteria
• -Xgcpolicy:gencon
– Highly transactional workloads
• -Xgcpolicy:subpools
– Large systems with allocation
contention
Heap size tuning
• Java heap size tuning is an art
– Small heaps get filled up quickly
• GC runs often
– Large heaps hold a lot of objects
• Each GC takes a long time (”Stop the World”)
– Need tools, measurements, statistics and tuning
• Java heaps lives on top of Language Environment heaps and z/OS
virtual storage
– LE heaps can be measured and tuned
– Paging and swapping can be the result of overallocating heaps
Or you can just buy more Real Storage...
Health Center
• An agent is included in the IBM JVM in recent versions, so you
don’t have to install anything
• A server is part of IBM Support Assistant Team Server
– If you have the authority you can alternatively install it and run it on
your own workstation
• A client can run in a browser or in Eclipse
IBM Support Assistant
Health Center Summary
Health Center CPU Usage
Health Center Garbage Collection
Health Center File I/O
Health Center Profiler
Health Center Thread Analysis
FOR MORE INFORMATION PLEASE CONTACT
Xact Consulting A/S
Arnold Nielsens Boulevard 68A
DK-2650 Hvidovre
+45 7023 0100
info@xact.dk
www.xact.dk
Enterprise Modernization
Development
Plain Java Development
• All Java tools can be used
• Rational Developer for z has
support for special API’s like
JCICS and for OSGi
• The IBM JVM is 100%
compatible with Sun/Oracle
from the development side
– Differences only in JVM
implementation and in toolbox
Addressing Modes
• COBOL runs in 31 bit mode
• Java can run in 31 or 64 bit
mode
• Calling between 31 and 64 bit
programs can yield interesting
results
Java in Batch
• BPX
– Unix batch launcher
• Co:Z
– Executes the Unix program or shell in the same address space, which
simplifies job accounting and allows for the use of resources such as DD
statements by the Unix program
• JZOS
– Java batch launcher
• BCD
– Managed environment for Java
– Allows interoperability with COBOL and PL/I
BPXBATCH and BPXBATSL
• USS batch launcher facilities
– Can launch a JVM in a batch job
• BPXBATCH Limitations
– No flexible configuration of the USS environment for each job
– No condition codes passed
– Separate address space
– No use of DD statements
– Stderr and stdout not written before the step has finished
• BPXBATSL supports DD statements
• C:OZ is an improved solution, supplied as Freeware from Dovetailed
Technologies
JZOS
• Java batch launcher
– Written in Java by Dovetailed Technologies and acquired by IBM
• Call the JZOS batch launcher load module from JCL to create a JVM under
UNIX System Services
• DD statements
– Java main class
– Java version that is needed for this job
– Classpath
– Libpath
– Additional JVM arguments, also from a PDSE member
– JVM Encoding
JZOS Advantages
• Launcher and JVM run in the same address space
• Makes job accounting easier
• Allows the use of DD statements
• System.out.println() and System.err.println() redirected to
SYSOUT and SYSERR
• Easier to integrate in a scheduling environment
z/OS Batch Runtime (BCD)
• Java-focused, platform-neutral programming model
• Managed environment for Java
– Allows interoperability with COBOL and PL/I
– Supports DB2 hybrid applications
• Initialization
– Set up the job step under a Resource Recovery Services (RRS)
managed global transaction
– Call the primary COBOL or Java application after initialization of the
environment
z/OS Batch Runtime (BCD)
• Mixed COBOL/PL/I and Java batch application with a shared
DB2 connection
– Coexistence of SQL, JDBC and SQLJ
– Updates to DB2 are committed in the same unit of work
• Consistent with IBM WebSphere-based batch
• Must run in 31 bit mode, because COBOL and PL/I are 31 bit
• JZOS launches the Java program
com.ibm.zos.batch.container.BCDBatchContainer
that invokes your Java, COBOL and PL/I programs
Seamless Debug in CICS
• COBOL & PL/I
– Connect to DTCN in Host Connections
– Create a DTCN Server Profile
• Java
– Open RDz Debug Configurations
– Start the Remote Java Application pointing to the Java project and
CICS
• Run the transaction in CICS
Seamless debug: COBOL
Seamless debug: Java
Seamless debug: COBOL again
FOR MORE INFORMATION PLEASE CONTACT
Xact Consulting A/S
Arnold Nielsens Boulevard 68A
DK-2650 Hvidovre
+45 7023 0100
info@xact.dk
www.xact.dk
Enterprise Modernization
Security
Batch and CICS Liberty
• EJBROLE
– Member class for Enterprise Java
Beans authorization roles
• GEJBROLE
– Grouping class for Enterprise Java
Beans authorization roles
• JAVA
– Contains profiles that are used by
Java for z/OS applications to
perform authorization checking for
Java for z/OS resources
EJBROLE Examples
• ADMINISTRATOR
• ADMINSECURITYMANAGER
• BBNBASE.deployer
• BBNBASE.CosNamingCreate
• COSNAMINGCREATE
• OPERATOR
• IZUDFLT.*.izuUsers (G)
• isCallerInRole()
• isUserInRole()
CICS JVMServer
• Normal CICS RACF security
– Transactions
– Programs
– Etc.
• Java OSGi Security Manager
– Forbid System.exit()
FOR MORE INFORMATION PLEASE CONTACT
Xact Consulting A/S
Arnold Nielsens Boulevard 68A
DK-2650 Hvidovre
+45 7023 0100
info@xact.dk
www.xact.dk
Enterprise Modernization
Education
What do I need to learn?
• Object Orientation
– Inheritance
– Encapsulation
– Polymorphism
• Java syntax & semantics
• Libraries
– Supplied with Java
– Supplied by IBM
– Open source
• Development tools
– Eclipse
– RDz
– Mapping tools
– ...
• Performance tools
• Site & business specific
knowledge
FOR MORE INFORMATION PLEASE CONTACT
Xact Consulting A/S
Arnold Nielsens Boulevard 68A
DK-2650 Hvidovre
+45 7023 0100
info@xact.dk
www.xact.dk
Enterprise Modernization
Moderniza-
tion
Conversion
Business
Software
Consultants
FOR MORE INFORMATION PLEASE CONTACT
Xact Consulting A/S
Arnold Nielsens Boulevard 68A
DK-2650 Hvidovre
+45 7023 0100
info@xact.dk
www.xact.dk
Enterprise Modernization
Thank you for your attention

More Related Content

What's hot

what is LINUX ? presentation.
what is LINUX ? presentation.what is LINUX ? presentation.
what is LINUX ? presentation.saad_khan1122
 
Linux operating system - Overview
Linux operating system - OverviewLinux operating system - Overview
Linux operating system - OverviewAshita Agrawal
 
Linux operating system ppt
Linux operating system pptLinux operating system ppt
Linux operating system pptAchyut Sinha
 
Features of windows
Features of windowsFeatures of windows
Features of windowsahmreenmalik
 
Software Engineering - Ch17
Software Engineering - Ch17Software Engineering - Ch17
Software Engineering - Ch17Siddharth Ayer
 
Linux; Operating System
Linux; Operating SystemLinux; Operating System
Linux; Operating SystemJayEl Cadawas
 
Ubuntu an absolute beginners guide
Ubuntu an absolute beginners guideUbuntu an absolute beginners guide
Ubuntu an absolute beginners guideCOMSATS
 
Devopsguys DevOps 101 for recruiters
Devopsguys   DevOps 101 for recruitersDevopsguys   DevOps 101 for recruiters
Devopsguys DevOps 101 for recruitersDevOpsGroup
 

What's hot (12)

what is LINUX ? presentation.
what is LINUX ? presentation.what is LINUX ? presentation.
what is LINUX ? presentation.
 
Linux operating system - Overview
Linux operating system - OverviewLinux operating system - Overview
Linux operating system - Overview
 
Linux operating system ppt
Linux operating system pptLinux operating system ppt
Linux operating system ppt
 
Features of windows
Features of windowsFeatures of windows
Features of windows
 
Software Engineering - Ch17
Software Engineering - Ch17Software Engineering - Ch17
Software Engineering - Ch17
 
DevOps for beginners
DevOps for beginnersDevOps for beginners
DevOps for beginners
 
Linux; Operating System
Linux; Operating SystemLinux; Operating System
Linux; Operating System
 
Ubuntu an absolute beginners guide
Ubuntu an absolute beginners guideUbuntu an absolute beginners guide
Ubuntu an absolute beginners guide
 
Operating Systems
Operating SystemsOperating Systems
Operating Systems
 
Devopsguys DevOps 101 for recruiters
Devopsguys   DevOps 101 for recruitersDevopsguys   DevOps 101 for recruiters
Devopsguys DevOps 101 for recruiters
 
DevOps
DevOpsDevOps
DevOps
 
Windows 10
Windows 10Windows 10
Windows 10
 

Similar to Java on the Big Iron: Why, What and How

OpenCV (Open source computer vision)
OpenCV (Open source computer vision)OpenCV (Open source computer vision)
OpenCV (Open source computer vision)Chetan Allapur
 
How to implement a simple dalvik virtual machine
How to implement a simple dalvik virtual machineHow to implement a simple dalvik virtual machine
How to implement a simple dalvik virtual machineChun-Yu Wang
 
Mastering Java Bytecode - JAX.de 2012
Mastering Java Bytecode - JAX.de 2012Mastering Java Bytecode - JAX.de 2012
Mastering Java Bytecode - JAX.de 2012Anton Arhipov
 
Inside the JVM - Follow the white rabbit!
Inside the JVM - Follow the white rabbit!Inside the JVM - Follow the white rabbit!
Inside the JVM - Follow the white rabbit!Sylvain Wallez
 
Web (dis)assembly
Web (dis)assemblyWeb (dis)assembly
Web (dis)assemblyShakacon
 
Eclipse IoT Talk (Montreal JUG)
Eclipse IoT Talk (Montreal JUG)Eclipse IoT Talk (Montreal JUG)
Eclipse IoT Talk (Montreal JUG)Mike Milinkovich
 
Tears for quantum fears
Tears for quantum fearsTears for quantum fears
Tears for quantum fearsMark Carney
 
Starting with OpenCV on i.MX 6 Processors
Starting with OpenCV on i.MX 6 ProcessorsStarting with OpenCV on i.MX 6 Processors
Starting with OpenCV on i.MX 6 ProcessorsToradex
 
Devoxx France: Développement JAVA avec un IDE dans le Cloud: Yes we can !
Devoxx France: Développement JAVA avec un IDE dans le Cloud: Yes we can !Devoxx France: Développement JAVA avec un IDE dans le Cloud: Yes we can !
Devoxx France: Développement JAVA avec un IDE dans le Cloud: Yes we can !Florent BENOIT
 
Creating the open source building blocks for IoT
Creating the open source building blocks for IoT Creating the open source building blocks for IoT
Creating the open source building blocks for IoT Ian Skerrett
 
Developing micro controller applications
Developing micro controller applicationsDeveloping micro controller applications
Developing micro controller applicationsSteve Mylroie
 
Introduction to the Java bytecode - So@t - 20130924
Introduction to the Java bytecode - So@t - 20130924Introduction to the Java bytecode - So@t - 20130924
Introduction to the Java bytecode - So@t - 20130924yohanbeschi
 
Introduction to Micronaut - JBCNConf 2019
Introduction to Micronaut - JBCNConf 2019Introduction to Micronaut - JBCNConf 2019
Introduction to Micronaut - JBCNConf 2019graemerocher
 
Workshop/Tutorial WSO2 Micro Services Server
Workshop/Tutorial WSO2 Micro Services ServerWorkshop/Tutorial WSO2 Micro Services Server
Workshop/Tutorial WSO2 Micro Services ServerEdgar Silva
 

Similar to Java on the Big Iron: Why, What and How (20)

OpenCV (Open source computer vision)
OpenCV (Open source computer vision)OpenCV (Open source computer vision)
OpenCV (Open source computer vision)
 
How to implement a simple dalvik virtual machine
How to implement a simple dalvik virtual machineHow to implement a simple dalvik virtual machine
How to implement a simple dalvik virtual machine
 
Mastering Java Bytecode - JAX.de 2012
Mastering Java Bytecode - JAX.de 2012Mastering Java Bytecode - JAX.de 2012
Mastering Java Bytecode - JAX.de 2012
 
VERY LARGE SCALE INTEGRATION (VLSI) TECHNOLOGY
VERY LARGE SCALE INTEGRATION (VLSI) TECHNOLOGYVERY LARGE SCALE INTEGRATION (VLSI) TECHNOLOGY
VERY LARGE SCALE INTEGRATION (VLSI) TECHNOLOGY
 
Inside the JVM - Follow the white rabbit!
Inside the JVM - Follow the white rabbit!Inside the JVM - Follow the white rabbit!
Inside the JVM - Follow the white rabbit!
 
Web (dis)assembly
Web (dis)assemblyWeb (dis)assembly
Web (dis)assembly
 
Are CPUs VMs Like Any Others? v1.0
Are CPUs VMs Like Any Others? v1.0Are CPUs VMs Like Any Others? v1.0
Are CPUs VMs Like Any Others? v1.0
 
Eclipse IoT Talk (Montreal JUG)
Eclipse IoT Talk (Montreal JUG)Eclipse IoT Talk (Montreal JUG)
Eclipse IoT Talk (Montreal JUG)
 
Tears for quantum fears
Tears for quantum fearsTears for quantum fears
Tears for quantum fears
 
Starting with OpenCV on i.MX 6 Processors
Starting with OpenCV on i.MX 6 ProcessorsStarting with OpenCV on i.MX 6 Processors
Starting with OpenCV on i.MX 6 Processors
 
Above and Beyond JDK 9, 10, 11, 12... - Branko Mihaljević and Martin Žagar on...
Above and Beyond JDK 9, 10, 11, 12... - Branko Mihaljević and Martin Žagar on...Above and Beyond JDK 9, 10, 11, 12... - Branko Mihaljević and Martin Žagar on...
Above and Beyond JDK 9, 10, 11, 12... - Branko Mihaljević and Martin Žagar on...
 
Devoxx France: Développement JAVA avec un IDE dans le Cloud: Yes we can !
Devoxx France: Développement JAVA avec un IDE dans le Cloud: Yes we can !Devoxx France: Développement JAVA avec un IDE dans le Cloud: Yes we can !
Devoxx France: Développement JAVA avec un IDE dans le Cloud: Yes we can !
 
Creating the open source building blocks for IoT
Creating the open source building blocks for IoT Creating the open source building blocks for IoT
Creating the open source building blocks for IoT
 
Developing micro controller applications
Developing micro controller applicationsDeveloping micro controller applications
Developing micro controller applications
 
Python lec1
Python lec1Python lec1
Python lec1
 
Introduction to the Java bytecode - So@t - 20130924
Introduction to the Java bytecode - So@t - 20130924Introduction to the Java bytecode - So@t - 20130924
Introduction to the Java bytecode - So@t - 20130924
 
Java lecture
Java lectureJava lecture
Java lecture
 
Introduction to Micronaut - JBCNConf 2019
Introduction to Micronaut - JBCNConf 2019Introduction to Micronaut - JBCNConf 2019
Introduction to Micronaut - JBCNConf 2019
 
1.Intro--Why Java.pptx
1.Intro--Why Java.pptx1.Intro--Why Java.pptx
1.Intro--Why Java.pptx
 
Workshop/Tutorial WSO2 Micro Services Server
Workshop/Tutorial WSO2 Micro Services ServerWorkshop/Tutorial WSO2 Micro Services Server
Workshop/Tutorial WSO2 Micro Services Server
 

More from Michael Erichsen

How to test a Mainframe Application
How to test a Mainframe ApplicationHow to test a Mainframe Application
How to test a Mainframe ApplicationMichael Erichsen
 
SOA Mainframe Service Architecture and Enablement Practices Best and Worst Pr...
SOA Mainframe Service Architecture and Enablement Practices Best and Worst Pr...SOA Mainframe Service Architecture and Enablement Practices Best and Worst Pr...
SOA Mainframe Service Architecture and Enablement Practices Best and Worst Pr...Michael Erichsen
 
Websphere on z/OS and RACF security
Websphere on z/OS and RACF securityWebsphere on z/OS and RACF security
Websphere on z/OS and RACF securityMichael Erichsen
 
A Natural Web Front End using CICS Transaction Gateway
A Natural Web Front End using CICS Transaction GatewayA Natural Web Front End using CICS Transaction Gateway
A Natural Web Front End using CICS Transaction GatewayMichael Erichsen
 
Automating the Donut Donation
Automating the Donut DonationAutomating the Donut Donation
Automating the Donut DonationMichael Erichsen
 
Through CICS OS/2 with 50 Million Peas an Hour
Through CICS OS/2 with 50 Million Peas an HourThrough CICS OS/2 with 50 Million Peas an Hour
Through CICS OS/2 with 50 Million Peas an HourMichael Erichsen
 
z13: New Opportunities – if you dare!
z13: New Opportunities – if you dare!z13: New Opportunities – if you dare!
z13: New Opportunities – if you dare!Michael Erichsen
 

More from Michael Erichsen (14)

ZCX Hybrid Application
ZCX Hybrid ApplicationZCX Hybrid Application
ZCX Hybrid Application
 
SMP/What?
SMP/What?SMP/What?
SMP/What?
 
ZD&T Survival Kit
ZD&T Survival KitZD&T Survival Kit
ZD&T Survival Kit
 
How to test a Mainframe Application
How to test a Mainframe ApplicationHow to test a Mainframe Application
How to test a Mainframe Application
 
A002 200 yearsofit
A002 200 yearsofitA002 200 yearsofit
A002 200 yearsofit
 
SOA Mainframe Service Architecture and Enablement Practices Best and Worst Pr...
SOA Mainframe Service Architecture and Enablement Practices Best and Worst Pr...SOA Mainframe Service Architecture and Enablement Practices Best and Worst Pr...
SOA Mainframe Service Architecture and Enablement Practices Best and Worst Pr...
 
Gradueret adgang til EPJ
Gradueret adgang til EPJGradueret adgang til EPJ
Gradueret adgang til EPJ
 
Websphere on z/OS and RACF security
Websphere on z/OS and RACF securityWebsphere on z/OS and RACF security
Websphere on z/OS and RACF security
 
A Natural Web Front End using CICS Transaction Gateway
A Natural Web Front End using CICS Transaction GatewayA Natural Web Front End using CICS Transaction Gateway
A Natural Web Front End using CICS Transaction Gateway
 
Automating the Donut Donation
Automating the Donut DonationAutomating the Donut Donation
Automating the Donut Donation
 
Trends but No Directions
Trends but No DirectionsTrends but No Directions
Trends but No Directions
 
Through CICS OS/2 with 50 Million Peas an Hour
Through CICS OS/2 with 50 Million Peas an HourThrough CICS OS/2 with 50 Million Peas an Hour
Through CICS OS/2 with 50 Million Peas an Hour
 
z13: New Opportunities – if you dare!
z13: New Opportunities – if you dare!z13: New Opportunities – if you dare!
z13: New Opportunities – if you dare!
 
Cobol 5 presentation
Cobol 5 presentationCobol 5 presentation
Cobol 5 presentation
 

Recently uploaded

DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about usDynamic Netsoft
 
Test Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendTest Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendArshad QA
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️anilsa9823
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number SystemsJheuzeDellosa
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...harshavardhanraghave
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AIABDERRAOUF MEHENNI
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsAndolasoft Inc
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideChristina Lin
 

Recently uploaded (20)

DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about us
 
Test Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendTest Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and Backend
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number Systems
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
Exploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the ProcessExploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the Process
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
 

Java on the Big Iron: Why, What and How

  • 1. FOR MORE INFORMATION PLEASE CONTACT Xact Consulting A/S Arnold Nielsens Boulevard 68A DK-2650 Hvidovre +45 7023 0100 info@xact.dk www.xact.dk Enterprise Modernization Java is a new Language on the Mainframe Copenhagen, 8th January 2016 Michael Erichsen, Xact Consulting A/S, michael.erichsen@xact.dk
  • 2. Agenda • Why Java on z? • Which kind of language is Java? • How is Java implemented on z? • How do I develop mixed language Java applications on z? • What is the security setup? • What do I need to learn?
  • 3. Second Slot after Lunch? This is surely the Graveyard Shift! • What do you think System.exit() will do? • What do you think it will do in CICS?
  • 4. Second Slot after Lunch? This is surely the Graveyard Shift! • Exactly the same as a COBOL STOP RUN in CICS!
  • 5. System.exit() in CICS 13.16.28 STC00106 +DFHSJ0214 CICSTS51 019 13:16:28 CICSTS51 A class in a JVM Server has invoked System.exit(). CICS will shut down immediately. 13.16.28 STC00106 +DFHDU0201 CICSTS51 ABOUT TO TAKE SDUMP. DUMPCODE: ASJS , DUMPID: 1/0023 13.16.50 STC00106 +DFHTM1703 CICSTS51 CICS is being terminated by userid CICSUSER in transaction HT01 at netname SC0TCP29. 13.16.50 STC00106 +DFHMQ0410 I 01/05/2016 13:16:50 CICSTS51 CICS immediate shutdown detected. Adapter terminated. 13.16.52 STC00106 BPXP018I THREAD 1F8EBC0000000000, IN PROCESS 67174429, ENDED WITHOUT BEING UNDUBBED WITH COMPLETION CODE 0033E000, AND REASON CODE 00000000. … 13.17.03 STC00106 +DFHDU0303I CICSTS51 Transaction Dump Data set DFHDMPA closed. 13.17.03 STC00106 +DFHKE1799 CICSTS51 TERMINATION OF CICS IS COMPLETE. 13.17.12 STC00106 $HASP395 CICSTS51 ENDED
  • 6. FOR MORE INFORMATION PLEASE CONTACT Xact Consulting A/S Arnold Nielsens Boulevard 68A DK-2650 Hvidovre +45 7023 0100 info@xact.dk www.xact.dk Enterprise Modernization Why Java on z?
  • 7. Java on the Big Iron • Open the mainframe to a new generation of developers • Portability of applications • Wide choice of open and closed source packages • Typical use: Non-mixed, Java only – E.g. in WebSphere, batch, CICS, IMS, or DB2 Stored procedures
  • 8. COBOL and PL/I are Native to the Mainframe
  • 9. Java is also Native It was just born later
  • 10. Old or New? • OO is just a way to do some categories of computing – Not something given to Moses on tablets • The first OO language, Simula, was formalized in 1962-1965 – Last version 1986 – Latest Java version 8: 2014 • COBOL was formalized in 1959-60 – Latest ISO standard: COBOL 2014 – Latest version 5.2: 2015 10
  • 11. FOR MORE INFORMATION PLEASE CONTACT Xact Consulting A/S Arnold Nielsens Boulevard 68A DK-2650 Hvidovre +45 7023 0100 info@xact.dk www.xact.dk Enterprise Modernization What Kind of Language is Java?
  • 12. COBOL and other 3GL* Words • The Compiler creates an object from a source *) 3GL: Third Generation Language, like PL/I and COBOL
  • 13. COBOL and other 3GL Words • A pseudo-assembler listing is produced on the way
  • 14. COBOL and other 3GL Words • The Binder (Linker) binds the object into a program object or load module .0.............................................................................. 0F000000000000000000000000000000000000000000000000000000000000000000000000000000 30000000000000000000000000000000000000000000000000010000000000000000000000000000 ------------------------------------------------------------------------------ ...............................................................-........HELLOCOB 000000000000000000000000000000000000000000000000000000000000000600000000CCDDDCDC 30000001000000000000000000000000000000000000000000000000000000000000000885336362 ------------------------------------------------------------------------------ .........................................@.......................@......C_CEESG0 000000000000000000000000000000000000000008000000000000000000100008000000C6CCCECF 310100020001000000000000000000000000000010000000000000000000030A0030000A3D355270 ------------------------------------------------------------------------------ ...03........................................................................... 000FF000000000000000000000000000000000000000000000000000000000000000000000000000 32003000000000000000000000000000000000000000000000000000000000000000000000000000 ------------------------------------------------------------------------------ ...........................ì.............@..............................C_CODE.. 000000000000000000000000000500000000000008000000000000000000100000000000C6CDCC00 300100030001000000000000008800000000000010000000000000000000030A003000063D364500 ------------------------------------------------------------------------------ ........................................................................HELLOCOB 000000000000000000000000000000000000000000000000000000000000100000000000CCDDDCDC 31020004000300000000000000000000000000001000000000000000000000020300000A85336362
  • 15. COBOL and other 3GL Words • The loader loads the program object into storage • Allocates static storage • Fixes up relocatable addresses • Passes over control IEWPLMH ...Ì......¢............Ì...........ð...........m...h................... CCEDDDC40007000000B0000000000007000100000008000000000009000800000001000200000004 9567348000083000000000080100000800040200000C00080300000400080400001C000405000010 ------------------------------------------------------------------------------ }00..CEE.......-}00.°Öå. .0.qÕ0................ð...q...*...q.......u...¦....ì0C. 4FF10CCC000000064FF09ED041F29EF30F000000000000080009000500090002000A000700005FC1 700413550028006070010C0C10048F047F0000000000007C0068000C00080004007400300000803C ------------------------------------------------------------------------------ æÈxÈ..j@æÈxd...Óx©..ìææ.ìææ.×õAàxd..×õæ.xd..çææ.vF..xó..xÈ..ìæ..ìææ.ìææ.ìæAàìææ. C7A70398C7A8021EAB025CC05CC0BCC4A801BCC0A8014CC2AC00AC00A7015C015CC05CC05CC45CC0 04740A1004740A2E740780008004FF14740FFF04740B800856007E01740380008000800480148004 ------------------------------------------------------------------------------ C_WSA ................................................................ C6EEC444444444440000000000000000000000000000000000000000000000000000000000000000 3D621000000000000000000000000000000000000000000000000000000000000000000000000000 ------------------------------------------------------------------------------ ...è..........çá<<!ä!â.ñâ(.ä!â!<...................ì.......ë.........ì.......ë.. 00050000000000444444440444244444223232300000000000050000000532320000052320000532 0024040000416185CCF3F2092D03F2FC005E1E10000B00000088000023D39849024048889083D398 ------------------------------------------------------------------------------ ...............LDLDM....@........@.....@.......@................................ 000000000000000DCDCD000080000000080000180010000800100000000000000000000000000000 000000000000000343441000000000400000007000E0000000D00000000000000000000000000000
  • 16. Java Source • The Compiler compiles source into bytecode • There is no linking/binding for Java – Each class is loaded separately on demand
  • 17. Java Bytecode • Java bytecode is the instruction set of the Java virtual machine • This is a symbolic representation Compiled from "Hello.java" public class dk.xact.michael.BatchHello.Hello { public dk.xact.michael.BatchHello.Hello(); Code: 0: aload_0 1: invokespecial #8 // Method java/lang/Object."<init>":()V 4: return public static void main(java.lang.String[]); Code: 0: getstatic #16 // Field java/lang/System.out:Ljava/io/PrintStream; 3: ldc #22 // String Hello from batch 5: invokevirtual #24 // Method java/io/PrintStream.println:(Ljava/lang/String;)V 8: return }
  • 18. Java Bytecode • Each bytecode is composed by one (or two) bytes that represent the instruction –Along with zero or more bytes for passing parameters ca fe ba be-00 00 00 33-00 22 07 00-02 01 00 20 .......3 ."...... 64 6b 2f 78-61 63 74 2f-6d 69 63 68-61 65 6c 2f dk/xact/ michael/ 42 61 74 63-68 48 65 6c-6c 6f 2f 48-65 6c 6c 6f BatchHel lo/Hello 07 00 04 01-00 10 6a 61-76 61 2f 6c-61 6e 67 2f ......ja va/lang/ 4f 62 6a 65-63 74 01 00-06 3c 69 6e-69 74 3e 01 Object.. .<init>. 00 03 28 29-56 01 00 04-43 6f 64 65-0d 0a 00 03 ..()V... Code.... 00 09 0c 00-05 00 06 01-00 0f 4c 69-6e 65 4e 75 ........ ..LineNu 6d 62 65 72-54 61 62 6c-65 01 00 12-4c 6f 63 61 mberTabl e...Loca 6c 56 61 72-69 61 62 6c-65 54 61 62-6c 65 01 00 lVariabl eTable.. 04 74 68 69-73 01 00 22-4c 64 6b 2f-78 61 63 74 .this.." Ldk/xact 2f 6d 69 63-68 61 65 6c-2f 42 61 74-63 68 48 65 /michael /BatchHe 6c 6c 6f 2f-48 65 6c 6c-6f 3b 01 00-04 6d 61 69 llo/Hell o;...mai 6e 01 00 16-28 5b 4c 6a-61 76 61 2f-6c 61 6e 67 n...([Lj ava/lang 2f 53 74 72-69 6e 67 3b-29 56 09 00-11 00 13 07 /String; )V...... 00 12 01 00-10 6a 61 76-61 2f 6c 61-6e 67 2f 53 .....jav a/lang/S 79 73 74 65-6d 0c 00 14-00 15 01 00-03 6f 75 74 ystem... .....out 01 00 15 4c-6a 61 76 61-2f 69 6f 2f-50 72 69 6e ...Ljava /io/Prin 74 53 74 72-65 61 6d 3b-08 00 17 01-00 10 48 65 tStream; ......He 6c 6c 6f 20-66 72 6f 6d-20 62 61 74-63 68 0d 0a llo.from .batch.. 00 19 00 1b-07 00 1a 01-00 13 6a 61-76 61 2f 69 ........ ..java/i 6f 2f 50 72-69 6e 74 53-74 72 65 61-6d 0c 00 1c o/PrintS tream...
  • 19. Java at Runtime • The Java Classloader executes these steps for each class: – Load • Loading brings the bytecode into the JVM – Link • Verification ensures the class/interface is structurally correct • Preparation involves allocating memory needed by the class/interface • Resolution resolves symbolic references – Initialize • Initialization gives the proper initial values to the class variables
  • 20. FOR MORE INFORMATION PLEASE CONTACT Xact Consulting A/S Arnold Nielsens Boulevard 68A DK-2650 Hvidovre +45 7023 0100 info@xact.dk www.xact.dk Enterprise Modernization How is Java implemented on z?
  • 21. The JVM is a Set of C++ Programs in zFS
  • 22. Java Native Interface (JNI) is the Bridge • JNI enables Java code running in a JVM to call and be called by native applications and libraries written in other languages • Functionality implemented in separate C or C++ files – Convert native arrays to/from Java arrays, native strings to/from Java strings, instantiate objects, throw exceptions, etc.
  • 23. Sample COBOL JNI Program PROGRAM-ID. "DBBATCOB" RECURSIVE. REPOSITORY. Class DbBatchJava is "DbBatchJava" Class jstring is "jstring". WORKING-STORAGE SECTION. 01 parmString OBJECT REFERENCE jstring. LINKAGE SECTION. COPY JNI. PROCEDURE DIVISION. Set address of JNIEnv to JNIEnvPtr Set address of JNINativeInterface to JNIEnv CALL "NewStringPlatform” USING BY VALUE JNIEnvPtr ADDRESS OF input-string ADDRESS OF parmString 0 RETURNING RC. INVOKE DbBatchJava "sayHello” USING BY VALUE parmString RETURNING RC.
  • 24. Sample called Java Program public class DbBatchJava { public static int sayHello(String inputString) { System.out.println("DB Batch Java received " + inputString); return 4711; } }
  • 25. JDBC • JDBC (Java Data Base Connection) • Lower part implemented as C++ program objects • Upper part implemented as Java classes calling through JNI • Note that the jar files in the figure are really symbolic links to the program objects in the /IBM folder
  • 26. Which Runtimes? • Batch – BPX – C:OZ – JZOS – BCD • CICS – JVMServer • JCICS • OSGi • JDBC Type 2 (Local) • SQLJ (Static) – Liberty • PHP • Mobile • Servlets • JSP • SAML • JDBC Type 4 (Over TCP/IP) • DB2 – Stored procedures • IMS – JMP – JDBC • MQ – WMQ API – jms • WAS – ”Classic” – Liberty • zLinux All of them!
  • 27. FOR MORE INFORMATION PLEASE CONTACT Xact Consulting A/S Arnold Nielsens Boulevard 68A DK-2650 Hvidovre +45 7023 0100 info@xact.dk www.xact.dk Enterprise Modernization Challenges
  • 28. Theory and Practice • Processor been optimized for the JVM • JVM has been optimized for the processor • You should be at the highest level of both – Z13 boxes – Java 8 • In theory performance comparable between Java and 3GL
  • 29. Theory and Practice • In theory, there is no difference between theory and practice • But, in practice, there is
  • 30. Theory and Practice • Theory – You understand everything – Nothing works • Practice – Everything works – Nobody knows why • Here we unite theory and practice – Nothing works – Nobody understands why
  • 31. Mainframe Issues • Virtualization conflicts • JVM load and initalization CPU usage • Garbage Collection Policies • Heap size tunings
  • 32. Virtualization Conflicts • Mainframe has excelled in virtual storage and virtual machines since the 1960’es – Based on a set of civilized traffic rules in a multi-tenant system • Java has its own Virtual Machine – Raised as a spoiled only child with no manners – Grabs all the storage it can immediately • Has been handled on z in different ways over time • JVM on top of Virtual Storage on top of z/OS perhaps on top of z/VM on top of PR/SM...?
  • 33. JVM Load and Initialization • Can take a lot of MIPS – You should minimize loads – You should reuse JVM’s
  • 34. Shared Class Cache • A shared class area for one or more JVM’s improves startup time – Lots of classes are already preloaded • Switch on shared classes with the -Xshareclasses command-line option – Virtual memory footprint reduction when using more than one JVM – Loading classes from a populated cache is faster than loading classes from disk – Improved startup – Classes are already in memory and partially verified – Benefits applications that regularly start new JVM instances doing similar tasks – Cost to populate an empty cache with a single JVM is minimal • Both relevant for CICS and batch
  • 35. CICS OSGi middleware bundles • JVMProfile option OSGI_BUNDLES • Middleware bundles installed and activated in the OSGi framework when JVM is initialized • OSGI_BUNDLES=/u/example/pathToBundleDirectory/B1.jar, /u/example/pathToBundleDirectory/B2.jar
  • 36. Storage Differences • Storage is static in COBOL, HLASM, PL/I etc. • Storage is dynamic in Java • You should not call from Java to COBOL with an area that has not yet been allocated by Java – Storage violations – Null pointer exceptions
  • 37. COBOL Storage Allocation • WORKING-STORAGE normally allocated from LE heap storage – If you declare it, it is being allocated • LOCAL-STORAGE allocated from LE stack storage • External variables allocated from LE heap storage • LE stack storage is automatically created by LE and is used for routine linkage and automatic storage • LE heap storage is dynamically allocated at a routine's first request for storage that has a lifetime not related to the execution of the current routine
  • 38. Java Storage Allocation from LE Heap • The Java heap that garbage collection manages is allocated during JVM startup as a contiguous area of memory – Its size is that of the maximum Java heap size parameter – Allocate for the maximum heap size to ensure that one contiguous area will be available should heap expansion occur • Explicit calls to malloc() by the JVM, or by any native JNI (Java Native Interface) code that is running under that Java process – This includes application JNI code, and vendor-supplied native libraries; for example, JDBC drivers
  • 39. Garbage Collection • Java normally does not do explicit allocation and deallocation • Deallocation done as Garbage Collection (GC) – All active objects marked and copied away – All unused deleted by compacting storage – Done in different pools to handle short and long lived objects separately
  • 40. Garbage Collection Issues • Pause time • Pause predictability • CPU usage • Memory footprint – Virtual footprint – GC interaction with paging and swapping • The unimaginable memory leaks – Unintended object retention
  • 41. IBM JVM Garbage Collection Policies • -Xgcpolicy:optthruput – For “batch” type apps • -Xgcpolicy:optavgpause – For apps with responsiveness criteria • -Xgcpolicy:gencon – Highly transactional workloads • -Xgcpolicy:subpools – Large systems with allocation contention
  • 42. Heap size tuning • Java heap size tuning is an art – Small heaps get filled up quickly • GC runs often – Large heaps hold a lot of objects • Each GC takes a long time (”Stop the World”) – Need tools, measurements, statistics and tuning • Java heaps lives on top of Language Environment heaps and z/OS virtual storage – LE heaps can be measured and tuned – Paging and swapping can be the result of overallocating heaps
  • 43. Or you can just buy more Real Storage...
  • 44. Health Center • An agent is included in the IBM JVM in recent versions, so you don’t have to install anything • A server is part of IBM Support Assistant Team Server – If you have the authority you can alternatively install it and run it on your own workstation • A client can run in a browser or in Eclipse
  • 48. Health Center Garbage Collection
  • 52. FOR MORE INFORMATION PLEASE CONTACT Xact Consulting A/S Arnold Nielsens Boulevard 68A DK-2650 Hvidovre +45 7023 0100 info@xact.dk www.xact.dk Enterprise Modernization Development
  • 53. Plain Java Development • All Java tools can be used • Rational Developer for z has support for special API’s like JCICS and for OSGi • The IBM JVM is 100% compatible with Sun/Oracle from the development side – Differences only in JVM implementation and in toolbox
  • 54. Addressing Modes • COBOL runs in 31 bit mode • Java can run in 31 or 64 bit mode • Calling between 31 and 64 bit programs can yield interesting results
  • 55. Java in Batch • BPX – Unix batch launcher • Co:Z – Executes the Unix program or shell in the same address space, which simplifies job accounting and allows for the use of resources such as DD statements by the Unix program • JZOS – Java batch launcher • BCD – Managed environment for Java – Allows interoperability with COBOL and PL/I
  • 56. BPXBATCH and BPXBATSL • USS batch launcher facilities – Can launch a JVM in a batch job • BPXBATCH Limitations – No flexible configuration of the USS environment for each job – No condition codes passed – Separate address space – No use of DD statements – Stderr and stdout not written before the step has finished • BPXBATSL supports DD statements • C:OZ is an improved solution, supplied as Freeware from Dovetailed Technologies
  • 57. JZOS • Java batch launcher – Written in Java by Dovetailed Technologies and acquired by IBM • Call the JZOS batch launcher load module from JCL to create a JVM under UNIX System Services • DD statements – Java main class – Java version that is needed for this job – Classpath – Libpath – Additional JVM arguments, also from a PDSE member – JVM Encoding
  • 58. JZOS Advantages • Launcher and JVM run in the same address space • Makes job accounting easier • Allows the use of DD statements • System.out.println() and System.err.println() redirected to SYSOUT and SYSERR • Easier to integrate in a scheduling environment
  • 59. z/OS Batch Runtime (BCD) • Java-focused, platform-neutral programming model • Managed environment for Java – Allows interoperability with COBOL and PL/I – Supports DB2 hybrid applications • Initialization – Set up the job step under a Resource Recovery Services (RRS) managed global transaction – Call the primary COBOL or Java application after initialization of the environment
  • 60. z/OS Batch Runtime (BCD) • Mixed COBOL/PL/I and Java batch application with a shared DB2 connection – Coexistence of SQL, JDBC and SQLJ – Updates to DB2 are committed in the same unit of work • Consistent with IBM WebSphere-based batch • Must run in 31 bit mode, because COBOL and PL/I are 31 bit • JZOS launches the Java program com.ibm.zos.batch.container.BCDBatchContainer that invokes your Java, COBOL and PL/I programs
  • 61. Seamless Debug in CICS • COBOL & PL/I – Connect to DTCN in Host Connections – Create a DTCN Server Profile • Java – Open RDz Debug Configurations – Start the Remote Java Application pointing to the Java project and CICS • Run the transaction in CICS
  • 65. FOR MORE INFORMATION PLEASE CONTACT Xact Consulting A/S Arnold Nielsens Boulevard 68A DK-2650 Hvidovre +45 7023 0100 info@xact.dk www.xact.dk Enterprise Modernization Security
  • 66. Batch and CICS Liberty • EJBROLE – Member class for Enterprise Java Beans authorization roles • GEJBROLE – Grouping class for Enterprise Java Beans authorization roles • JAVA – Contains profiles that are used by Java for z/OS applications to perform authorization checking for Java for z/OS resources
  • 67. EJBROLE Examples • ADMINISTRATOR • ADMINSECURITYMANAGER • BBNBASE.deployer • BBNBASE.CosNamingCreate • COSNAMINGCREATE • OPERATOR • IZUDFLT.*.izuUsers (G) • isCallerInRole() • isUserInRole()
  • 68. CICS JVMServer • Normal CICS RACF security – Transactions – Programs – Etc. • Java OSGi Security Manager – Forbid System.exit()
  • 69. FOR MORE INFORMATION PLEASE CONTACT Xact Consulting A/S Arnold Nielsens Boulevard 68A DK-2650 Hvidovre +45 7023 0100 info@xact.dk www.xact.dk Enterprise Modernization Education
  • 70. What do I need to learn? • Object Orientation – Inheritance – Encapsulation – Polymorphism • Java syntax & semantics • Libraries – Supplied with Java – Supplied by IBM – Open source • Development tools – Eclipse – RDz – Mapping tools – ... • Performance tools • Site & business specific knowledge
  • 71. FOR MORE INFORMATION PLEASE CONTACT Xact Consulting A/S Arnold Nielsens Boulevard 68A DK-2650 Hvidovre +45 7023 0100 info@xact.dk www.xact.dk Enterprise Modernization Moderniza- tion Conversion Business Software Consultants
  • 72. FOR MORE INFORMATION PLEASE CONTACT Xact Consulting A/S Arnold Nielsens Boulevard 68A DK-2650 Hvidovre +45 7023 0100 info@xact.dk www.xact.dk Enterprise Modernization Thank you for your attention

Editor's Notes

  1. Components are inherent for both paradigms