54
© 2014 IBM Corporation 1691, How to Become a Rational Developer for the i Power User Kenny Smith, Strongback Consulting Edmund Reinhardt, IBM Alan Boxall, IBM

© 2014 IBM Corporation 1691, How to Become a Rational Developer for the i Power User Kenny Smith, Strongback Consulting Edmund Reinhardt, IBM Alan Boxall,

Embed Size (px)

Citation preview

Page 1: © 2014 IBM Corporation 1691, How to Become a Rational Developer for the i Power User Kenny Smith, Strongback Consulting Edmund Reinhardt, IBM Alan Boxall,

© 2014 IBM Corporation

1691, How to Become a Rational Developer for the i Power User

Kenny Smith, Strongback ConsultingEdmund Reinhardt, IBM Alan Boxall, IBM

Page 2: © 2014 IBM Corporation 1691, How to Become a Rational Developer for the i Power User Kenny Smith, Strongback Consulting Edmund Reinhardt, IBM Alan Boxall,

About Us: Strongback Consulting

• IBM Advanced Business Partner– SVP certified– Strongly focused on DevOps, enterprise modernization and application lifecycle

management– Key Industries Served: Finance, Insurance, Healthcare, Manufacturing, Government– Rational Design Partner

Discover us at:http://www.strongback.us

Subscribe to us athttp://feeds.feedburner.com/StrongbackConsulting

Socialize with us on Facebook & LinkedIn http://www.facebook.com/StrongbackConsulting

http://www.linkedin.com/company/290754

Page 3: © 2014 IBM Corporation 1691, How to Become a Rational Developer for the i Power User Kenny Smith, Strongback Consulting Edmund Reinhardt, IBM Alan Boxall,

Please noteIBM’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 4: © 2014 IBM Corporation 1691, How to Become a Rational Developer for the i Power User Kenny Smith, Strongback Consulting Edmund Reinhardt, IBM Alan Boxall,

4

• First, learn to crawl – know how to navigate around, and use the skills you have from SEU/PDM

• Then walk – get proficient with the RSE, jobs, filters, and remote compilation• Next run – basic debugging, master the LPEX editor• Finally, FLY! – master refactoring, software archaeology tools in RDi, code

templates, snippets, advanced debugging, application viewer

Overview

Page 5: © 2014 IBM Corporation 1691, How to Become a Rational Developer for the i Power User Kenny Smith, Strongback Consulting Edmund Reinhardt, IBM Alan Boxall,

• Workbench basics– Views, perspectives– Workspace preferences– editors

• Set your LPEX editor to SEU profile• Find the information to help you learn more about the tool

– Help system– InfoCenter– RPG Hub– Various other links

Learn to Crawl

Page 6: © 2014 IBM Corporation 1691, How to Become a Rational Developer for the i Power User Kenny Smith, Strongback Consulting Edmund Reinhardt, IBM Alan Boxall,

• Views• Perspectives• The Workspace• Workspace Preferences• The LPEX Editor• Remote System Explorer Perspective• iProjects Perspective• Connecting to the i

RDi Basics

Page 7: © 2014 IBM Corporation 1691, How to Become a Rational Developer for the i Power User Kenny Smith, Strongback Consulting Edmund Reinhardt, IBM Alan Boxall,

Navigate the Workbench

EditorPane

LiveOutline

iProjectsView

RemoteSystems

CommandResults

Perspectives

Page 8: © 2014 IBM Corporation 1691, How to Become a Rational Developer for the i Power User Kenny Smith, Strongback Consulting Edmund Reinhardt, IBM Alan Boxall,

• Easily import connections from your peers• Connect using the wizard in the remote systems view

Connect to the i

1

2

3

4

Page 9: © 2014 IBM Corporation 1691, How to Become a Rational Developer for the i Power User Kenny Smith, Strongback Consulting Edmund Reinhardt, IBM Alan Boxall,

The Help System

9

Search Bar

Table of contents

Index pageSearch Results

Navigation Bar

Contentpane

Personal bookmarks

Page 10: © 2014 IBM Corporation 1691, How to Become a Rational Developer for the i Power User Kenny Smith, Strongback Consulting Edmund Reinhardt, IBM Alan Boxall,

