rdz lunch and learn series - rdz for cobol programmers - tips and techniques

45
© 2015 IBM Corporation © 2015 IBM Corporation RDz Lunch and Learn Series - RDz for COBOL Programmers - Tips and Techniques With Venkat Balabhadrapatruni, IBM Enterprise DevOps Architect

Upload: susan-yoskin

Post on 06-Aug-2015

372 views

Category:

Software


4 download

TRANSCRIPT

Page 1: RDz Lunch and Learn Series - RDz for COBOL Programmers - Tips and Techniques

© 2015 IBM Corporation

IBM z Systems

© 2015 IBM Corporation

RDz Lunch and Learn Series - RDz for COBOL Programmers - Tips and Techniques

With Venkat Balabhadrapatruni, IBM Enterprise DevOps Architect

Page 2: RDz Lunch and Learn Series - RDz for COBOL Programmers - Tips and Techniques

© 2015 IBM Corporation

IBM z Systems

2

Information is confidential and must not be shared or redistributed without permission

from IBM. Plans are based on best information available and may change in future.

DISCLAIMER

© Copyright IBM Corporation 2015. All rights reserved.

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.

Page 3: RDz Lunch and Learn Series - RDz for COBOL Programmers - Tips and Techniques

© 2015 IBM Corporation

IBM z Systems

Current landscape - Overview

3

Page 4: RDz Lunch and Learn Series - RDz for COBOL Programmers - Tips and Techniques

© 2015 IBM Corporation

IBM z Systems

Accelerate software delivery –

for faster time to value

Balance speed, cost, quality and risk –

for increased capacity to innovate

Reduce time to customer feedback – for improved customer

experience

IBM DevOps point of view Enterprise capability for continuous software delivery that enables organizations to seize market opportunities and reduce time to customer feedback

Our DevOps POV is resonating with clients and they are delivering measurable business outcomes with DevOps

Continuous Customer

Feedback & Optimization

Collaborative Development

Continuous Release and Deployment

Continuous Monitoring

Continuous Business Planning

Operate Develop/ Test

Deploy

Steer

DevOps

Continuous Feedback

Continuous Testing

4

Page 5: RDz Lunch and Learn Series - RDz for COBOL Programmers - Tips and Techniques

© 2015 IBM Corporation

IBM z Systems

The unicorns (born on the web companies) set the bar for DevOps. Some examples: 11.6 seconds mean time between weekday deployments, 1079 max deployments in an hour1

15000 engineers working on 4000+ projects, 5500 code commits/day, 75M testcases run daily2

>100 releases/day3

6419 deployments to production/year, 25/day, by 196 different people 4

Utopia: Unicorn fun facts

1 http://www.slideshare.net/Dynatrace/why-everyone-needs-devops-now-gene-kim 2 http://www.slideshare.net/realgenekim/why-everyone-needs-devops-now 3 http://www.slideshare.net/jedberg/devops-at-netflix-reinvent 4 http://www.slideshare.net/beamrider9/continuous-deployment-at-etsy-a-tale-of-two-approaches

5

Page 6: RDz Lunch and Learn Series - RDz for COBOL Programmers - Tips and Techniques

© 2015 IBM Corporation

IBM z Systems

Outdated developer and team tools Aging developer population Disconnected teams, silos FUD: “millennials can’t code COBOL”, “manual

processes exist for a reason”, “SoR dev can’t be as nimble as distributed dev”

Ancient Infrastructure and Beliefs Remain

Manual testing Availability of entire system is required to

test Mainframe availability required (if some z) Reluctance to move test data off

mainframe Cross-platform coordination required Manual project prioritization, status

tracking

Ancient Practices Need Overhauling

Reality: Most enterprise companies are not unicorns

So, is it possible to cross this chasm and become a unicorn? 6

Page 7: RDz Lunch and Learn Series - RDz for COBOL Programmers - Tips and Techniques

© 2015 IBM Corporation

IBM z Systems

Yes!!! And, many large companies are leading the way. Some examples: 80 deploys/week, <10 incidents/month1

80% reduction in critical defects, 70% increase in system availability, 90% on-time delivery vs. 60% previously2

