© 2016 IBM Corporation
Continuous Delivery – DB2 for z/OS
Georg Kistenberger – [email protected]
July 2017
© 2016 IBM Corporation
Disclaimer and Trademarks
Information contained in this material has not been submitted to any formal IBM review and
is distributed on "as is" basis without any warranty either expressed or implied. The use of
this information is a customer responsibility.
IBM MAY HAVE PATENTS OR PENDING PATENT APPLICATIONS COVERING SUBJECT MATTER IN THIS DOCUMENT. THE FURNISHING OF THIS DOCUMENT DOES NOT IMPLY GIVING LICENSE TO THESE PATENTS.
TRADEMARKS: Refer to ibm.com/legal/copytrade.phtml
© 2016 IBM Corporation
DB2 for z/OS Strategy
© 2016 IBM Corporation
Current DB2 release cycles
� ~3 years (due to current release cycle)
4
Version GA
V7 03/2001
V8 03/2004
V9 03/2007
V10 10/2010
V11 10/2013
V12 10/2016
© 2016 IBM Corporation
The ‘Swing on a tree’ story
5
What the customer really wanted
How it was designed How the final system works
What the customer asked for How the analyst saw it
What the programmer wrote
© 2016 IBM Corporation
Project management: Waterfall versus AGILE
6
© 2016 IBM Corporation
What is the motivation?
7
New functionality
DB2 for z/OS Market is demanding faster reaction on requirements
V11 V12
3 years
© 2016 IBM Corporation
Some more aspects of Continous Delivery
� A shorter cycle of major DB2 enhancements requires also progress in the following technical areas:
– Skipping a „new version / release / ...“
– Migration without downtime
– Going forward and backward: Allowing fallback
– Stable code
� A shorter cycle of major DB2 enhancements requires also progress in the following business areas:
– More / better functionalities and faster delivery in regards to DB2 features and functions
– Reduce migration project costs, risks and time
– DB2 sponsor user program to ensure customers receive features they actually wanted!
8
© 2016 IBM Corporation
How other IBM components handle continuous delivery ?
� CICS
– This has been done before already, we used to call it “Retro Fit”, but now it is a more
standard way to deliver functionality also before we GA a new Release!
� MQ
– LTSR - Long Term Support Release
• LTSR is a recommended product level for which support, including defect and
security updates, will be provided over a specified period of time. LTSR is intended
for clients that may need a longer term deployment and maximum stability.
– CDR – Continuous Delivery Release
• The CD support model allows IBM MQ products to make new function available
more frequently.. Each CD Release replaces the prior ones for that version of IBM
MQ, so it is possible for you to skip CD releases.
� z/OS
– The z/OS continuous delivery might use small programming enhancements (SPEs) to
deliver the functionality.
9
© 2016 IBM Corporation
How DB2 for z/OS manages continuous delivery?
� Continuous delivery for DB2 starts after migration to V12
– Migration to V12 may still be in the future for you, but preparation for this new concept is strongly recommended
� New features come in with “function levels“ delivered in the normal PTF service stream
� Function levels counted up consecutively
– Some day there may be a new version
� To go to new function levels is voluntary
– Also skipping one or more function levels is possible, but consider
• e.g. activation of level n+2 includes activation of level n as well as level n+1
– The same rule applies to catalog levels (=catalog changes)
10
© 2016 IBM Corporation
Migration to DB2 12
� „CM“ or „NFM“ acronyms replaced by term „function level & appropriate number“
� 1. CATMAINT
– New functions not available
– V12 starts with V12R1M100 (formerly called V12 CM or V12 BNFA)
� 2. New ACTIVATE command to replace CATENFM utility to go forward
– New functions available at appropriate function level
• V12R1M500 (formerly called V12 NFM or V12 ANFA)
• Why 500? NFM level of a server is already indicated by 5 or above
e.g. DSN11015
– ACTIVATE command allows to go forward and backward
• TEST keyword is optional to see what is possible
11
© 2016 IBM Corporation
Migration to DB2 12 – Continuous Delivery
External changes
� DISPLAY GROUP is changed
� ACTIVATE FUNCTION LEVEL (new command)
� CATMAINT UPDATE LEVEL (new utility syntax)
� DSNG007I:
– Message is issued anytime when catalog DBD is loaded, e.g. during start-up:
12
DSNG007I -DB2A DB2 CATALOG LEVEL (V12R1M500 )
CODE LEVEL (V12R1M500 )
CURRENT FUNCTION LEVEL (V12R1M500 )
HIGHEST ACTIVATED FUNCTION LEVEL (V12R1M500 )
© 2016 IBM Corporation
Continuous Delivery – four levels are important
� System level:
– Module or code level (ML)
SDSNLOAD, ...
– Catalog level (CL)
CATALOG & DIRECTORY structure
– Function level (FL)
Which new functionalities are enabled
� Application level:
– Application compatibility level (AC)
APPLCOMPAT re-bind parameter
© 2016 IBM Corporation
Determine the various levels in an application
� Consider also RIBRELXN, e.g. 121500
– Available in e.g. DSNALI CONNECT and contains the code level
� New global variable CATALOG_LEVEL, e.g. V12R1M500
– Contains the catalog level
� New global variable PRODUCTID_EXT, e.g. DSN1201501
– Contains the current function level
� Existing special register CURRENT APPLICATION COMPATIBILITY, e.g. V12R1M501
– Contains current APPLCOMPAT and can be used to set another
APPLCOMPAT, but not higher than the value of the re-bind
� New global variable DEFAULT_SQLLEVEL, e.g. V12R1M501
– Contains SQLLEVEL specified in DSNHDECP
© 2016 IBM Corporation
Continuous Delivery – Ideal technical picture
15
V12R1M100 V12R1M500 V12R1M502 ... VxxRyMzzz
SDSNLOAD / SDSNLINK
CATALOG & DIRECTORY
Apply PTFs and restart DB2
V12R1M504
CATMAINT UPDATE LEVEL
Function LevelACTIVATE cmd ACTIVATE cmd ACTIVATE cmd
level
1.
2.
3.
Appl. Compat RE-BIND APPLCOMPAT
4.
© 2016 IBM Corporation
Continuous Delivery – Example
16
-DIS GROUP
DSN7100I -DB2A DSN7GCMD
*** BEGIN DISPLAY OF GROUP(DSNCAT ) CATALOG LEVEL(V12R1M500)
CURRENT FUNCTION LEVEL(V12R1M500)
HIGHEST ACTIVATED FUNCTION LEVEL(V12R1M500)
HIGHEST POSSIBLE FUNCTION LEVEL(V12R1M500)
PROTOCOL LEVEL(2)
GROUP ATTACH NAME(DSNG)
-------------------------------------------------------------
DB2 SUB DB2 SYSTEM IRLM
MEMBER ID SYS CMDPREF STATUS LVL NAME SUBSYS
-------- --- ---- -------- -------- ------ -------- ----
DB2A 1 DB2A -DB2A ACTIVE 121500 SVTEC02 PR21
DB2B 2 DB2B -DB2B ACTIVE 121500 SVTEC02 RRLM
-------------------------------------------------------------
...
Maintenance Level
.
Catalog Level
.
FunctionLevels
© 2016 IBM Corporation
Continuous Delivery – Possible technical picture
17
V12R1M100 V12R1M500 V12R1M502 VxxRyMzzz
SDSNLOAD / SDSNLINK
CATALOG & DIRECTORY
V12R1M504
Function Level
level
1.
2.
3.
Appl. Compat4.
Where are we ?
© 2016 IBM Corporation
Continuous Delivery – Possible technical picture
18
V12R1M100 V12R1M500 V12R1M502 VxxRyMzzz
SDSNLOAD / SDSNLINK
CATALOG & DIRECTORY
V12R1M504
Function Level
level
1.
2.
3.
Appl. Compat4.
How to go forward ?
© 2016 IBM Corporation
Continuous Delivery – Example
19
-ACTIVATE FUNCTION LEVEL(V12R1M100) TEST
DSNU757I -DB2A DSNUGCCA
*** BEGIN ACTIVATE FUNCTION LEVEL (V12R1M100)
GROUP ELIGIBLE FOR FUNCTION LEVEL (V12R1M100)
CATALOG LEVEL(V12R1M500)
CURRENT FUNCTION LEVEL(V12R1M500)
HIGHEST ACTIVATED FUNCTION LEVEL(V12R1M500)
HIGHEST POSSIBLE FUNCTION LEVEL(V12R1M500)
--------------------------------------------------------------
DB2 CURRENT CAPABLE FUNCTION LEVELS
MEMBER ID CODE-LEVEL LOWEST HIGHEST STATUS
-------- --- ---------- ---------- ---------- -------------
DB2A 1 V12R1M500 V12R1M100 V12R1M500 ELIGIBLE
DB2B 2 V12R1M500 V12R1M100 V12R1M500 ELIGIBLE
--------------------------------------------------------------
DSN9022I -DB2A DSNZACMD '-ACTIVATE FUNC' NORMAL COMPLETION
© 2016 IBM Corporation
Continuous Delivery – Example
20
-ACTIVATE FUNCTION LEVEL(V12R1M100)
DSNU757I -DB2A DSNUGCCA
*** BEGIN ACTIVATE FUNCTION LEVEL (V12R1M100)
FUNCTION LEVEL (V12R1M100) SUCCESSFULLY ACTIVATED
CATALOG LEVEL(V12R1M500)
CURRENT FUNCTION LEVEL(V12R1M100*)
HIGHEST ACTIVATED FUNCTION LEVEL(V12R1M500)
HIGHEST POSSIBLE FUNCTION LEVEL(V12R1M500)
DSN9022I -DB2A DSNZACMD '-ACTIVATE FUNC' NORMAL COMPLETION
© 2016 IBM Corporation
Continuous Delivery – Example
� CATMAINT UPDATE
– If LEVEL is omitted then V12R1M500 is the default
21
CATMAIN UPDATE LEVEL(V12R1M500)
DSNU750I 154 11:43:14.32 DSNUECM0 - CATMAINT UPDATE PHASE 1 STARTED
DSNU777I 154 11:43:14.32 DSNUECM0 - CATMAINT UPDATE STATUS -
VERIFYING CATALOG IS AT CORRECT LEVEL FOR MIGRATION.
DSNU777I 154 11:43:14.34 DSNUECM0 - CATMAINT UPDATE STATUS -
BEGINNING MIGRATION SQL PROCESSING PHASE.
DSNU777I 154 11:43:14.34 DSNUECM0 - CATMAINT UPDATE STATUS -
UPDATING CATALOG COLUMN CCSID.
DSNU777I 154 11:43:14.34 DSNUECM0 - CATMAINT UPDATE STATUS -
UPDATING DIRECTORY WITH NEW RELEASE MARKER.
DSNU752I 154 11:43:14.35 DSNUECM0 - CATMAINT UPDATE PHASE 1 COMPLETED
© 2016 IBM Corporation
Continuous Delivery – Example
� Catalog and function level changes are documented in a new catalog table SYSIBM.SYSLEVELUPDATES
22
FUNCTION_LVL PREV_FUNCTION_LVL HIGH_FUNCTION_LVL CATALOG_LVL OPERATION_TYPE ...
---------+---------+---------+---------+---------+---------+---------+---------
V12R1M500 V12R1M100 V12R1M500 V12R1M500 M
V12R1M100 V12R1M500 V12R1M500 V12R1M500 F
V12R1M500 V12R1M100 V12R1M500 V12R1M500 F
OPERATION_TYPE:• M = code level change
• F = function level change
• C = catalog level change
© 2016 IBM Corporation
DISPLAY GROUP coexistence
23
© 2016 IBM Corporation
DISPLAY GROUP before new functions activated
24
© 2016 IBM Corporation
DISPLAY GROUP with new functions active
25
© 2016 IBM Corporation
Continuous Delivery – What is changing
26
V12R1M100 V12R1M500 V12R1M502 VxxRyMzzz
SDSNLOAD / SDSNLINK
CATALOG & DIRECTORY
V12R1M504
Function Level
level
1.
2.
3.
Appl. Compat4.
Apply PTFsError correction New functions
Run CATMAINTRelease boundaryFor SOME new function levels
ACTIVATE cmdRelease boundaryFor EACH new function level
IFI376 appl change
RE-BIND
Release boundaryafter PTFs
TODAY FUTURE
after PTFs
N*times per year a new function level
Every 3 years a new release
© 2016 IBM Corporation
Continuous Delivery – What is required
� Develop
– Automatic procedure to scope with APPLCOMPAT changes
– This must fit into your current application program rollout mechanism
– Already in V11 required
– ...
� Adminstrate
– How often do you want to apply PTFs ?
– How often can you apply PTFs / change CATALOG / upgrade to a new fucntion
level ?
– How often are you allowed to apply changes to your environment ?
– ...
27
© 2016 IBM Corporation
Continuous Delivery – Dependencies (incomplete for sure)
� Maintenance level must be always the highest
� Catalog & Directory go only forward and are moved forward when CATMAINT is run
� Function level can vary in its capable limits
� Application compatibility will still support V10R1 and V11R1
– Goal (today): At least 2 releases back
� New function levels are delivered by maintenance stream
– as usual error corrections
– N*times per year and not every 3 years
– Today: Only some very important „retro fits“
28
© 2016 IBM Corporation
DDL/DML sensitivity controlled by APPLCOMPAT
� A package must be bound with an appropriate application compatibility level (APPLCOMPAT) to support new functionality, e.g. ALTER ... PART n DSSIZE
– If not:
� DDL/DML must be executed by a package with the correct application
compatibility level
– The current function level has no impact
29
DSNX200I -DB2A BIND SQL ERROR
…
DBRM=DB2ALTER
STATEMENT=43
SQLCODE=-4743
SQLSTATE=56038
…
© 2016 IBM Corporation
DDL/DML sensitivity controlled by APPLCOMPAT
� To BIND a package with a special application compatibility level (APPLCOMPAT)
– If specified APPLCOMPAT ≤ current function level � no problem, otherwise
� To RE-BIND a package with a special application compatibility level (APPLCOMPAT)
– If specified APPLCOMPAT ≤ current function level � no problem
– If specified APPLCOMPAT > current function level � only allowed if existing APPLCOMPAT
of package is used
– Example:
• APPLCOMPAT is V12R1M500 (package bound under function level V12R1M500)
• Function level is V12R1M100* (due to fallback)
• New DDL/DML is still allowed in this package due to APPLCOMPAT V12R1M500
• Function level is NOT a „global“ switch
30
DSNT225I -DB2A BIND ERROR FOR PACKAGE STLEC1.DB.DB2ALTER
APPLCOMPAT(V12R1M500) OPTION IS NOT SUPPORTED
DSNT233I -DB2A UNSUCCESSFUL BIND FOR
PACKAGE = STLEC1.DB.DB2ALTER.()
© 2016 IBM Corporation
New DB2 V12 Function level M501
� New LISTAGG BIF
– The LISTAGG function aggregates a set of strings into one string by
concatenating the strings
� APAR PI70535 required
� -ACTIVATE FUNCTION LEVEL (V12R1M501)
� Requested by SAP
� Example
© 2016 IBM Corporation
IBM Knowledge Center – Function level documentation
Search for „fl 501“