• LPEX editor can emulator other editors (SEU, ISPF, vi, emacs)• Open preferences → LPEX → Appearance → Set profile to SEU

Make your editor act like SEU

Line commands

Command area

ContextMenu

Page 11: © 2014 IBM Corporation 1691, How to Become a Rational Developer for the i Power User Kenny Smith, Strongback Consulting Edmund Reinhardt, IBM Alan Boxall,

• Remote system explorer• Creating filters• Manage jobs• Discover the editors• Remote compilation

Learn to Walk

Page 12: © 2014 IBM Corporation 1691, How to Become a Rational Developer for the i Power User Kenny Smith, Strongback Consulting Edmund Reinhardt, IBM Alan Boxall,

• Objects– Navigate objects using filters

• Commands– Create compile commands

• IBMi Contexts• Jobs• IFS Files• Spooled Files• Qshells

– Unix like shell to interact with IFS

Remote Systems Explorer

Page 13: © 2014 IBM Corporation 1691, How to Become a Rational Developer for the i Power User Kenny Smith, Strongback Consulting Edmund Reinhardt, IBM Alan Boxall,

• Filters allow you to view only what you need to work with• Isolate to specific libraries, jobs, or files for a given project• Apply filters to libraries, jobs, spooled files, IFS files• Filters can have one or more filter strings

Create Filters

Page 14: © 2014 IBM Corporation 1691, How to Become a Rational Developer for the i Power User Kenny Smith, Strongback Consulting Edmund Reinhardt, IBM Alan Boxall,

• Drill down on a subsystem• Right click to access the job’s context menu• End, hold, or begin live debugging of a job

Manage Jobs

Page 15: © 2014 IBM Corporation 1691, How to Become a Rational Developer for the i Power User Kenny Smith, Strongback Consulting Edmund Reinhardt, IBM Alan Boxall,

• All the functions you have in a CL command you have here• Create quick shortcuts to handle your most common functions

– This is where your productivity really starts improving!

Remote Commands

Page 16: © 2014 IBM Corporation 1691, How to Become a Rational Developer for the i Power User Kenny Smith, Strongback Consulting Edmund Reinhardt, IBM Alan Boxall,

• Create filters to isolate specific directories on the IFS– i.e. /QIBM/UserData/WebSphere/AppServer/profiles

• Change permissions on files via the context menu• Navigate the IFS, into directories and add/remove files just like a

windows file structure• Also, launch a mini-terminal Qshell, with command line help

Manage IFS Files

Page 17: © 2014 IBM Corporation 1691, How to Become a Rational Developer for the i Power User Kenny Smith, Strongback Consulting Edmund Reinhardt, IBM Alan Boxall,

• Screen Designer• Report Designer• Master the LPEX editor• Debugging

Learn to Run

Page 18: © 2014 IBM Corporation 1691, How to Become a Rational Developer for the i Power User Kenny Smith, Strongback Consulting Edmund Reinhardt, IBM Alan Boxall,

• WYSIWYG Designer for developing your display files

Screen Designer

Page 19: © 2014 IBM Corporation 1691, How to Become a Rational Developer for the i Power User Kenny Smith, Strongback Consulting Edmund Reinhardt, IBM Alan Boxall,

19

Use properties view to modify attributes and keywords for the file, records and fields.

Outline view for navigating in the editor and selecting the file,

records and fields.

Design areaDesign, source and preview modes

Screen controls allow you to specify which records should be visualized together in the

design area.

Palette: drag and drop parts from the palette to

the design area.

Screen Designer

Page 20: © 2014 IBM Corporation 1691, How to Become a Rational Developer for the i Power User Kenny Smith, Strongback Consulting Edmund Reinhardt, IBM Alan Boxall,

Report Designer

Page 21: © 2014 IBM Corporation 1691, How to Become a Rational Developer for the i Power User Kenny Smith, Strongback Consulting Edmund Reinhardt, IBM Alan Boxall,

• Convert your code to Free Form RPG• Filter your code• Use the Selection tools• Hex Edit a line• Master Keyboard shortcuts• Use the LPEX source prompter

Master the LPEX Editor

Page 22: © 2014 IBM Corporation 1691, How to Become a Rational Developer for the i Power User Kenny Smith, Strongback Consulting Edmund Reinhardt, IBM Alan Boxall,