reduced dev cost from 100M to 55M/year, 140% increase in number of products under development3

resale up 30% first half of 2014, 24% YoY increase in customer service rating4

Utopia: Enterprise unicorn fun facts

1 http://www.slideshare.net/DevOpsEnterpriseSummit/does14-ross-clanton-and-heather-mickman-devops-at-target-41869677 2 http://www.slideshare.net/DevOpsEnterpriseSummit/tuesday-400-hayden-lindsey-and-carmen-de-ardo-final? 3 http://www.slideshare.net/DevOpsEnterpriseSummit/does14-gary-gruver-macys-transforming-traditional-enterprise-software-development-processes 4 http://www.slideshare.net/DevOpsEnterpriseSummit/tuesday-330-shakeel-sorathia-final?qid=d758c122-8df0-4e03-b2da-4ba4c7271897&v=qf1&b=&from_search=11

7

Page 8: RDz Lunch and Learn Series - RDz for COBOL Programmers - Tips and Techniques

© 2015 IBM Corporation

IBM z Systems

Evolving towards the unicorns

Use modern multi-platform developer and team tools Automate deployment and configuration Automate testing and using virtualized services Offload testing from the mainframe Build and deploy in small batches Start with small pilot projects to build confidence Use real-time dashboards Consolidate SCMs Build a staged rollout plan Train the teams in tool usage and process changes Organize with cross functional teams Gain executive buy-in and sponsorship up front Hire and train millennials on enterprise applications, tools, and languages Employ a loosely coupled architecture

8

Page 9: RDz Lunch and Learn Series - RDz for COBOL Programmers - Tips and Techniques

© 2015 IBM Corporation

IBM z Systems

How is it done ? A developers view..

9

Page 10: RDz Lunch and Learn Series - RDz for COBOL Programmers - Tips and Techniques

© 2015 IBM Corporation

IBM z Systems

Rational Developer for System z Modern Eclipse-based Integrated Development Environment (IDE) with unit test automation, code and test coverage analysis, self-contained debugger, and much more

Enables:

Speed

– faster decision making

– faster implementation

Leanness

– higher initial code quality reduces waste across Continuous Delivery lifecycle

– host-offload architecture frees up development MIPS for use by mission-critical workloads

Business agility

– faster completion of maintenance more time for innovation

– modernize heritage systems of record with new web, SOA, and mobile systems of engagement

– attract/retain next generation of z developers with modern tools

10

Page 11: RDz Lunch and Learn Series - RDz for COBOL Programmers - Tips and Techniques

© 2015 IBM Corporation

IBM z Systems

Day in the life of a COBOL developer using ISPF

submit compile job swap to SDSF select job

find error msg

find code line (remember

error)

swap to edit session

exit JCL edit source find code line

change code

exit source

edit JCL

● Multiple screens/sessions and multiple disparate tools

● 20 x 80 characters of content

11

Page 12: RDz Lunch and Learn Series - RDz for COBOL Programmers - Tips and Techniques

© 2015 IBM Corporation

IBM z Systems

Day in the life of a COBOL developer using RDz

Edit

Submit

View Output

12

Page 13: RDz Lunch and Learn Series - RDz for COBOL Programmers - Tips and Techniques

© 2015 IBM Corporation

IBM z Systems

This is great, but enough to cross the chasm ?

Modern environment - do things concurrently rather than sequentially

Better capabilities to improve productivity

Intelligent edit capabilities

Need more analysis tooling Need more tooling to help

manage the overall “quality”

13

Page 14: RDz Lunch and Learn Series - RDz for COBOL Programmers - Tips and Techniques

© 2015 IBM Corporation

IBM z Systems

Code understanding and analysis consume a big portion of developer time

14

Page 15: RDz Lunch and Learn Series - RDz for COBOL Programmers - Tips and Techniques

© 2015 IBM Corporation

IBM z Systems

Program Understanding – different ways/techniques

15

Page 16: RDz Lunch and Learn Series - RDz for COBOL Programmers - Tips and Techniques

© 2015 IBM Corporation

IBM z Systems

I want to see the expanded source…

•New editors

•LPEX editor

