Automatic Performance
Improvement for Legacy COBOL
Session 1810
Notices and Disclaimers
1
Copyright © 2016 by International Business Machines Corporation (IBM). No part of this documentmaybe reproduced or transmitted in any form withoutwritten permission
from IBM.
U.S. Government Users Restricted Rights - Use, duplication or disclosure restrictedby GSA ADP Schedule Contract with IBM.
Information in these presentations (including information relating to products thathave not yet been announced byIBM) has been reviewed for accuracy as of the date of
initial publication and could include unintentional technical or typographical errors.IBM shall have no responsibilityto update this information.THIS DOCUMENT IS
DISTRIBUTED "AS IS" WITHOUT ANY WARRANTY, EITHER EXPRESS OR IMPLIED. IN NO EVENT SHALL IBM BE LIABLE FOR ANY DAMAGE ARISING FROM THE
USE OF THIS INFORMATION, INCLUDING BUT NOT LIMITED TO, LOSS OF DATA, BUSINESS INTERRUPTION, LOSS OF PROFIT OR LOSS OF OPPORTUNITY.
IBM products and services are warranted according to the terms and conditions ofthe agreements under which they are provided.
Any statements regarding IBM's future direction, intent or product plans are subject to change or withdrawalwithout notice.
Performance data contained herein was generallyobtained in a controlled,isolated environments. Customer examples are presented as illustrations ofhow those customers
have used IBM products and the results they may have achieved. Actual performance,cost,savings or other results in other operating environments mayvary.
References in this documentto IBM products,programs,or services does notimplythat IBM intends to make such products,programs or services available in all countries in
which IBM operates or does business.
Workshops,sessions and associated materials mayhave been prepared by independentsession speakers,and do not necessarilyreflectthe views of IBM. All materials
and discussions are provided for informational purposes only,and are neither intended to, nor shall constitute legal or other guidance or advice to any individual participantor
their specific situation.
It is the customer’s responsibilityto insure its own compliance with legal requirements and to obtain advice of competentlegal counsel as to the identification and
interpretation of any relevant laws and regulatory requirements thatmayaffect the customer’s business and anyactions the customer mayneed to take to complywith such
laws. IBM does notprovide legal advice or representor warrant that its services or products will ensure thatthe customer is in compliance with anylaw
Notices and Disclaimers Con’t.
2
Information concerning non-IBMproducts was obtained from the suppliers ofthose products,their published announcements or other publiclyavailable sources. IBM has not
tested those products in connection with this publication and cannotconfirm the accuracy of performance,compatibilityor any other claims related to non-IBM products.
Questions on the capabilities ofnon-IBM products should be addressed to the suppliers ofthose products.IBM does notwarrantthe quality of any third-party products,or the
ability of any such third-party products to interoperate with IBM’s products. IBM EXPRESSLY DISCLAIMS ALL WARRANTIES, EXPRESSED OR IMPLIED, INCLUDINGBUT
NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
The provision of the information contained h erein is notintended to, and does not, grantany right or license under anyIBM patents,copyrights,trademarks or other intellectual
property right.
IBM, the IBM logo,ibm.com,Aspera®,Bluemix,Blueworks Live,CICS, Clearcase,Cognos®,DOORS®,Emptoris®,Enterprise DocumentManagementSystem™,FASP®,
FileNet®,Global Business Services ®,Global Technology Services ®, IBM ExperienceOne™,IBM SmartCloud®,IBM Social Business®,Information on Demand,ILOG,
Maximo®, MQIntegrator®, MQSeries®,Netcool®, OMEGAMON, OpenPower,PureAnalytics™, PureApplication®,pureCluster™,PureCoverage®, PureData®,
PureExperience®,PureFlex®, pureQuery®, pureScale®,PureSystems®,QRadar®,Rational®,Rhapsody®,Smarter Commerce®,SoDA,SPSS, Sterling Commerce®,
StoredIQ, Tealeaf®,Tivoli®, Trusteer®,Unica®,urban{code}®,Watson,WebSphere®,Worklight®,X-Force® and System z® Z/OS, are trademarks ofInternational Business
Machines Corporation,registered in manyjurisdictions worldwide.Other product and service names mightbe trademarks ofIBM or other companies.A current listof IBM
trademarks is available on the Web at "Copyright and trademark information"at: www.ibm.com/legal/copytrade.shtml.
Please Note:
3
• IBM’s statements regarding its plans, directions, and intent are subject to change or withdrawal without notice at IBM’s sole
discretion.
• Information regarding potential future products is intended to outline our general product direction and it should not be relied on in
making a purchasing decision.
• The information mentioned regarding potential future products is not a commitment, promise, or legal obligation to deliver any
material, code or functionality. Information about potential future products may not be incorporated into any contract.
• The development, release, and timing of any future features or functionality described for our products remains at our sole discretion.
• Performance is based on measurements and projections using standard IBM benchmarks in a controlled environment. The actual
throughput or performance that any user will experience will vary depending upon many factors, including 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 results similar to those stated here.
IBM Automatic Binary Optimizer (ABO) for z/OS
Overview: z/OS 2.2 Release Nov. 2015; z/OS 2.1: Feb. 19, 2016
• ABO improves performance of already compiled COBOL V3 & V4 programs
• Optimize directly from the compiled program
• No source level migration or recompilation or options tuning required
• Leverage latest advanced COBOL optimization technology
• Generate code to target latest z Systems (e.g. zEC12, zBC12, z13 & z13s)
• Support in z/OS® 2.2 to automatically load optimized modules to target latest z
Systems
4
ABO
Original Program Binaries
(Base ESA390)
Optimized Program Binaries
(Latest z Systems)
ABO and COBOL Compiler:
Complementary Tools
5
Use Case ABO COBOL
Compiler
Significant Performance Improvement*
*No Source, Migration or Options Tuning Required 
Interoperability/Legacy Compatibility: PDS supported, pre-Enterprise COBOL etc.