LPEX Demo

Page 23: © 2014 IBM Corporation 1691, How to Become a Rational Developer for the i Power User Kenny Smith, Strongback Consulting Edmund Reinhardt, IBM Alan Boxall,

• Use SCM / CLM• iProjects • Application Diagram Viewer• Create Web Services

Learn to Fly

Page 24: © 2014 IBM Corporation 1691, How to Become a Rational Developer for the i Power User Kenny Smith, Strongback Consulting Edmund Reinhardt, IBM Alan Boxall,

• Most vendors have plugins to RDi to manage your source– Team Concert (of course!)– Arcad– Turnover– MKS Implementer– Aldon

• SCM Should be planned as part of your RDi rollout– Begin using the tool with SCM and your life will be much easier– Using different libraries for different versions is NOT SCM– Using save files for historical capture, is NOT SCM

SCM = Source Code Management

Page 25: © 2014 IBM Corporation 1691, How to Become a Rational Developer for the i Power User Kenny Smith, Strongback Consulting Edmund Reinhardt, IBM Alan Boxall,

• Compare source to previous versions

• Lock a member from editing (optimistic, or pessimistic)• Have traceability to work items, and to requirements, and trace a

specific version of a source member to production• Have your source automatically compiled right after you check it

in (continuous integration)

What you can do with SCM / CLM

Page 26: © 2014 IBM Corporation 1691, How to Become a Rational Developer for the i Power User Kenny Smith, Strongback Consulting Edmund Reinhardt, IBM Alan Boxall,

• The core of any SCM tooling• Your source is pulled down to the local workstation• You edit code, and check it back in• The SCM server puts in the correct target libraries• SCM will store a history of all of your edits• iProjects allow for remote/disconnected development

iProjects

Page 27: © 2014 IBM Corporation 1691, How to Become a Rational Developer for the i Power User Kenny Smith, Strongback Consulting Edmund Reinhardt, IBM Alan Boxall,

• Create a mental map of the application• Linked to the editor• Navigable• Save to documentation

Application Diagram Viewer

Page 28: © 2014 IBM Corporation 1691, How to Become a Rational Developer for the i Power User Kenny Smith, Strongback Consulting Edmund Reinhardt, IBM Alan Boxall,

28

– Provides developers with a graphical overview of the structure of their native IBM i applications

• Call graph showing subroutine, procedure, and program calls

• ILE program and service program bindings

– Currently supports ILE RPG, ILE COBOL, CL, programs and service programs

Application Diagram

Page 29: © 2014 IBM Corporation 1691, How to Become a Rational Developer for the i Power User Kenny Smith, Strongback Consulting Edmund Reinhardt, IBM Alan Boxall,

29

Application Diagram

ORDENTR member expanded to view a

call graph

ORDENTR member expanded to view a

call graph

Subroutine WrtDtaQ calls program QSNDDTAQ

Subroutine ChgOrder calls something inside the ROUTINES member

Subroutine RqsPart calls subroutine Process

Page 30: © 2014 IBM Corporation 1691, How to Become a Rational Developer for the i Power User Kenny Smith, Strongback Consulting Edmund Reinhardt, IBM Alan Boxall,

30

ILE Program and Service Program Bindings

ILE Program and Service Program Bindings

Program QQFENDSVR binds to service program

QQFUTILS

Modules WFVTACC and WFVTSVR are bound

into program QQFVTSVR These *SRVPGMs were

not part of initial user selection so details are

not shown

Selecting a node highlights it’s incoming and outgoing

connections

Page 31: © 2014 IBM Corporation 1691, How to Become a Rational Developer for the i Power User Kenny Smith, Strongback Consulting Edmund Reinhardt, IBM Alan Boxall,

© 2014 IBM Corporation

Alan Boxall

31

IBM Debug Architect - Debugging using Rational Developer for i - Analyzing Code Coverage of your testing

Page 32: © 2014 IBM Corporation 1691, How to Become a Rational Developer for the i Power User Kenny Smith, Strongback Consulting Edmund Reinhardt, IBM Alan Boxall,

• Rational products use a common debug technology for compiled languages– Products Include Java debug

• Multi-platform, multi-language debugger– Common user experience– Adapts to the capabilities of the debug engine running on the host