•Temporary read-only file with all dependencies resolved and expanded

16

Page 17: RDz Lunch and Learn Series - RDz for COBOL Programmers - Tips and Techniques

© 2015 IBM Corporation

IBM z Systems

I want to see where and how a variable is being used…

17

Page 18: RDz Lunch and Learn Series - RDz for COBOL Programmers - Tips and Techniques

© 2015 IBM Corporation

IBM z Systems

I want to see a graphical view of my program…

A graphical representation of the flow of control through a program

Hyperlinks in the graph nodes are integrated with the editor allowing deep dives into paragraphs/sections to study the code

Generated by converting the program source into a model and then walking all possible paths in the model

18

Page 19: RDz Lunch and Learn Series - RDz for COBOL Programmers - Tips and Techniques

© 2015 IBM Corporation

IBM z Systems

A tree view representation for analysis…

19

Page 20: RDz Lunch and Learn Series - RDz for COBOL Programmers - Tips and Techniques

© 2015 IBM Corporation

IBM z Systems

20

Comprehensive view of Data items being used…

A table representation of the user-defined data items and symbols in a program

Hyperlinks in the table are integrated with the editor allowing easy access to the declaration of the data items.

Page 21: RDz Lunch and Learn Series - RDz for COBOL Programmers - Tips and Techniques

© 2015 IBM Corporation

IBM z Systems

What next after program understanding ?

21

Page 22: RDz Lunch and Learn Series - RDz for COBOL Programmers - Tips and Techniques

© 2015 IBM Corporation

IBM z Systems

In addition to that … Edit experience provides the following..

Range indicator / Show selected method

Task tags

Quick fixes

Surround with

Tabbing to margins

Marking of occurrences

Syntax coloring preferences

Formatting

22

Page 23: RDz Lunch and Learn Series - RDz for COBOL Programmers - Tips and Techniques

© 2015 IBM Corporation

IBM z Systems

Syntax checking of COBOL copybook files

23

Page 24: RDz Lunch and Learn Series - RDz for COBOL Programmers - Tips and Techniques

© 2015 IBM Corporation

IBM z Systems

Is there dead code.. ?

An editor action to help identify unreachable code

“Dead code” - lines of source code which cannot be reached in a full control-flow analysis.

24

Page 25: RDz Lunch and Learn Series - RDz for COBOL Programmers - Tips and Techniques

© 2015 IBM Corporation

IBM z Systems

Compile/Build/Test – Did it work ?

25

Page 26: RDz Lunch and Learn Series - RDz for COBOL Programmers - Tips and Techniques

© 2015 IBM Corporation

IBM z Systems

Delegate the compile/build to the SCM… OR ..

RDz offers integration into a variety of Source Code Management (SCM) tools as well as a framework for creating SCM integration on your own

Submit existing JCL

Use RDz to generate JCL or build the program for you..

Vendor Supplied

IBM Supplied

RD

z

CA Endevor

Serena Changeman

SCLM

Rational ClearCase

Framework for other SCMs

ISPW

26

Page 27: RDz Lunch and Learn Series - RDz for COBOL Programmers - Tips and Techniques

© 2015 IBM Corporation

IBM z Systems

I’m a good programmer – but on rare occassions…

27

Page 28: RDz Lunch and Learn Series - RDz for COBOL Programmers - Tips and Techniques

© 2015 IBM Corporation

IBM z Systems

Wouldn’t it be cool to automate my unit tests ?

28 28

Page 29: RDz Lunch and Learn Series - RDz for COBOL Programmers - Tips and Techniques

© 2015 IBM Corporation

IBM z Systems

How much of my code is covered/tested ?

29

Page 30: RDz Lunch and Learn Series - RDz for COBOL Programmers - Tips and Techniques

© 2015 IBM Corporation

IBM z Systems

It works .. What else do I need to worry about ?

30

Page 31: RDz Lunch and Learn Series - RDz for COBOL Programmers - Tips and Techniques

© 2015 IBM Corporation

IBM z Systems

Coding standards..

31

Page 32: RDz Lunch and Learn Series - RDz for COBOL Programmers - Tips and Techniques

© 2015 IBM Corporation

IBM z Systems