Built in Support for Targeting Multiple Hardware Levels At Deployment

No need to downgrade ARCH setting to match DR* machine
Original compiled program always available for DR 
New COBOL development and new features

Maintenance on existing COBOL programs

Maximum Performance Improvement*
*Source, Migration and Options Tuning Required

*DR  Disaster Recovery Machine : Down level machine used for emergency situations. Usually 1 or 2 revisions old so puts limits
on Compiler ARCH setting (and performance improvements possible) based on this older level
Compatibility and Testing
6
ABO consumes the original
binary so the exact behavior
of the original program is
known vs the documented
“correct” behavior when
compiling from source
No compiler options
(performance or otherwise)
are changing
The optimized program
looks/behaves as the
original program from the
outside (but faster!) so no
interoperability concerns
with other programs
Strong compatibility guarantee for the modules produced by ABO
InteroperabilityUnchanged
Options
Binary As
Input
If something goes wrong using the optimized module revert to using original
program and call IBM
Failure
Scenario
The recommendedtesting focus should be on performance and scalability (less
on business logic)Testing
Tooling Support
• IBM Problem Determination Tools for z/OS
support includes:
– Fault Analyzer (FA) for z/OS
– Debug Tool (DT) for z/OS
– Application Performance Analyzer (APA) for
z/OS
• Several 3rd party tooling vendors were
involved in our beta program this year
– Please contact your tools vendor directly to
ask about support for ABO
7
APA
FA
DT
ABO Supports Tooling Infrastructure
8
COBOL v4.2 compiler listing:
000027 COMPUTE
00042C F247 D110 8000 PACK 272(5,13),0(8,8) TS2=0 WS-VAR-1
000432 960F D114 OI 276(13),X'0F' TS2=4
000436 F247 D118 8008 PACK 280(5,13),8(8,8) TS2=8 WS-VAR-2
00043C 960F D11C OI 284(13),X'0F' TS2=12
000440 FA44 D110 D118 AP 272(5,13),280(5,13) TS2=0 TS2=8
000446 F374 8010 D110 UNPK 16(8,8),272(5,13) WS-VAR-3 TS2=0
00044C 96F0 8017 OI 23(8),X'F0' WS-VAR-3+7
Listing Transform:
00042C PACK 272(5,13),0(8,8)
000432 OI 276(13),15
0004C4 ED07 4000 00AA 00042C CDZT FP0,_WSA[0x12c] 0(8,R4),0x0
000436 PACK 280(5,13),8(8,8)
00043C OI 284(13),15
0004CA ED07 4008 10AA 000436 CDZT FP1,_WSA[0x12c] 8(8,R4),0x0
000440 AP 272(5,13),280(5,13)
0004D0 B3D2 1000 000440 ADTR FP0,FP0,FP1
000446 UNPK 16(8,8),272(5,13)
00044C OI 23(8),240
0004D4 ED07 4010 00A8 00044C CZDT FP0, 16(8,R4),0x0
COBOL Program:
000027 COMPUTE WS-VAR-3 = WS-VAR-1 + WS-VAR-2.
Input “source” instructions. Starts at column 1
Optimized Instructions. Starts at column 5
LEGEND:
Source Line number in original program.
CSECT offset of instruction generated by COBOL 4.2
Compiler
CSECT offset of instructions generated by ABO
Each optimized instruction generated is also
annotated with the “source” offset that it was
generated for
Allows tracking as instructions are re-ordered
Whole Program Optimization
9
• Unbind
• Binary  IR*
Internal
Verification
• Optimize
• Optimize
• Optimize…
Internal
Verification • IR Binary
• Rebind
Done
Optimized
Executable
CSECT1 … CSECTN
Original
Executable
CSECT1 … CSECTN
*IR - Intermediate Representation
User Scenarios
ABO
Optimization
Configuration
z/OS
Example 1 : Binary Optimization Process
Optimization, Test and Static Selection
z/OS 2.1/2.2
Selected Compiled Application
Binaries
(e.g. Performance Sensitive)
1) Optimize and Test Application
ABO
2) Static Selection: Load + Run Application
JCL
Generates
Testing*
Validates
Loads + Runs
Optimized Application
Binaries (+debug metadata)
Optimized + Original
Application
Binaries
*Testing focuson performance/scalability
and less on business logic
Modified JCL
Pointing To Optimized +
Original Application Binaries
ChangeManagement
Example 2: Binary Optimization Process
Optimization, Test and Dynamic Selection
Selected Compiled Application
Binaries
(e.g. Performance Sensitive)
1) Optimize and Test Application
ABO
2) Load + Run Application
JCL
Generates
Validates
ChangeManagement
Loads + Runs
Optimized + Original
Application
Binaries
Original JCL
Pointing Only to Original
Application Binaries
z/OS 2.2
Optimization
Product
Infrastructure
Optimization
Configuration
*Testing focuson performance/scalability
and less on business logic
Optimized Application
Binaries (+debug metadata)
Testing*
* SMF for tracking changes in Optimization configuration
SMF*
Performance:
Internal Benchmark Suite And Early Customer Results
• Early customer results show performance gains of 5%  21% for a mix of v3 and v4
compiled input programs
• On internal benchmarks: 34% improvement.
• Performance gains will vary by application but expected to average 15%
13
*Performance data contained herein was generally obtained in a controlled, isolated environments. Customer examples are
presented as illustrations of how those customers have used IBM products and the results they may have achieved. Actual
performance, cost, savings or other results in other operating environments may vary.
Performance Example: Numeric Edited MOVE
2.35x (57%) Faster
14
01 WS-VAR-1 PIC S9(9)V99 COMP-3.
01 WS-VAR-2 PIC ZZZ,ZZZ,ZZ9.99.
MOVE WS-VAR-1 to WS-VAR-2
Automatic Binary Optimizer
Decompose editbehaviorto a longer but
much faster sequence
TP 0(6,R4)
...
UNPK 340(11,R10),0(6,R4)
IIHF R1,1075847200
OI 350(,R10),X'F0'
IILF R1,1797267488
...
ICM R1,X'3',349(,R10)
CDPT FP0,0(6,R4),0x8
STCM R1,X'7',284(,R5)
...
V4 OPT(FULL)
Uses traditional ED (edit)instruction
MVC 272(15,13),103(10)
L 2,300(0,9
ED 272(15,13),0(2)
MVC 8(14,2),273(13)
Performance Example: Decimal To Float MOVE
3.97x (75%) Faster
15
01 WS-VAR-1 PIC S9(7)V99.
01 WS-VAR-2 comp-2.
MOVE WS-VAR-1 to WS-VAR-2
Automatic Binary Optimizer
Decimal to floatconversion is inlined usinga
more efficientalgorithm
CVB R0,340(,R10)
LD FP8,256(,R7)
CXFR FP0,R6
DXR FP4,FP8
...
AXR FP4,FP0
LDXR FP0,FP4
V4 OPT(FULL)
LibraryCall for decimalto floatconversion
Runtime path length is > 100 instructions
L 3,92(0,9)
L 15,268(0,3) V(IGZCFPC )
LA 1,227(0,10)
BASR 14,15
MVC 16(8,2),272(13)
Thank You
Your Feedback is Important!
Access the InterConnect 2016 Conference Attendee
Portal to complete your session surveys from your
smartphone,
laptop or conference kiosk.
Example 1 In Depth: Binary Optimization Process
Optimization, Test and Static Selection
Selected Compiled
Application
Binaries
1) Optimize and Test Application
ABO Testing
Optimized
Application
Binaries
 Using ABO in the static