– Multiple debug sessions on multiple hosts

• Integrates into product to deliver a seamless Edit/Compile/Debug experience

Technology Overview

Page 33: © 2014 IBM Corporation 1691, How to Become a Rational Developer for the i Power User Kenny Smith, Strongback Consulting Edmund Reinhardt, IBM Alan Boxall,

Technology Overview

AIX(C,C++,

COBOL, PL/I)

zTPF(C/C++, ASM)

JVM(Java, JSP)

JavaDebug Model

Debug Tool(COBOL,C,C++,

PL/I, ASM)

dbx (C,C++)

Linux x86 Linux PPC

iSeries(RPG, COBOL,

C/C++, CL)

Debug ClientCompiled Lang.Debug Model

RDz/RD A&L/RDi/RAD(Eclipse based UI)

Integrated z Debugger

(COBOL,C,C++,PL/I)

Probe

Debug engines

Page 34: © 2014 IBM Corporation 1691, How to Become a Rational Developer for the i Power User Kenny Smith, Strongback Consulting Edmund Reinhardt, IBM Alan Boxall,

• Key features of the RDi debugger– Supports debugging in multiple environments

• Batch• Interactive• Multi-threaded• Attach to a running job

– Service Entry Point• Debug program without knowing how it got started• Set and debug session starts when the program is called

– Full integration with source editor• Use source navigation features e.g. outline view

Debugging Your Application

Page 35: © 2014 IBM Corporation 1691, How to Become a Rational Developer for the i Power User Kenny Smith, Strongback Consulting Edmund Reinhardt, IBM Alan Boxall,

Debug Perspective

Debug View• Process• Threads• Stackframes

Detail Views• Variables• Monitors• Programs

Source ViewLanguage sensitive editorCurrent location marked

Page 36: © 2014 IBM Corporation 1691, How to Become a Rational Developer for the i Power User Kenny Smith, Strongback Consulting Edmund Reinhardt, IBM Alan Boxall,

• Debug views can be placed in any perspective• F-keys provide shortcuts for stepping/resuming

– With focus in Source view program can be stepped

• Breakpoints– In breakpoint view– In Source view– Global enable/disable

Debug Perspective

Skip all breakpoints

Page 37: © 2014 IBM Corporation 1691, How to Become a Rational Developer for the i Power User Kenny Smith, Strongback Consulting Edmund Reinhardt, IBM Alan Boxall,

• Types– Line – stop on a specific line– Watch – stop when a variable or memory location changes

• An expression is converted to an address

• Conditional– Stop when an expression is true– Use language of program

• Thread and loop specific– From/every/to

• User label– Why did I set this breakpoint?– Saved and restored with breakpoint

Breakpoints

Page 38: © 2014 IBM Corporation 1691, How to Become a Rational Developer for the i Power User Kenny Smith, Strongback Consulting Edmund Reinhardt, IBM Alan Boxall,

• Service Entry Points for ILE on V5R2 or later– You know the program– You know the userid– You don’t know the job name

• Setting SEPs– From Remote System Explorer– From SEP view– From Editor

Service Entry Points

Page 39: © 2014 IBM Corporation 1691, How to Become a Rational Developer for the i Power User Kenny Smith, Strongback Consulting Edmund Reinhardt, IBM Alan Boxall,

Variables View

• Variables visible at current location• Can change representation to show hex• Move to Monitor view so that variable remains even when out of

scope

Page 40: © 2014 IBM Corporation 1691, How to Become a Rational Developer for the i Power User Kenny Smith, Strongback Consulting Edmund Reinhardt, IBM Alan Boxall,

• Monitors are restored next debug session on same program

• Details pane is new in v9.1– Supports very long values

• Indication of changed variables

Monitors View

Page 41: © 2014 IBM Corporation 1691, How to Become a Rational Developer for the i Power User Kenny Smith, Strongback Consulting Edmund Reinhardt, IBM Alan Boxall,

• Programs current being debugged• Option to display non-debuggable programs

• Add and remove programs

• Navigate to entry point in program

Programs View

Page 42: © 2014 IBM Corporation 1691, How to Become a Rational Developer for the i Power User Kenny Smith, Strongback Consulting Edmund Reinhardt, IBM Alan Boxall,