Including shop specific custom rules..

32

Page 33: RDz Lunch and Learn Series - RDz for COBOL Programmers - Tips and Techniques

© 2015 IBM Corporation

IBM z Systems

Software Metrics

COBOL Software Metrics

Key measurements of code complexity.

Basic metrics measures line and comment counts.

A number of well known metrics exist to measure code cohesion and cyclomatic complexity.

Metrics also support threshold values for 'rule style' reporting. When these values are exceeded refactoring and simplification of code is recommended.

33

Page 34: RDz Lunch and Learn Series - RDz for COBOL Programmers - Tips and Techniques

© 2015 IBM Corporation

IBM z Systems

Analysis execution history retained like Code Review rules

Over the threshold is marked in red

Over 50% toward reaching the threshold is marked in yellow

Result History – Select any entry to view corresponding result metrics

Did I introduce complexity ?

Rule threshold violations are clearly indicated

34

Page 35: RDz Lunch and Learn Series - RDz for COBOL Programmers - Tips and Techniques

© 2015 IBM Corporation

IBM z Systems

Automate this process ..

Separate install

–Rational Developer for System z Host Utilities

Code review functionality targeting COBOL and PL/I source code located in PDS’s

Runs the same analysis code and produces the same results as code review on the RDz workstation client

Implemented as Eclipse-based application running on z/OS

zIIP/zAAP eligible Java workload

Configure using exported artifacts from RDz workstation client (property groups, code review rule set, etc.)

JCL/REXX front end drives batch processing of Eclipse plug-ins running on Java VM in z/OS UNIX process

JCL REXX Java / Eclipse

35

Page 36: RDz Lunch and Learn Series - RDz for COBOL Programmers - Tips and Techniques

© 2015 IBM Corporation

IBM z Systems

z/OS Batch – Code Review invocation

Configure supporting artifacts in RDz client

–Export artifacts to z/OS Unix

Rule file (.dat) Property group file (.xml) Custom category and rule file (.ccr) [optional] File extension mapping file (.zip) [optional]

Customize AKGCR procedure

–RDz-exported artifacts

–JRE (Java v6 or higher)

–Code Review on z/OS installation location

Customize JCL to execute AKGCR procedure

–PDS to analyze

–Output report and log location

36

Page 37: RDz Lunch and Learn Series - RDz for COBOL Programmers - Tips and Techniques

© 2015 IBM Corporation

IBM z Systems

Challenges reported by early adopters:

- Only one PDS (or selected members of that PDS) could be analyzed at a time

- Multi-language (**SOURCE) datasets required member level File System mapping

z/OS Batch – Code Review improvements

Solution: A new input file called LIST

Comment lines supported using #

Abbreviations supported (e.g. L for LANGUAGE)

Member wildcards (* and %) supported

LIST file can be MVS file or HFS file

Advantages:

- LIST can be used to replace PDS, MEMBERS, and EXTMAP

- File extension mapping files no longer need to be exported from workstation

- Multiple PDS’s can now be analyzed in a single scan

- Exclusions now supported

Format: each record is set of key-value pairs

#Select={Include eXclude}, I is default

#Language=language

#Member=member, * is default

#Datasetname=dsn

LANGUAGE=COBOL DATASETNAME=USER.MY.PDS

D=USER.MY.PDS M=NOTME* S=X

L=PL/I D=USER.MY.OTHER.PDS M=MYPROG

37

Page 38: RDz Lunch and Learn Series - RDz for COBOL Programmers - Tips and Techniques

© 2015 IBM Corporation

IBM z Systems

Challenges reported by early adopters:

- Property Group artifact required from the RDz client in order to resolve dependencies

z/OS Batch – Code Review improvements

Solution: SYSLIB DD concatenation list for dependency resolution

Advantages:

- Traditional user experience for include files

- When combined with LIST, reduces the RDz artifact requirement to just the rules file(s)

When LIST is specified, PDS, MEMBERS, and EXTMAP are ignored

When SYSLIB is specified, PROPERTY is ignored

//SYSLIB DD DSN='HLQ.SOURCE.COPYLIB1',DISP=SHR