selection case is a
matter of selecting
compiled programs to
optimize by using
straightforward new JCL
//OPTIMIZE JOB
//OPT EXEC PGM=BOZOPT,REGION=0M
//STEPLIB DD DSN=$HLQ.BOZ110.SBOZMOD1,DISP=SHR
//SYSPRINT DD DSN=$HLQ.BOZOUT.LISTING,DISP=SHR
//SYSIN DD *
BOPT IN=$HLQ.IN.LOAD(M*) OUT=$HLQ.OUT.LOAD.ZEC12 ARCH=10
BOPT IN=$HLQ.IN.LOAD(M*) OUT=$HLQ.OUT.LOAD.Z13 ARCH=11
JCL to compile all M* members from
IN.LOAD to an OUT.LOAD for zEC12
and one for z13
Example 1 In Depth: Binary Optimization Process
Optimization, Test and Static Selection (targeting multiple hardware levels)
z/OS 2.2/2.1
2) Static Selection
JCL
Loads + Runs
Optimized + Original Application
Binaries
Modified JCL
Pointing To Optimized + Original
Application Binaries
 Static selection requires
modifications to all JCL that
contained the original
modules(s) to be updated to
point to new modules(s) for
each architecture being
targeted
...
//STEPLIB DD DSN=$HLQ.OUT.LOAD.ZEC12:$HLQ.IN.LOAD,DISP=SHR
...
...
//STEPLIB DD DSN=$HLQ.OUT.LOAD.Z13:$HLQ.IN.LOAD,DISP=SHR
...
z13
zEC12
Example 2 In Depth: Binary Optimization Process
Optimization, Test and Dynamic Selection
Selected Compiled
Application
Binaries
1) Optimize and Test Application
ABO Testing
Optimized Application
Binaries (+debug
metadata)
 Using ABO in the