• Multiple ways to look at memory• 1 or 2 renderings can be displayed at same time

• Map memory using xml layout• Indicator when memory changes

Memory View

Page 43: © 2014 IBM Corporation 1691, How to Become a Rational Developer for the i Power User Kenny Smith, Strongback Consulting Edmund Reinhardt, IBM Alan Boxall,

Code Coverage

43

Page 44: © 2014 IBM Corporation 1691, How to Become a Rational Developer for the i Power User Kenny Smith, Strongback Consulting Edmund Reinhardt, IBM Alan Boxall,

Code Coverage Technology

• Determine the effectiveness of automated or manual tests– Make best use of test effort

• See coverage at the line level

• Help focus additional testing on code paths that have not been executed

• Determine if testcases are unnecessary

• Detect dead code

Page 45: © 2014 IBM Corporation 1691, How to Become a Rational Developer for the i Power User Kenny Smith, Strongback Consulting Edmund Reinhardt, IBM Alan Boxall,

Code Coverage Technology

• iSeries support added in v9.1• Built using Debug technology• “If you can debug it, you can capture CC results”

– No additional build steps.. Just ensure it is debuggable

• Multiple levels of CC– Program/Procedure/Line

• Several report types– RDi– HTML– PDF (new in v9.1)

• Tag results with testcase ID• Source is annotated with results

Page 46: © 2014 IBM Corporation 1691, How to Become a Rational Developer for the i Power User Kenny Smith, Strongback Consulting Edmund Reinhardt, IBM Alan Boxall,

Launching Code Coverage

46

Popup menu on selected

Program

Page 47: © 2014 IBM Corporation 1691, How to Become a Rational Developer for the i Power User Kenny Smith, Strongback Consulting Edmund Reinhardt, IBM Alan Boxall,

Code Coverage Report

Page 48: © 2014 IBM Corporation 1691, How to Become a Rational Developer for the i Power User Kenny Smith, Strongback Consulting Edmund Reinhardt, IBM Alan Boxall,

Code Coverage annotated in the editor

Page 49: © 2014 IBM Corporation 1691, How to Become a Rational Developer for the i Power User Kenny Smith, Strongback Consulting Edmund Reinhardt, IBM Alan Boxall,

Code Coverage HTML Report

Page 50: © 2014 IBM Corporation 1691, How to Become a Rational Developer for the i Power User Kenny Smith, Strongback Consulting Edmund Reinhardt, IBM Alan Boxall,

Code Coverage HTML Source View

Page 51: © 2014 IBM Corporation 1691, How to Become a Rational Developer for the i Power User Kenny Smith, Strongback Consulting Edmund Reinhardt, IBM Alan Boxall,

Code Coverage Customization

These results can be accumulated see the coverage of the total suite of tests as well as speeding up the analysis of subsequent test runs.

Can track the coverage at the higher level of procedures or programs

Option to generate HTML and PDF at time of run. Reports can be generated later.

Page 52: © 2014 IBM Corporation 1691, How to Become a Rational Developer for the i Power User Kenny Smith, Strongback Consulting Edmund Reinhardt, IBM Alan Boxall,

Code Coverage Program Level

• IBM i program (SRVTESTP2) invokes another service program (SRVTESTSV). Both of the targeted programs were covered in this run.

Page 53: © 2014 IBM Corporation 1691, How to Become a Rational Developer for the i Power User Kenny Smith, Strongback Consulting Edmund Reinhardt, IBM Alan Boxall,

Code Coverage Compare Results

Page 54: © 2014 IBM Corporation 1691, How to Become a Rational Developer for the i Power User Kenny Smith, Strongback Consulting Edmund Reinhardt, IBM Alan Boxall,

About Us: Strongback Consulting

• IBM Advanced Business Partner– SVP certified– Strongly focused on DevOps, enterprise modernization and application lifecycle

management– Key Industries Served: Finance, Insurance, Healthcare, Manufacturing, Government– Rational Design Partner

Discover us at:http://www.strongback.us

Subscribe to us athttp://feeds.feedburner.com/StrongbackConsulting

Socialize with us on Facebook & LinkedIn http://www.facebook.com/StrongbackConsulting

http://www.linkedin.com/company/290754