// DD DSN='HLQ.SOURCE.COPYLIB2',DISP=SHR

38

Page 39: RDz Lunch and Learn Series - RDz for COBOL Programmers - Tips and Techniques

© 2015 IBM Corporation

IBM z Systems

RDz currently supports CSV and XML report formats for exporting code review results

CSV is useful for spreadsheet analysis

XML is useful for transformation into any number of visual formats

Problem: XML format is proprietary so custom code to handle/transform XML is required

The JUnit format – another XML format, but with common processing tools

–Not a formal standard, but a common format used by Jenkins and Apache Ant tools, which can transform the format into a web page

–Opens in the JUnit view in Eclipse

Plug into existing dashboards..

39

Page 40: RDz Lunch and Learn Series - RDz for COBOL Programmers - Tips and Techniques

© 2015 IBM Corporation

IBM z Systems

A comprehensive set of capabilities are available to help the evolution..

Crawl, Walk, Run Understand what is available Have an adoption roadmap Try, engage, share..

It’s a journey We are keeping up with the new COBOL versions ! We are here to help !

Summary

40

Page 41: RDz Lunch and Learn Series - RDz for COBOL Programmers - Tips and Techniques

© 2015 IBM Corporation

IBM z Systems

Coming soon – new web page/community for mainframe developers

Coming soon: a one-stop-shop for mainframe developers

Developer.ibm.com/mainframe

Engage with fellow developers, share expertise, brag about your success

Contribute to the blogs section

Write to Naveed/Susan if you would like your posts to be featured on the blog section

[email protected]

[email protected]

Page 42: RDz Lunch and Learn Series - RDz for COBOL Programmers - Tips and Techniques

© 2015 IBM Corporation

IBM z Systems

RDz Lunch and Learn Webcast Series Ongoing throughout 2015 – here are just a few

DevOps topics explored with Venkat Balabhadrapatruni, IBM STSM Enterprise Modernization, and other technical experts.

Date Topic Presenters Focus

April 23 Lunch and Learn: RDz for COBOL

Programmers – Tips and Techniques

Venkat

Balaphadrapatruni

RDz for COBOL application

development and maintenance

April 28 Webcast: Implementing Continuous Integration

with RDz with a customer case study

Keith Allen

Luis Carlos Silva

RDz, zUnit testing

May 7 Boost your Problem Analysis Capabilities with

RDz and PD Tools

Russell Courtney and

Bill Alexander

RDz and PD Tools

June tbd* Using RDz and RD&T to boost productivity and

save MIPS

Chris Trobridge, Alisa

Morse

RDz and RD&T

June tbd Automating Deployment with RDz, RTC and

UrbanCode

Chris Trobridge, Sean

Babineau

RDz, RTC UrbanCode

July tbd Using Optim with RDz and RD&T Joseph Taffe-Atkins,

Alan Johns

RDz, RD&T, Optim

July tbd Lunch and Learn: RDz – the right tools for an

agile environment

Rick Slade RDz, RTC, RAA

* Still confirming

42

Page 43: RDz Lunch and Learn Series - RDz for COBOL Programmers - Tips and Techniques

© 2015 IBM Corporation

IBM z Systems

Valuable Resource - videos

Unit Testing your Applications with zUnit https://www.youtube.com/watch?v=g1tCohSp6nE

Rational Developer for System z: Integrated Debugger

This video features the Integrated Debugger that is part of Rational Developer for System z since version 9.0.1. This debugger is much more than your typical debugger. In this video you'll become familiar with the debug perspective, learn how to submit a job in debug mode or code coverage, access the full feature editor, step through a program, add, monitor, filter, label and search for variables and breakpoints, work with complex variables, easily navigate large programs using the Outline or Program Code Flow views, and use Monitor memory to display results in different formats.

http://ibm.co/1K2tfrH

43

Page 44: RDz Lunch and Learn Series - RDz for COBOL Programmers - Tips and Techniques

© 2015 IBM Corporation

IBM z Systems

www.ibm.com/software/rational

44

Page 45: RDz Lunch and Learn Series - RDz for COBOL Programmers - Tips and Techniques

© 2015 IBM Corporation

IBM z Systems

45