dynamic selection case
only requires ‘pointing’
to active configuration
by specifying IEFOPZ in
JCL
Optimization
Configuratio
n
OLDNEW (
OWNER(IBM)
OLD( DSNAME (HLQ.IN.LOAD) )
NEW( DSNAME (HLQ.OUT.LOAD.ZEC12) ARCH(10) )
NEW( DSNAME (HLQ.OUT.LOAD.Z13) ARCH(11) )
INCLUDEMEMBERS(M*)
INACTIVE )
//OPTIMIZE JOB
//OPT EXEC PGM=BOZOPT,REGION=0M
//STEPLIB DD DSN=$HLQ.BOZ110.SBOZMOD1,DISP=SHR
//SYSPRINT DD DSN=$HLQ.BOZOUT.LISTING,DISP=SHR
//SYSIN DD *
IEFOPZ
Example 2 In Depth: Binary Optimization Process
Optimization, Test and Dynamic Selection (targeting multiple hardware levels)
2) Load + Run Application
JCL
zEC12
 Dynamic selection requires
no modifications to JCL. The
new z/OS infrastructure will
select the highest ARCH
‘NEW’ dataset available for
the current machine
 Configurations
trackable/auditable/viewable
by SMF records and
DISPLAY IEFOPZxx
z/OS 2.2
Optimization
Product
InfrastructureOriginal JCL
Pointing Only to Original Application
Binaries
Optimization
Configuratio
n
OLDNEW (
OWNER(IBM)
OLD( DSNAME (HLQ.IN.LOAD) )
NEW( DSNAME (HLQ.OUT.LOAD.ZEC12) ARCH(10) )
NEW( DSNAME (HLQ.OUT.LOAD.Z13) ARCH(11) )
INCLUDEMEMBERS(M*)
ACTIVE )
Unchanged JCL
SMF*
Optimized + Original Application
Binaries
z13
...
//STEPLIB DD DSN=$HLQ.IN.LOAD,DISP=SHR  e.g. target z13 and zEC12
...
* SMF for tracking changes in Optimization configuration

Automatic Performance Improvement for Legacy COBOL

  • 1.
    Automatic Performance Improvement forLegacy COBOL Session 1810
  • 2.
    Notices and Disclaimers 1 Copyright© 2016 by International Business Machines Corporation (IBM). No part of this documentmaybe reproduced or transmitted in any form withoutwritten permission from IBM. U.S. Government Users Restricted Rights - Use, duplication or disclosure restrictedby GSA ADP Schedule Contract with IBM. Information in these presentations (including information relating to products thathave not yet been announced byIBM) has been reviewed for accuracy as of the date of initial publication and could include unintentional technical or typographical errors.IBM shall have no responsibilityto update this information.THIS DOCUMENT IS DISTRIBUTED "AS IS" WITHOUT ANY WARRANTY, EITHER EXPRESS OR IMPLIED. IN NO EVENT SHALL IBM BE LIABLE FOR ANY DAMAGE ARISING FROM THE USE OF THIS INFORMATION, INCLUDING BUT NOT LIMITED TO, LOSS OF DATA, BUSINESS INTERRUPTION, LOSS OF PROFIT OR LOSS OF OPPORTUNITY. IBM products and services are warranted according to the terms and conditions ofthe agreements under which they are provided. Any statements regarding IBM's future direction, intent or product plans are subject to change or withdrawalwithout notice. Performance data contained herein was generallyobtained in a controlled,isolated environments. Customer examples are presented as illustrations ofhow those customers have used IBM products and the results they may have achieved. Actual performance,cost,savings or other results in other operating environments mayvary. References in this documentto IBM products,programs,or services does notimplythat IBM intends to make such products,programs or services available in all countries in which IBM operates or does business. Workshops,sessions and associated materials mayhave been prepared by independentsession speakers,and do not necessarilyreflectthe views of IBM. All materials and discussions are provided for informational purposes only,and are neither intended to, nor shall constitute legal or other guidance or advice to any individual participantor their specific situation. It is the customer’s responsibilityto insure its own compliance with legal requirements and to obtain advice of competentlegal counsel as to the identification and interpretation of any relevant laws and regulatory requirements thatmayaffect the customer’s business and anyactions the customer mayneed to take to complywith such laws. IBM does notprovide legal advice or representor warrant that its services or products will ensure thatthe customer is in compliance with anylaw
  • 3.
    Notices and DisclaimersCon’t. 2 Information concerning non-IBMproducts was obtained from the suppliers ofthose products,their published announcements or other publiclyavailable sources. IBM has not tested those products in connection with this publication and cannotconfirm the accuracy of performance,compatibilityor any other claims related to non-IBM products. Questions on the capabilities ofnon-IBM products should be addressed to the suppliers ofthose products.IBM does notwarrantthe quality of any third-party products,or the ability of any such third-party products to interoperate with IBM’s products. IBM EXPRESSLY DISCLAIMS ALL WARRANTIES, EXPRESSED OR IMPLIED, INCLUDINGBUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. The provision of the information contained h erein is notintended to, and does not, grantany right or license under anyIBM patents,copyrights,trademarks or other intellectual property right. IBM, the IBM logo,ibm.com,Aspera®,Bluemix,Blueworks Live,CICS, Clearcase,Cognos®,DOORS®,Emptoris®,Enterprise DocumentManagementSystem™,FASP®, FileNet®,Global Business Services ®,Global Technology Services ®, IBM ExperienceOne™,IBM SmartCloud®,IBM Social Business®,Information on Demand,ILOG, Maximo®, MQIntegrator®, MQSeries®,Netcool®, OMEGAMON, OpenPower,PureAnalytics™, PureApplication®,pureCluster™,PureCoverage®, PureData®, PureExperience®,PureFlex®, pureQuery®, pureScale®,PureSystems®,QRadar®,Rational®,Rhapsody®,Smarter Commerce®,SoDA,SPSS, Sterling Commerce®, StoredIQ, Tealeaf®,Tivoli®, Trusteer®,Unica®,urban{code}®,Watson,WebSphere®,Worklight®,X-Force® and System z® Z/OS, are trademarks ofInternational Business Machines Corporation,registered in manyjurisdictions worldwide.Other product and service names mightbe trademarks ofIBM or other companies.A current listof IBM trademarks is available on the Web at "Copyright and trademark information"at: www.ibm.com/legal/copytrade.shtml.
  • 4.
    Please Note: 3 • IBM’sstatements regarding its plans, directions, and intent are subject to change or withdrawal without notice at IBM’s sole discretion. • Information regarding potential future products is intended to outline our general product direction and it should not be relied on in making a purchasing decision. • The information mentioned regarding potential future products is not a commitment, promise, or legal obligation to deliver any material, code or functionality. Information about potential future products may not be incorporated into any contract. • The development, release, and timing of any future features or functionality described for our products remains at our sole discretion. • Performance is based on measurements and projections using standard IBM benchmarks in a controlled environment. The actual throughput or performance that any user will experience will vary depending upon many factors, including 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 results similar to those stated here.
  • 5.
    IBM Automatic BinaryOptimizer (ABO) for z/OS Overview: z/OS 2.2 Release Nov. 2015; z/OS 2.1: Feb. 19, 2016 • ABO improves performance of already compiled COBOL V3 & V4 programs • Optimize directly from the compiled program • No source level migration or recompilation or options tuning required • Leverage latest advanced COBOL optimization technology • Generate code to target latest z Systems (e.g. zEC12, zBC12, z13 & z13s) • Support in z/OS® 2.2 to automatically load optimized modules to target latest z Systems 4 ABO Original Program Binaries (Base ESA390) Optimized Program Binaries (Latest z Systems)
  • 6.
    ABO and COBOLCompiler: Complementary Tools 5 Use Case ABO COBOL Compiler Significant Performance Improvement* *No Source, Migration or Options Tuning Required  Interoperability/Legacy Compatibility: PDS supported, pre-Enterprise COBOL etc.  Built in Support for Targeting Multiple Hardware Levels At Deployment  No need to downgrade ARCH setting to match DR* machine Original compiled program always available for DR  New COBOL development and new features  Maintenance on existing COBOL programs  Maximum Performance Improvement* *Source, Migration and Options Tuning Required  *DR  Disaster Recovery Machine : Down level machine used for emergency situations. Usually 1 or 2 revisions old so puts limits on Compiler ARCH setting (and performance improvements possible) based on this older level
  • 7.
    Compatibility and Testing 6 ABOconsumes the original binary so the exact behavior of the original program is known vs the documented “correct” behavior when compiling from source No compiler options (performance or otherwise) are changing The optimized program looks/behaves as the original program from the outside (but faster!) so no interoperability concerns with other programs Strong compatibility guarantee for the modules produced by ABO InteroperabilityUnchanged Options Binary As Input If something goes wrong using the optimized module revert to using original program and call IBM Failure Scenario The recommendedtesting focus should be on performance and scalability (less on business logic)Testing
  • 8.
    Tooling Support • IBMProblem Determination Tools for z/OS support includes: – Fault Analyzer (FA) for z/OS – Debug Tool (DT) for z/OS – Application Performance Analyzer (APA) for z/OS • Several 3rd party tooling vendors were involved in our beta program this year – Please contact your tools vendor directly to ask about support for ABO 7 APA FA DT
  • 9.
    ABO Supports ToolingInfrastructure 8 COBOL v4.2 compiler listing: 000027 COMPUTE 00042C F247 D110 8000 PACK 272(5,13),0(8,8) TS2=0 WS-VAR-1 000432 960F D114 OI 276(13),X'0F' TS2=4 000436 F247 D118 8008 PACK 280(5,13),8(8,8) TS2=8 WS-VAR-2 00043C 960F D11C OI 284(13),X'0F' TS2=12 000440 FA44 D110 D118 AP 272(5,13),280(5,13) TS2=0 TS2=8 000446 F374 8010 D110 UNPK 16(8,8),272(5,13) WS-VAR-3 TS2=0 00044C 96F0 8017 OI 23(8),X'F0' WS-VAR-3+7 Listing Transform: 00042C PACK 272(5,13),0(8,8) 000432 OI 276(13),15 0004C4 ED07 4000 00AA 00042C CDZT FP0,_WSA[0x12c] 0(8,R4),0x0 000436 PACK 280(5,13),8(8,8) 00043C OI 284(13),15 0004CA ED07 4008 10AA 000436 CDZT FP1,_WSA[0x12c] 8(8,R4),0x0 000440 AP 272(5,13),280(5,13) 0004D0 B3D2 1000 000440 ADTR FP0,FP0,FP1 000446 UNPK 16(8,8),272(5,13) 00044C OI 23(8),240 0004D4 ED07 4010 00A8 00044C CZDT FP0, 16(8,R4),0x0 COBOL Program: 000027 COMPUTE WS-VAR-3 = WS-VAR-1 + WS-VAR-2. Input “source” instructions. Starts at column 1 Optimized Instructions. Starts at column 5 LEGEND: Source Line number in original program. CSECT offset of instruction generated by COBOL 4.2 Compiler CSECT offset of instructions generated by ABO Each optimized instruction generated is also annotated with the “source” offset that it was generated for Allows tracking as instructions are re-ordered
  • 10.
    Whole Program Optimization 9 •Unbind • Binary  IR* Internal Verification • Optimize • Optimize • Optimize… Internal Verification • IR Binary • Rebind Done Optimized Executable CSECT1 … CSECTN Original Executable CSECT1 … CSECTN *IR - Intermediate Representation
  • 11.
  • 12.
    Example 1 :Binary Optimization Process Optimization, Test and Static Selection z/OS 2.1/2.2 Selected Compiled Application Binaries (e.g. Performance Sensitive) 1) Optimize and Test Application ABO 2) Static Selection: Load + Run Application JCL Generates Testing* Validates Loads + Runs Optimized Application Binaries (+debug metadata) Optimized + Original Application Binaries *Testing focuson performance/scalability and less on business logic Modified JCL Pointing To Optimized + Original Application Binaries ChangeManagement
  • 13.
    Example 2: BinaryOptimization Process Optimization, Test and Dynamic Selection Selected Compiled Application Binaries (e.g. Performance Sensitive) 1) Optimize and Test Application ABO 2) Load + Run Application JCL Generates Validates ChangeManagement Loads + Runs Optimized + Original Application Binaries Original JCL Pointing Only to Original Application Binaries z/OS 2.2 Optimization Product Infrastructure Optimization Configuration *Testing focuson performance/scalability and less on business logic Optimized Application Binaries (+debug metadata) Testing* * SMF for tracking changes in Optimization configuration SMF*
  • 14.
    Performance: Internal Benchmark SuiteAnd Early Customer Results • Early customer results show performance gains of 5%  21% for a mix of v3 and v4 compiled input programs • On internal benchmarks: 34% improvement. • Performance gains will vary by application but expected to average 15% 13 *Performance data contained herein was generally obtained in a controlled, isolated environments. Customer examples are presented as illustrations of how those customers have used IBM products and the results they may have achieved. Actual performance, cost, savings or other results in other operating environments may vary.
  • 15.
    Performance Example: NumericEdited MOVE 2.35x (57%) Faster 14 01 WS-VAR-1 PIC S9(9)V99 COMP-3. 01 WS-VAR-2 PIC ZZZ,ZZZ,ZZ9.99. MOVE WS-VAR-1 to WS-VAR-2 Automatic Binary Optimizer Decompose editbehaviorto a longer but much faster sequence TP 0(6,R4) ... UNPK 340(11,R10),0(6,R4) IIHF R1,1075847200 OI 350(,R10),X'F0' IILF R1,1797267488 ... ICM R1,X'3',349(,R10) CDPT FP0,0(6,R4),0x8 STCM R1,X'7',284(,R5) ... V4 OPT(FULL) Uses traditional ED (edit)instruction MVC 272(15,13),103(10) L 2,300(0,9 ED 272(15,13),0(2) MVC 8(14,2),273(13)
  • 16.
    Performance Example: DecimalTo Float MOVE 3.97x (75%) Faster 15 01 WS-VAR-1 PIC S9(7)V99. 01 WS-VAR-2 comp-2. MOVE WS-VAR-1 to WS-VAR-2 Automatic Binary Optimizer Decimal to floatconversion is inlined usinga more efficientalgorithm CVB R0,340(,R10) LD FP8,256(,R7) CXFR FP0,R6 DXR FP4,FP8 ... AXR FP4,FP0 LDXR FP0,FP4 V4 OPT(FULL) LibraryCall for decimalto floatconversion Runtime path length is > 100 instructions L 3,92(0,9) L 15,268(0,3) V(IGZCFPC ) LA 1,227(0,10) BASR 14,15 MVC 16(8,2),272(13)
  • 17.
    Thank You Your Feedbackis Important! Access the InterConnect 2016 Conference Attendee Portal to complete your session surveys from your smartphone, laptop or conference kiosk.
  • 18.
    Example 1 InDepth: Binary Optimization Process Optimization, Test and Static Selection Selected Compiled Application Binaries 1) Optimize and Test Application ABO Testing Optimized Application Binaries  Using ABO in the static selection case is a matter of selecting compiled programs to optimize by using straightforward new JCL //OPTIMIZE JOB //OPT EXEC PGM=BOZOPT,REGION=0M //STEPLIB DD DSN=$HLQ.BOZ110.SBOZMOD1,DISP=SHR //SYSPRINT DD DSN=$HLQ.BOZOUT.LISTING,DISP=SHR //SYSIN DD * BOPT IN=$HLQ.IN.LOAD(M*) OUT=$HLQ.OUT.LOAD.ZEC12 ARCH=10 BOPT IN=$HLQ.IN.LOAD(M*) OUT=$HLQ.OUT.LOAD.Z13 ARCH=11 JCL to compile all M* members from IN.LOAD to an OUT.LOAD for zEC12 and one for z13
  • 19.
    Example 1 InDepth: Binary Optimization Process Optimization, Test and Static Selection (targeting multiple hardware levels) z/OS 2.2/2.1 2) Static Selection JCL Loads + Runs Optimized + Original Application Binaries Modified JCL Pointing To Optimized + Original Application Binaries  Static selection requires modifications to all JCL that contained the original modules(s) to be updated to point to new modules(s) for each architecture being targeted ... //STEPLIB DD DSN=$HLQ.OUT.LOAD.ZEC12:$HLQ.IN.LOAD,DISP=SHR ... ... //STEPLIB DD DSN=$HLQ.OUT.LOAD.Z13:$HLQ.IN.LOAD,DISP=SHR ... z13 zEC12
  • 20.
    Example 2 InDepth: Binary Optimization Process Optimization, Test and Dynamic Selection Selected Compiled Application Binaries 1) Optimize and Test Application ABO Testing Optimized Application Binaries (+debug metadata)  Using ABO in the dynamic selection case only requires ‘pointing’ to active configuration by specifying IEFOPZ in JCL Optimization Configuratio n OLDNEW ( OWNER(IBM) OLD( DSNAME (HLQ.IN.LOAD) ) NEW( DSNAME (HLQ.OUT.LOAD.ZEC12) ARCH(10) ) NEW( DSNAME (HLQ.OUT.LOAD.Z13) ARCH(11) ) INCLUDEMEMBERS(M*) INACTIVE ) //OPTIMIZE JOB //OPT EXEC PGM=BOZOPT,REGION=0M //STEPLIB DD DSN=$HLQ.BOZ110.SBOZMOD1,DISP=SHR //SYSPRINT DD DSN=$HLQ.BOZOUT.LISTING,DISP=SHR //SYSIN DD * IEFOPZ
  • 21.
    Example 2 InDepth: Binary Optimization Process Optimization, Test and Dynamic Selection (targeting multiple hardware levels) 2) Load + Run Application JCL zEC12  Dynamic selection requires no modifications to JCL. The new z/OS infrastructure will select the highest ARCH ‘NEW’ dataset available for the current machine  Configurations trackable/auditable/viewable by SMF records and DISPLAY IEFOPZxx z/OS 2.2 Optimization Product InfrastructureOriginal JCL Pointing Only to Original Application Binaries Optimization Configuratio n OLDNEW ( OWNER(IBM) OLD( DSNAME (HLQ.IN.LOAD) ) NEW( DSNAME (HLQ.OUT.LOAD.ZEC12) ARCH(10) ) NEW( DSNAME (HLQ.OUT.LOAD.Z13) ARCH(11) ) INCLUDEMEMBERS(M*) ACTIVE ) Unchanged JCL SMF* Optimized + Original Application Binaries z13 ... //STEPLIB DD DSN=$HLQ.IN.LOAD,DISP=SHR  e.g. target z13 and zEC12 ... * SMF for tracking changes in Optimization configuration