Presentation is loading. Please wait.

Presentation is loading. Please wait.

® IBM Software Group © 2013 IBM Corporation Updated: April, 2013 Jon Sayles RDz Technical Enablement Introduction to Rational Developer.

Similar presentations


Presentation on theme: "® IBM Software Group © 2013 IBM Corporation Updated: April, 2013 Jon Sayles RDz Technical Enablement Introduction to Rational Developer."— Presentation transcript:

1 ® IBM Software Group © 2013 IBM Corporation Updated: April, 2013 Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for System z – Version 8.5 for ISPF Developers

2 2 IBM Trademarks and Copyrights  © Copyright IBM Corporation 2009, 2010, 2011, 2012, 2013. All rights reserved.  The information contained in these materials is provided for informational purposes only, and is provided AS IS without warranty of any kind, express or implied. IBM shall not be responsible for any damages arising out of the use of, or otherwise related to, these materials. Nothing contained in these materials is intended to, nor shall have the effect of, creating any warranties or representations from IBM or its suppliers or licensors, or altering the terms and conditions of the applicable license agreement governing the use of IBM software. References in these materials to IBM products, programs, or services do not imply that they will be available in all countries in which IBM operates.  This information is based on current IBM product plans and strategy, which are subject to change by IBM without notice. Product release dates and/or capabilities referenced in these materials may change at any time at IBM’s sole discretion based on market opportunities or other factors, and are not intended to be a commitment to future product or feature availability in any way.  IBM, the IBM logo, the on-demand business logo, Rational, the Rational logo, and other IBM Rational products and services are trademarks or registered trademarks of the International Business Machines Corporation, in the United States, other countries or both. Other company, product, or service names may be trademarks or service marks of others.

3 3 Course Topics  Course Name: Rational Developer for System z  Course Description: Learn how to use Rational Developer for System z to do z/OS traditional development, maintenance, support and for Enterprise Modernization of z/OS applications  Pre-requisites: Some experience developing COBOL, CICS, DB2 and IMS applications using z/OS is expected. A working knowledge of SQL is also recommended.  Course Length: ~20 hours depending on topics selected  Topics (Agenda)  Getting Started - installing and configuring RDz - and the course materials, and using Eclipse  The RDz Workbench and introduction to Eclipse –Code analysis tools –Editing (maintaining and developing) COBOL, CICS, DB2 and IMS code –Local syntax check and (optionally) Local debugging  The Data Perspective: –Working with relational data sources –Modifying test data –Editing and testing SQL statements  Working with remote system resources: –Connecting to a mainframe –Data management –Accessing and editing files –Remote program compile/link/bind  z/OS Application Development –Creating MVS Subprojects –Creating and customizing project properties  Debugging z/OS Applications –Debugging Batch Applications –Setting Debug Tool for Online Applications  Working with File Manager –Creating test data –Editing complex file-types  Working with mainframe ABENDs using Fault Analyzer –Creating Fault History views –Analyzing and solving mainframe ABENDs  Creating and modifying BMS Maps using the BMS Map Editor  Optional session on using RDz for Web Service creation and consumption

4 4 Course Contributing Authors  Thanks to the following individuals, for assisting with this course:  Craig Branham, IBM / Rational Learning Development  Zvi Weiss, Certified IT Specialist, Rational Software for System z  Kevin McMillin, Dillards  Vijay U Sankar, IBM  David Hawreluk, IBM  Raymond Chan, Scotiabank  Robert Crowe, CVS/Caremark  Larry Moore, Travelers Insurance  Nancy Kidd, State Auto Insurance  Joel Duquene, IBM / AD Tools  David Myers/IBM  Venkatuday M Balabhadrapatruni/Santa Teresa/IBM  Hunter Williams/Accenture  Chris Sellers/Total System Services, Inc.  Brice Small/IBM  Mads Zandersen/Xact Consulting  Bo Nilsson/IBM

5 5 Table of Contents  Learning from these slides  Course assumptions  RDz Workbench and Graphical Development overview  RDz/Eclipse Development Techniques  Navigation options  z/OS Development Techniques Using RDz  Accessing files  Analyzing source programs  Editing and Syntax Checking Source Files  Appendices  Code reuse  The COBOL Editor

6 6 Using this PowerPoint There are two types of slides in this PowerPoint: 1.Workshop slides – which indicate that you are to "do something" using RDz (instructions will be on the slide) The  in the slide heading. 2.All the other slides contain conceptual learning material Some of the slides in this PowerPoint contain additional explanations and/or program code that you can use in workshops. To view a PowerPoint slide note: 1.Move your mouse-pointer over the bottom of the slide border until the cursor becomes a north-south facing pointer 2.Left-click and holding the left mouse-button down, drag the bottom border of the slide upwards until you see the text in the note 

7 7 Course Assumptions 1. You know ISPF and have used it for at least two years, doing production work on z/OS with COBOL, PL/I or Assembler  Note that all of the workshops in this course are in COBOL – although files exist that are Assembler and other languages for you to experiment with – as time permits 2. You have:  No experience with Eclipse or RDz  Some experience with PC tools  You have used MS-Windows applications for at least one year  RDz installed and running on your workstation at version 8.0 or later  Note that all ISPF discussion/examples and screen captures assume IBM-installed ISPF product defaults – not any 3 rd party or custom Dialog Manager applications you may have installed on your mainframe

8 8 UNIT Topics: RDz for ISPF Developers  The RDz Workbench – Terms and Concepts  Editing COBOL Programs  ISPF Prefix Area Commands  Editing With Keystroke Shortcuts  Find and Replace Dialog   Creating New Programs From Scratch  Miscellaneous Features – Hex edit, Content Assist  Paragraph (control flow) and Data Flow Analysis, Source Formatting and Code Review  Working with Copybooks and Property Files  Appendices

9 9 Topic objectives After completing this topic, you should be able to:  Describe the essential RDz terms and vocabulary – as they relate back to ISPF:  View  Perspective  Menus –Context menu –Toolbar menus  Work with Views:  Define "view"  Maximize/Minimize/Open/Close/Resize different workbench views  Work with Perspectives:  Define "perspective"  Switch perspectives  Reset (to their installation defaults)  Work with a graphical mouse  Access the help system

10 10 MVS Resources z/OS Datasets z/OS Datasets JES JES TSO TSO CICS Region CICS Region IMS Region IMS Region SCM SCM CLISTs/REXX CLISTs/REXX What is Rational Developer for System z (RDz)? RDz Listener Started Task Security/Authorization RACF/ACF-2/Top Secret RDz interacts with z/OS resources through a host-installed listener … and interacts through JDBC drivers to data sources RDz Client Software Data Resources DB2 Data Objects DB2 Data Objects IMS Databases IMS Databases JDBC RDz also interacts with data sources (DB2 tables/views, IMS database segments) through efficient JDBC access  Eclipse-based IDE that breaks the barriers of the green-screen platform  Runs on Windows and Linux  Integration point for z/OS Application Development tools See Slide notes on SSL/Encryption and Linux client support

11 11 Why use RDz For Traditional TSO/ISPF Development?  Developer Productivity  RDz has an enormous assortment of tools that:  Emulate the functionality of ISPF – for fast on-ramping of veteran TSO developers  Complement the functionality of ISPF – to automate, streamline and simplify the tasks of everyday z/OS maintenance, production support and development  Integrate with tools within and outside of the IBM solution set – which allow you to tap into your site-specific trusted and mature development processes, and access high-end functionality from IBM and OEM solution providers running on Eclipse  Code Quality  RDz also has tools that improve:  Code maintainability  Production application run-time efficiency  Development Environment Modernization  RDz has technology that appeals to both veteran TSO programmers and - especially to the next-generation of z/OS developers, who are used to modern development tools  RDz is the new 3270 – and a single platform for:  z/OS traditional development  Java/J2EE and C++ development  z/OS application modernization

12 12 z/OS Development, Maintenance and Production Application Support Access Datasets/Source Files Program Analysis Enterprise Modernization Source Development CICS Web Services IMS Soap IMS Web 2.0 Source Navigation Windows (Standard) Navigation ISPF PF-keys + extensible Hot-keys Outline View Hover Open Declaration / Arrow keys Open copybooks Windows metaphor Edit/Browse/View “Favorites” – “Most recently used” ISPF and RDz Source Editing PF-Keys Hexedit Prefix Area Commands Command Line Commands Colorized statement support Local History PC Source editing functionality Code refactoring Wizard-driven DB2 Stored Procedure generation Comment/Un-comment multiple lines Access to 3270 Emulation within Eclipse All development options “preference-enabled” Generate: WSDL WSBIND file XSD files Deployment manifest Stub modules Test and Deploy WSDL Use Cases: Bottom Up Top Down Meet in the middle Generate XML/WSDL COBOL/PLI converters Manifest files Use Cases: Bottom Up Top down (PL/I only) Meet in the middle SCM: IBM: Team Concert, SCLM, ClearCase CA: Endevor, Panvalet, Librarian, Serena: Changeman ISPW RDz Functional Taxonomy – a Partial List Submitting/Managing Jobs Submit and Locate Job Integration with JES Job Organization options (Filters) Show JCL Cancel/Purge Windows Screen Real Estate Size-able views Multi-window development Source Filters Collapse/Expand paragraphs/sections SCM functional integration PDS Support Migrate/Recall Support Local and Remote file support Tooling support in single or across multiple LPARs Source and PDS Search QSAM Data File Search Browse Load Module Search Load Library Use of Regular Expressions Program Logic tools Control Flow Analysis Data Flow Analysis Where used/Where Referenced Content Assist COBOL, PL/I, Assembler SQL: Embedded, Interactive CICS statements Dataset Management CICS Service Flows 3270 "screen scraping" Aggregate transactions Automate processes Expose as web services Syntax Check and Build Real-time validation Local and Remote Syntax Checking Integration with z/OS Build Process Test and Debug Integration with PD Tools/Debug Tool Integration with Xpeditor and CA-Intertest Editing Data Sources QSAM File Editor DB2 Table Editor IMS Segment Editor VSAM File Editing with File Manager Integration with File-Aid Plug-ins Allocate/ Rename/Delete Create GDG Model Create VSAM Dataset Search Compress Code Quality Code Review Source Format File Compare Automated Unit Test Copy Files Within an LPAR Across LPARs LPAR  PC Functional Integration with z/OS REXX/CLIST/3 rd Party Tools: Menu Manager HATS Eclipse Plug-in Integration RDz Product Integration Languages COBOL, PL/I, Assembler, Java, C/C++ JCL/CLIST/REXX SQL BMS/MFS WSDL, HTML, XML 4GLs supported with Eclipse Tooling

13 13 ISPF Crossing the Chasm – From ISPF to RDz  The ISPF development paradigm consists of:  Typing   Familiarity with ISPF:  Panels  Commands

14 14 ISPF RDz Crossing the Chasm – From ISPF to RDz  Using RDz the development paradigm changes to:  Using a Graphical/Windowed IDE …with cutting-edge tools – that scale to the complexity of your z/OS development tasks An RDz Debug session with: - Monitored expressions - Dynamic data update - Breakpoints - Access to source tools - Program analysis - Flow diagram - Navigation - Real-time access to Edit and Browse: - DB2 table values - IMS Database values - VSAM files - QSAM files

15 15 RDz Crossing the Chasm – From ISPF to RDz  To become productive using RDz you will need to:  1.Get the hang of using a mouse for navigation  2.Understand the differences in development tool terms and concepts 3.Familiarize yourself with the RDz workbench organization – Menus, "Views" and "Perspectives" 4.Translate your existing development techniques to use RDz and learn some new ones not  RDz is not "rocket science" but mastering it takes practice, and hands-on application  A short list of RDz benefits includes:  Improved productivity – see Benchmarking IDE Efficiency:  https://www.ibm.com/developerworks/mydeveloperworks/wikis/home?lang=en#/wiki/W2e35a50023ef_4b39_a867_04fb9e1d3329/page/Distance%20Learning%20Resources/attachments https://www.ibm.com/developerworks/mydeveloperworks/wikis/home?lang=en#/wiki/W2e35a50023ef_4b39_a867_04fb9e1d3329/page/Distance%20Learning%20Resources/attachments  Lowered development costs through LPAR workload reduction  Addition of new professional skills (Web Service development, Eclipse-based IDE experience, model-driven development, JCA development, etc.)  Better job satisfaction

16 16 Launching Rational Developer for System z  When you launch RDz from your desktop it prompts you for a " workspace "  A "workspace" is the highest-level folder on your workstation that contains:  Files that are in local z/OS projects  Meta-data ("data about data") – examples: –Your development preferences and settings –Your z/OS connection information  C:\rdzwksp85 C:\rdzwksp85 WorkstationHard-drive  ISPF Option 0  Datasets stored on your PC C:\rdzwksp85 Custom Workspace

17 17 The RDz "Workbench" – a Graphical IDE Based on Eclipse RDz Workbench Tabs (lots of tabs)  Menus and toolbars  Scrollbars for navigation

18 18 ISPF Menus - Primary Option Menu - Panel Menus  In ISPF you use menus to navigate from option to option, and from panel to panel Your initial impression of RDz might be that virtually everything is brand-spanking new. But that's not the case. For example, in ISPF you use menus:

19 19 RDz Menus And in RDz you use menus (you can also use a Toolbar)  A Toolbar is simply a shortcut to certain menu functions Standard Menu  Toolbar 

20 20 RDz Menus – the Context Menu  RDz also makes use of Context Menus to simplify development tasks The context-menu is accessed by: 1. Selecting something 2. Pressing the right-mouse button Right-mouse "Context" menu   RDz's menus are used to access development functionality - individual tools within the workbench

21 21 Views and Perspectives RDz Views and Perspectives tabbed resize-able “Views” The RDz IDE is organized as a collection of tabbed and resize-able windows called “Views” Views Views display information or provide access to: - z/OS datasets - Local projects - Source editors - Syntax errors - Dataset editors - Analysis tools - Debug monitors - DB2 tables - SQL statement results Outline View COBOL Editor View RemoteSystemsView z/OSProjectsView Views A Perspective is a collection of Views related to/organized around common tasks – such as z/OS development, Debugging, DB2/SQL/Stored Procedure development and testing, etc. All of the Views that you see, and that relate to a common task are called a "Perspective"

22 22 ISPF Panels as "z/OS Views and Perspectives" Browse (=1) an "ISPF view" DSList (=3.4) an "ISPF view" Consider that RDz's Views/Perspectives are a graphical way of organizing functionality that you've been working with for years Each ISPF panel is equivalent to an RDz "View" ISPF itself is the "Perspective"

23 23 The Benefits of a RDz's IDE concurrently Instead of maneuvering to access panels and working sequentially, in RDz the functionality you need is always in-focus – you work concurrently Access Datasets + Dataset Management Access Jobs (Outlist facility) Edit a program Dataset Statistics Submit a Compile File Compare  File Search

24 24 Review – Terms and Vocabulary  On z/OS  TSO or ISPF is equivalent to an RDz "Perspective"  Each ISPF panel or ISPF option/dialog is equivalent to an RDz "View"  You can also think of a perspective as an ISPF menu panel such as =3 (Utilities)  You use menus and commands to navigate to and from ISPF panels/views  Using RDz  There are different Perspectives for different kinds of development work:  z/OS Project development work (browse/edit/compile) – z/OS Perspective  Debugging – Debug Perspective  DB2 and SQL work – Data Perspective  Perspectives contain one-to-many "Views"  Each View is specific to some development function:  Edit  Browse  Analyze  You can:  Resize, open and close/Maximize and minimize views  RDz menus are primarily used to access development tools and functions

25 25 Keyboard vs. Mouse Development Primer You will use GUI development techniques with RDz:  Type statements using the Editor and use Hot Keys to perform certain functions.  Navigate through wizards, through your source files, and do other development activities with your mouse. If you’re new to mouse development consider the following: Left-mouse button Select some thing - Click – to set focus to or to select a field - Select a file in the Editor Scroll-bar manipulation Double-click a file to open it in the Editor Open a Workbench menu (at the top) Select (Left-mouse), hold, drag and drop a resource – used primarily for: - Opening Split-Screen views in the editor - Dragging and dropping files - CICS/BMS and IMS/MFS screen painting Right-mouse button context menu Opens a “context menu” - From a program in the Editor Area - Open a Declaration or Copybook - Syntax Check - Rename/factor - Copy/Paste/Move/Delete code Scrolling wheel Used to scroll up/down inside source files - Fast and convenient

26 26 Workshop – Becoming Familiar with the RDz Graphical Tools This workshop will start you down the road to RDz mastery – in the areas of GUI editing, Workbench navigation, and Eclipse tooling. You will:  Explore graphical COBOL development techniques:  Manipulate tabs  Navigate the workbench  Explore menus  Analyze a program  Edit a program Note that you will "do" or perform workshop/tasks on all slides that have this symbol  in the slide header You will read - for understanding and workshop preparation all other slides

27 27 Before We Begin Before We Begin – Product Functionality and Source Code Location  In this first introductory tutorial you will learn how to navigate the RDz Workbench, analyze and edit source using programs  The program source you work on could reside on:  Your PC – in a "Local Project"  An IBM mainframe – in libraries or sequential datasets  Your mainframe – in libraries or managed by your SCM  It does not matter where your source code is stored, the RDz features, functions and techniques you will learn work the same way  Eventually you will work exclusively with program source that resides on your mainframe.  However, in this class you may use program source code that resides on your local workstation, or on a mainframe. Local Files And Datasets Where does my source live?

28 28 Workshops For This Section  Time to try out the techniques shown using RDz and sample programs  You will need to have downloaded and unzipped the Custom Workspace onto your C:\ drive  This workspace contains:  All of the sample programs, copybooks, JCL, etc.  Starter Property Group files – for doing certain development techniques  Connections to the IBM mainframe for:  MVS Files  DB2  A sample Filter and Saved Search Query  Sample Snippets – for code reuse

29 29  Workshop – Launch RDz and Select the Custom Workspace start  From your desktop or the Windows start menu launch RDz  When you are prompted for a Workspace use the Browse… function to find either: C:\rdzwksp85 or C:\rdzwksp8.0.3 (depending on which release you are using) RDz v8.5 users  RDz v8.0.3 users 

30 30  Workshop – Launch RDz and Select the Custom Workspace z/OS Projects  RDz opens in what is called the: z/OS Projects Perspective   If after RDz opens, you notice a "Welcome Screen", most you likely did not unzip the custom workspace correctly. To correct this: 1. Close RDz. 2. Unzip your custom workspace directly onto the c:\ root drive. 3. Re-open RDz

31 31  Workshop – Launch RDz and Select the Custom Workspace – RDz Enterprise – v8.5.1  If you are using RDz Enterprise – which was delivered on or after version 8.5.1 – you will see an Enterprise Projects view and an Enterprise Development perspective   This course material is based on "z/OS Projects" – and so, if you are using RDz Enterprise, please translate all content that references: z/OS Projects to  Enterprise Projects throughout the course - in all workshops and in the Powerpoint slide materials The "Enterprise Projects" view is functionally equivalent to the "z/OS Projects" view. And the "Enterprise Development" perspective is the same as the "z/OS Projects" perspective.

32 32 The RDz "Workbench" – Project Organization  You will work with a variety of COBOL resources: programs, copybooks, compile listings, executables, data files and so forth.  In this first module of RDz class you will store, organize and manage the workshop resources in "Local Workstation Projects"  Later in this course you'll copy all of the files we'll use to your mainframe  When you work with your production source you'll be accessing files exclusively on your mainframe RDz  RDz resources are organized into - Project(s) - Folders – and sub-folders - Files Local Workstation Project Folders  Files 

33 33 Left-right slider bar  Workshop – Navigating a File in the RDz Graphical Workbench StartApp.cbl Double-click StartApp.cbl cobol Either from your mainframe PDS, or from the cobol folder, in the RDzClass project Using your mouse: 1. Move the slider bars:  Up and down  Right and left Get comfortable moving the slider bars to navigate in the source file.  Note that if the editor window is sized wider than the 80-column source, the Right/Left slider disappears 2. Left-click the up and down scrolling arrows:  To scroll one line at a time through the source file  The COBOL Editor These scrolling techniques are similar to pressing PF8/PF7/PF10/PF11 in ISPF Up-down slider bar Recall that – if you're using RDz v8.5.1 substitute "Enterprise Projects" for z/OS Projects throughout the workshop instructions

34 34  Resizing a View in the Workbench You might wish to see more program source at-a-glance. There are many ways to do this, but we'll start by resizing the view windows: - - Move your mouse-cursor over the right-hand border of the editor window  It will turn into an East-West facing pointer  - - When this happens: resize the view - Left-click, and holding the left-mouse button down, drag to the right or left and resize the view You can also select the bottom window border. Left-click and hold + drag to make the window's height larger As time permits, spend a few minutes working with mouse scrolling and window-sizing graphical development techniques This window resizing technique is similar to setting your host emulation product screen size (24X80, 32X80, etc.)

35 35  Workshop – Opening, Closing and Navigating Within Source Files Practice makes perfect: Close Close the StartApp.cbl editor session NOT  If you made any changes to StartApp do NOT save them BNCHS602  Open BNCHS602 (from your mainframe PDS or from RDzClass)  Use the scroll bars to scroll  Up and down  Right and left  Use the up and down scrolling arrows  Resize the editor window, make it wider:  Horizontally  Vertically NOT  Close the editor – and do NOT save changes Close the editor by clicking the Red X Note: Try PgUp/PgDn. In the next section we'll show you how to use PF7/PF8

36 36 Maximizing and Restoring Views It's often useful to maximize and restore views for various development tasks.  Steps:  To maximize a view:  Double-click in the middle of the view tab  You can also click the Maximize icon in the top-right hand corner of the view  To restore a view back to its original size:  Double-click (again) in the middle of the tab  Or click Restore

37 37  Workshop - Manipulating Views – Open, Close, Maximize, Restore  From your RDzClass project (or the mainframe): MTCHMERG.cbl 1.Double-click MTCHMERG.cbl and load it into the editor 2.Double-click the editor tab to maximize the editor view 3.Scroll up and down a few times in the editor 4.Double-click the editor tab to restore the editor not 5.Close the editor do not save any source changes (if you happened to make any) CPAT400.cbl 6.Load CPAT400.cbl into the editor 7.Maximize the editor view 8.Scroll up and down a few times 9.Restore the editor view 10.Close the editor - by clicking the X in the tab 11.(Time Permitting) Open some other files from other folders into the editor and practice maximizing/restoring editor views 12.When finished close all editor sessions by: 1.Right-click over a tab Close All 2.Select Close All

38 38  Workshop - Resetting your Perspective When you're first getting used to new software, it's easy to do things inadvertently – like close views, or resize them – making the views too small or too big Window An easy fix is to restore your workbench is to access the Window menu and either:  Reset  Reset your perspective to the RDz installation defaults …or… Show  Open (Show) views you may have closed accidentally  Let's try it (do the following):  Close a few of the views  Resize the editor or some other view  Now: Window 1.Left-click the Window menu 2.Click: –Reset Perspective… OK –At the prompt, click OK Show View  Note that from the Window menu you can also open other perspectives and open specific workbench views (the Show View option)

39 39  Workshop - Open (Show) View RDz has a lot of functionality – all of it accessed through views. And even though you're not going to learn about every available view, you should know how to open a specific view: Do the following:  Do the following:  Close the Remote Systems view  Close the Properties view  Reopen (Show) a view: 1.Left-click the Window menu 2.Click:  Show View > Remote Systems Repeat the above steps to re-open the Properties view

40 40 Split Screen and Working With More Than One Program at a Time When you're developing/analyzing/editing programs, it can be useful to be able to view multiple source files simultaneously In ISPF you press PF2 (Split-Screen) and Browse/Edit a second file Using RDz it's simple to work with independent program edit views … (next slide for details)

41 41  Workshop – Working With More Than One Program at a Time (How To) From the mainframe, or within z/OS Projects/within: RDzClass and the cobol directory: 1.Double-click StartApp.cbl – to load it into the editor 2.Double-click PrintApp.cbl – to load it into the editor tab 3.Double-click the PrintApp.cbl tab – to maximize the editing view With both programs open in maximized view: Left-click and hold the left mouse button 4.Left-click and hold the left mouse button down over the PrintApp.cbl tab as you drag your mouse to the right 5. When your mouse moves over the blue scroll-bar it will turn into a bold right-facing pointer. Release the mouse button 

42 42  Workshop - Working With More Than One Program at a Time  You should now be in Split-screen edit on two different programs  To Restore the editing view to a normal frame view: Double-click over the tab again  Notes 1. this may have seemed like a lot of individual steps, but once you've done the GUI technique a few times, the motion will become quick, and you'll find it easy to do 2. These are multiple "physical" windows – you have carte' blanche to work with your source: - Browse - Edit All of RDz's tools are available in either view  Practice makes perfect Close Startapp, Printapp and open: EBUD01 EBUD02 EBUD03 Create a split-screen view  Restore the view to a single edit screen  Note – by "Normal frame view we mean including the other RDz Workbench views

43 43 Split-Screen  It's even more common to view the same program in split screen In ISPF you split screen and load the same program into Browse or View mode (=1) In RDz it's simple to work in independent edit sessions on the same file – Press: Ctrl+2 Edit session 1 Edit session 2

44 44  Workshop – Split-Screen From RDzClass or your mainframe COBOL PDS:  Double-click StartApp.cbl  Double-click StartApp.cbl – to load it into the editor Ctrl+2  Press Ctrl+2 (Hold down the Ctrl key and press the 2 key on your PC)  Double-click the tab to maximize the view of both source files full edit mode in both sides of the split screen Unlike ISPF (which only allows you to browse the same source in another split-screen session) you are in full edit mode in both sides of the split screen  To close the view, click the X in the right-hand corner of the split-screen  Practice makes perfect: Open MTCHMERG.cbl and split-screen. Close the split-screen. Close StartApp. Repeat with BNCHS601.cbl. Split screen, Maximize/Restore the views, close the split-screen, etc

45 45 Split-Screen Q&A Q. What about F9 …or… is there a a hot-key combination I can use to swap between split screens? A. Most of the time you'll just click your mouse into the "other" split screen to set focus, however you can press: Alt+Shift+Right-arrow key to swap from the left screen to the right – and Alt+Shift+Left-arrow key to swap from the right screen to the left Q. Remind me again – how do I close Split-Screens? A. If you're editing the same program, click the red-X in the top right hand corner If you're editing two different programs close the view tab Q. Can I split screens horizontally? A. Yes – here's how: Splitting one program's source horizontally: 1. Press Ctrl+2 to split the source view 2. Right-click inside the program and from the Context Menu select: Horizontal split

46 46 Outline View – for Program Understanding and Navigation Basically, a hyper-linked SXREF of variables, paragraphs and sections, you can use the Outline view to navigate – as well as understand the layout of your code. Note: The Outline view is the simplest way to move around within the Procedure Division

47 47 Section Summary What have you done so far? 1.Launched RDz and closed the Welcome tabs to access the z/OS Projects perspective 2.Created a new project – populated with example COBOL programs 3.Opened a program into the "COBOL editor" 4.Navigated up & down, right & left using 1.The scroll bars 2.The single-line-at-a-time arrows 5.Resized your editor window by dragging the window frame, making it: 1.Wider (width) 2.Deeper (height) 6.Maximized views and Restored them back to normal size in the Workbench 7.Reset your z/OS Projects perspective to the RDz default 8.Opened views that might have been closed accidentally 9.Split-screen, and edited two programs at once 10. Split-screen, and been in Edit on the same program 11. Outline view – for program navigation

48 48  Workshop - RDz GUI-Editing and Navigation Techniques – 1 of 3 From RDzClass > cobol: open: TRMTRDZ.cbl 

49 49  Workshop - RDz GUI-Editing and Navigation Techniques – 2 of 3  Use the scroll bars to slide up and down, right and left TRMTRDZ.cbl  Maximize the view of TRMTRDZ.cbl Ctrl+2  Press Ctrl+2 – to open a split-screen view the program  Scroll up and down in either side of the split-screen view  Close the split-screen view  Double-click the tab to Restore the normal workbench views Let's try some new techniques…  Hover and Outline View  Anywhere in the Procedure Division hover your mouse-pointer over a variable  Find the Outline View, and using it to navigate, click:  PROCEDURE DIVISION  DATA DIVISION DATA DIVISIONWORKING STORAGE  Expand the DATA DIVISION and click WORKING STORAGE PROCEDURE DIVISION  Expand the PROCEDURE DIVISION and click several paragraphs WORKING STORAGE  From within WORKING STORAGE, expand and click a few variables  Using the Outline view, find the following –FILE CONTROL –1000 ABEND ROUTINE –FD TRMTERR  In the COBOL editor, scroll to the bottom of the file and click: 1000-DB2-ERROR-RTN Outline –What happened in the Outline view? 

50 50  Workshop – RDz GUI-Editing and Navigation Techniques – 3 of 3  Continue GUI editing practice with the Outline view TEST1.cbl 1.From z/OS Projects, open: TEST1.cbl Outline View 2.From the Outline View – do the following: Click on several of the COBOL Divisions Expand the FILE SECTION, Click on: FD STUDENT-FILE Expand the PROCEDURE DIVISION, and click on 200-PROCESS-RECORDS Click on and Expand the WORKING-STORAGE SECTION Click a line in TEST1 within the editor and note the effect on the Outline View Try selecting other program fields and paragraphs Optional – but useful for analyzing large production program source: Click the Outline View's menu icon for Sort ascending (a hyperlinked SXREF) Click some of the other toggle Outline sub-menu icons: Note – these are "toggles" – they turn the effect on (by clicking with your mouse) then off by clicking again 3.Close all files in the editor – don't save changes

51 51 Open Declaration (F3)  You've already seen the Hover feature, where you can view a variable's declaration by simply hovering your mouse over the variable.  But what if you are interested actually modifying the variable? That would require you to navigate to the variable's declaration.  RDz provides an immediate navigation technique known as "Open Declaration"  To use this technique:  Click your mouse in the variable name  Either:  Press F3 …or…  Right-click and select Open Declaration  Considerations:  This technique works in COBOL and PL/I  You can open a variable or paragraph declaration  If the declaration is in a copybook, RDz will open the copybook (providing your SYSLIB Property Group value is correctly set)

52 52 Back to/Forward to Arrows – for Navigation RDz "remembers" your position in a source file during an edit session, and allows you to return Back to – some previous line you were on - then reposition Forward to the line you were editing before you clicked Back to  Back to toolbar icon  Returns you to your previous position in a source file  Forward to toolbar icon  Once you click "Back to" – and return to a previous position in a source file, Forward to will re-position your cursor "forward" to the line you most recently were on when you clicked Back to  Considerations:  Back to and Forward to are particularly useful when used in conjunction with Open Declaration (F3)  The Back to/Forward to lists span source files – meaning that if the last thing you did was in a different source you are currently editing, RDz will:  Open that source file in the editor  Reposition your cursor to the line you were editing Back toForward to

53 53  Workshop – Miscellaneous Editing and Program Navigation Features Open WARDRPT.cbl 1.From the Outline view, navigate to the 400-NEW-PATIENT paragraph 2.Hover your mouse over the variable named: PATMSTR-KEY 3.Click your mouse in the variable named: PATMSTR-KEY and press F3 4.Click the Back to toolbar icon … what happened? 5.Repeat steps 2  4 with the variable: PATPERSN-KEY 6.From the Outline view, navigate to the beginning of the PROCEDURE DIVISION 7.Click your mouse in the paragraph name: 999-CLEANUP and press F3 8.Click the Back to toolbar icon 9.Click the Back to toolbar icon 4 more times (what happens?) 10.Click the Forward to toolbar icon 5 times (what happens?) 11.From the Outline view, navigate to 100-MAINLINE 12.Move your mouse over the paragraph name in the editor and click F3 13.Click the Back to toolbar icon 14.Close WARDRPT

54 54 Show In > Program Control Flow View – Analysis Tools – RDz Version 8.5 If you are maintaining a program that either, you didn't code, or you coded it so long ago you no longer understand its structure, you'll like the Program Control Flow view  From the Context Menu  Show in  Program Control Flow  Click a paragraph or section name and the editor will synchronize with the graphical view of the program structure  Giving you: - Top-down view - Bottom-up (code) view

55 55 Program Control Flow – Paragraph/Section Navigation Features – V8.5  Besides seeing the entire Procedure Division, options exist to re-draw the diagram showing program logic:  From the selected Paragraph/Section downward  From the selected Paragraph/Section backwards Provides how did I get here? view

56 56 Program Control Flow – Additional Features – Version 8.5  Zoom to fit   Search   Save graphic View to disk  Search for paragraphs/sections  Size/Resize the graphics in the View Save the graphic View to disk  See Slide Notes on Program Control Flow for IMS IO-PCB and ALT-IO- PCB calls, and CICS RETURN and XCTL calls

57 57 Workshop –  Workshop – Program Control Flow View – RDz v8.5 – 1 of 2 From RDzClass - open WARDRPT.cbl  From the Context Menu  Show in > Program Control Flow  Select (left-click) a few paragraphs, and note the synchronizing effect on the COBOL code in the editor  Select 000-HOUSEKEEPING  Right-click and select: Show Program Control Flow from here  Note that the paragraph graphics probably scroll out of view  Press Zoom to fit  Click a few other paragraphs in zoom to fit mode  Right-click again on 000-HOUSEKEEPING and select: Show All  Again click: Zoom to fit  Click on the Zoom in icon a number of times (enough to understand cause + effect)  Type 450 in the search box, and press  Enter  Right-click and again select: Show Program Control Flow from here  Right-click over 1000-DB2-ABEND-RTN and select: Show Program Control Flow to here  Right-click over any other paragraph and select: Show All  Click: Reset zoom (Ctrl+0)  Right-click over the tab, and select: Detached   Move the detached frame up and stretch it vertically  Double-click the code (WARDRPT) tab to go full-screen (see next slide) See Slide Notes on Program Control Flow for IMS IO-PCB and ALT-IO-PCB calls, and CICS RETURN and XCTL calls

58 58 Workshop –  Workshop – Program Control Flow View – RDz v8.5 – 2 of 2 Try any of the techniques you just learned with this detached graphical view + code Close both views, and (time-permitting) open: MSTRUPDT, BKP92C2, BNCHS601 … and try out the Program Control View techniques  From the Window menu, select Reset Perspective 

59 59 Manipulating Views for a Superior Development U.I.  With ISPF you have been used to seeing a 3270-style system of dialogs  RDz – specifically, the Workbench views can be much more flexible  Besides enlarging/shrinking views by dragging the view frame, you can:  Move views around – within the workbench  Close views (temporarily) – to maximize access to specific tools  Detach views – for better use of screen real estate  When you want to return to the default views & tooling from the Window menu, select: Reset Perspective…

60 60 Workshop  Workshop Manipulating Views (v8.5) – 1 of 2  From RDzClass:  Open TRTMNT.cbl  Right-click and from the Context Menu select: Show in > Program Control Flow  Right-click over the Program Control Flow tab – and select: Detached  Size and move the detached view to the right (as shown below)  Double-click the editor tab, for TRMNT.cbl to maximize the view  Click the paragraphs in the Program Control Flow view – to navigate, and note that the editor sync's up  Close both views

61 61 Workshop  Workshop Manipulating Views (v8.5) – 2 of 2  From RDzClass:  If you use CICS, repeat the previous techniques with NACT01.cbl  If you are an IMS online shop, repeat the previous steps and techniques with DFSIVA34.cbl

62 62 Occurrences in Compilation Unit – Analysis Tools – RDz Version 8.5 – 1 of 3 If you are analyzing, researching a data problem – like verifying Data Flow or doing Impact Analysis, or if you just need to quickly lookup the occurrences of a variable within your program you can: 1. Select the variable 2. Right-click and select: Occurrences in Compilation Unit This opens a Search view with all occurrences of that variable: 1. Hyperlinked back to the source line of the reference 2. Color-coded – showing the variable reference in statements that - Declare or Modify a variable in gold - And all other variable references in statements in gray

63 63 Occurrences in Compilation Unit – RDz Version 8.5 – 2 of 3 You can use Occurrences in Compilation Unit effectively to investigate data movement, analyze the impact of a change, research the cause of a data-specific ABEND (like an 0C7 or 0C4), etc. Here's an example showing Search on a variable, with the Search Results view moved, and "pinned" (this is covered in the workshop) and additional searches for Occurrences in Compilation Unit exposed through RDz

64 64 Workshop –  Workshop – Occurrences in Compilation Unit – RDz 8.5 From RDzClass – open PARTSUPP.cbl 1.From the Outline view navigate to 300-LOOKUP-SECTION and from within 301- MATCH-WREHOUSE: COLR-DIV-CLI-3Hover over: COLR-DIV-CLI-3 (note the variable declaration) Left-click your mouse in: COLR-DIV-CLI-3. Right-click and select: Open Declaration (note the ease of navigation) Occurrences in Compilation UnitRight-click again, and select: Occurrences in Compilation Unit 2.From the Search view that is opened. Click several of the hyper-links to navigate to different lines in the source files Pin the Search View 3.Click the icon on the far-right called: Pin the Search View This will "persist" this view – so that you can continue to use its search results while opening additional Search views against other variables 4.Double-click the last entry in the search list (line 5731) FE-SUBSC 5.From the statement in line 5731 Left-click your mouse in FE-SUBSC (the subscript)

65 65 Workshop –  Workshop – Occurrences in Compilation Unit – RDz 8.5 (3 of 3) Occurrences in Compilation Unit 6.Right-click and select: Occurrences in Compilation Unit Note that there are many, many references to this variable throughout the source. In fact, it would be nice to provide this View with room, wouldn't it? 7.Left-click on the View tab. Hold and drag the view to the top right-hand corner of the workbench and drop the tab (let go of the left-mouse button) This will provide the Search view with more vertical space FE-SUBSC 8.From the FE-SUBSC Search view: Click several hyper-links – and scroll within the window – and click hyper-links… Pin this Search viewAs you did previously for the other Search view: Pin this Search view FE-SUBSC 9.From the next to last entry in the FE-SUBSC Search view (line 11866): FE-CAL-CODEOpen another Occurrences in Compilation Unit on: FE-CAL-CODE FE-CAL-CODE COLR-DIV-CLI-3 10.Left-click on the FE-CAL-CODE Search view tab. Hold, Drag & Drop the view to the right of the COLR-DIV-CLI-3 Search view 11.Find a few other variables to try this with (your choice) 12.Close all of the Search views when you are finished

66 66 Workshop –  Workshop – Occurrences in Compilation Unit – Screen Capture from Previous Slide's Step 10 Using RDz for variable (data) analysis – with multiple hyper- linked Search windows working together to construct a view of a program's use of fields. Note that you can launch additional Searches and stack the results views within the workbench for complex analysis tasks

67 67 Show In > Data Elements – RDz Version 8.5 Along with Occurrences in Compilation Unit, you can get a global (Data Division) – wide list of your variables and paragraphs with: Show In > Data Elements This creates a sort-able list of all the data elements with several actions against them: Hyper-link to any variable declaration Re-sort the list by various columns Filter the list: By data element name Remote paragraph/section labels Remove columns Open and mark occurrences throughout the source (prior topic)

68 68 Sorting the Data Elements view – RDz Version 8.5 Can sort/re-sort by any column in the view Useful for: Categorizing variables  sort by Declared In Organizing by COBOL Group  sort by Top-Level Item Sorting by numeric …vs… character data  sort by Declaration Business Rules candidates  sort by References

69 69 Filtering the Data Elements view – RDz Version 8.5 Filter view results horizontally search by data element name or text pattern Filter out or add back into the view results paragraphs and sections, and FILLER ("unnamed items") by clicking the small downward-pointing triangle on the far-right corner of the view Filter out Columns Acts as an on/off toggle to add/remove columns from view

70 70 Open and Mark Occurrences from the Data Elements view – RDz Version 8.5 The Context Menu allows you to open the Occurrences view from any data element And you can combine techniques to display precise subset and superset lists of data elements, hyperlinked to other elements that relate to your work

71 71 Workshop –  Workshop – Show In > Data Elements – RDz 8.5 (1 of 2) From RDzClass – open PARTSUPP.cbl 1.Right-click and from the Context Menu select: Show In > Data Elements 2.Click the small, downward-pointing triangle on the far right-hand side of the view, and select: Filters > Hide program labels What did that do? 3.Sort (both ascending and descending) by the following criteria: Name Level - to show all 88-level items in the program Declared In - breaks the data item usage by copybook and COBOL "main" program Item Type – What's the deal with the mnemonic? References – useful to view data items that Utilized a lot (good candidates for "business rules mining") Never referenced (only declared – sometimes referred to as "dead code")

72 72 Workshop –  Workshop – Show In > Data Elements – RDz 8.5 (1 of 2) 4.With the Data Elements sorted by References in descending order (with the highest-referenced variables at the top of the list) Right-click over NEW-UNIT-GROSS-AMT and select: Open Declaration (what happened?) Occurrences in Compilation Unit (again… what happened?) From the Occurrences in Compilation Unit search results view, scroll down to find the two statements in the program that modify the contents of NEW-UNIT-GROSS-AMT Double-click each reference in the Occurrences in Compilation Unit view (what happened?) Imagine you were doing research on why an 0C7 or 0C4 ABEND occurred (and you had to trace through the program to find statements that modify the contents of a variable). Can you see the use of this RDz functionality in helping you discover things like this? 5.(Time permitting) Spend another few minutes experimenting with Show In > Data Elements functionality

73 73 Working With Copybooks – 1 of 2 Your programs most likely contain copybook or Include files. To open them using RDz: Double-click to select the copybook name:  Right-Click Open Copy Member  Select: Open Copy Member

74 74 Working With Copybooks – 2 of 2 You can make seriously good use of RDz's multiple window development paradigm using this technique. Precisely how RDz locates your copybooks is a topic that will be covered in the course module: " RDz Workbench – Using Remote Systems Explorer" Property Group The actual feature is called a Property Group

75 75 Workshop –  Workshop – Accessing Copybooks From RDzClass – open TRTMNT.cbl Ctrl+F 1.Press Ctrl+F copy All 2.Enter the word copy in the Find area. Click All 3.(one copybook at a time): Double-click a copybook name (to select it) Select Open, Browse or View Copy Member 4.Repeat the above steps using the PARTSUPP.cbl program 5.Optional : Create the Program + copybooks multi-file view shown on the next slide by: Maximizing the screen Dragging and dropping all of the copybooks to different areas of the editing frame Close all files when your are finished Press Ctrl+W to expand your source after the Find command

76 76 Optional Workshop –  Optional Workshop – Screen Capture for Step 4 of Previous Slide

77 77 Open a Program From a Static CALL Statement – RDz Version 8.5 You can do the following (When your "Property Groups" are setup correctly):  Select a CALL statement:  Right-click on the program name  Select: Open, View or Browse Program

78 78 Open a Program From a Dynamic CALL Statement – RDz Version 8.5 The same thing holds true for opening:  A dynamically called program – when a variable in Working Storage has a hard-coded VALUE clause with the program name XCTL LINK  A program referenced in CICS XCTL and LINK commands

79 79 Workshop (RDz v8.5) –  Workshop (RDz v8.5) – Opening Called Programs – 1 of 2 From the Property Group Manager view 1. Double-click (to open): COBOL Sample Property Group 2. Select the COBOL tab 3. Select Editor Configurations 4. In Local paths: enter (copy and paste) the following ${project_loc}\RDz Resources\RDz Education\RDzClass\cobol 5. Press Ctrl+S (to save your changes to the Property Group) Note – How RDz finds called programs when you open the source from your mainframe will be explained in the same upcoming course module: "RDz Workbench – Using Remote Systems Explorer" 3. 4. 1. 2.

80 80 Workshop (RDz v8.5) –  Workshop (RDz v8.5) – Opening Called Programs – 2 of 2 From RDzClass – open ADSORT.cbl 1. Find the CALL and XCTL statements 2. Select and: Open, Browse and/or View the static or dynamically-referenced modules. Optional: As you might have done for the copybook workshop, open these called programs in a multi-windowed view: Full-screen, drag&drop the tabs, etc. Note – Exactly how RDz finds called programs will be explained in the same upcoming course module: "RDz Workbench – Using Remote Systems Explorer"  And again, the actual feature is called an RDz Property Group

81 81 Concept – Right-Mouse (Context Menu) as "What's available help"  As you begin your work with RDz, you may wonder how to do something, where to find an option, etc.  By pressing the Right-mouse button, RDz will show you – in the context of what's selected – what functionality or operations are available  Context Menu options available when you've selected a PDS

82 82 The RDz Product Help and Documentation  RDz has a rich and easy-to-use help system, with:  A global encyclopedia of topics (Help Contents)  Search  Index  List of hot-keys (Key Assist…)  List of web resources  Links to product and help update processes  About (shows installed version and release levels along with information on eclipse plug-ins)

83 83 RDz Context-Sensitive Help  Any time you are presented with a wizard that contains a question mark in the bottom left-hand corner you can click it, and learn about the topic that is "in context" 

84 84 The Product Help – Tips & Techniques Help > Welcome  From: Help > Welcome – access recorded scripts for learning specific technical topics

85 85 The RDz User Group – an Online Community for RDz Developers  Quarterly web-conferenced meetings  No-charge technical 90-minute meetings/sessions/presentations  Speakers from:  RDz developer community  Business partners  IBM  Topics include:  New release updates  Tips & Techniques  Meeting themes:  SOA  Business Rules  Integration points  Advanced analysis  Etc  Q&A with IBM https://www.ibm.com/developerworks/mydeveloperworks/groups/service/html/communityview?communityUuid=22eac60d-8bab-44e2-a5b8-a4fe1c1aecad

86 86 IBM Education Assistant Internet-based Learning – The IBM Education Assistant Complementing the RDz Distance Learning, you might want to check out the IBM Education Assistant: http://publib.boulder.ibm.com/infocenter/ieduasst/rtnv1r0/index.jsp http://publib.boulder.ibm.com/infocenter/ieduasst/rtnv1r0/index.jsp  From this site you will find annotated learning modules on specific product features RDz Version-specific Links

87 87 Review – RDz Workbench, Navigation and Code Analysis Use Cases RDz Editing Tool Considerations Open a program for edit or BrowseLoad the file into the editor from your SCM Double-click on the file to open it from either your PDS or z/OS Projects. To browse a file, from the mainframe, Right-click on the file and Browse Browse is only available if you open a file from z/OS Re-open views closed by mistakeUse Window > Reset PerspectiveCould also use Window > Show View Scroll within the fileWindows scrolling, PgUp/PgDn, Mouse scroll wheelIn the next section you'll learn how to setup PF8/PF7 Navigate to a variable's declarationSelect the variable. Press F3 – or use the Context MenuNote that if the variable is in a copybook Property Groups must be setup Navigate back to where you previously were in your source Use the Back arrow on the toolbar Navigate throughout the PROCEDURE DIVISION Use the Outline view Discover (understand) your program's business logic Use Program Control Flow (Context Menu > Show In > Program Control Flow). Could also use the Perform Hierarchy tool Can un-dock these diagrams for better use of screen "real estate" Work with multiple programs/files – displaying them side-by-side Open multiple programs or files (JCL and COBOL, COBOL program + Copybooks, etc.). Drag and drop the editing tab to the right Split-screen on a single program, enabling source edit on either split Press Ctrl+2 to split screen. Click the X in the top right-hand corner to return to a single editing view Can also split horizontally, which works well for editing data files Understand data flow and the effect of various statements on a variable Use Occurrences in Compilation Unit (Select a variable, and from the Context Menu > Show In > Occurrences in Compilation Unit) Check your syntaxWatch for the small-yellow triangles in the left-hand border (Real Time Syntax Validation). Can also use Local Syntax Check, which is covered in Optional Topics Create annotations (reminders – in a file, like ISPF labels) Utilize Bookmarks or Tasks. Bookmarks are created by double-clicking in the left-hand margin of the Editor. There are Tasks and Bookmark views – also covered in Optional Topics Open a called program's source file from within the calling program Double-click to select the variable (dynamic call) or literal (static call) and select Open, View or Browse Program Property Groups must be setup for this to work Open a copybook within a programDouble-click to select the variable (dynamic call) or literal (static call) and select Open, View or Browse Copy Member Property Groups must be setup for this to work Return a source file to previously saved state (outside of your SCM) From the Context Menu select: Replace With > Local HistoryOptional Topics covers Local History Compare two files for source differences Select both filenames and from the Context Menu select: Compare With > Each other Optional Topics covers file Compare

88 88 Optional Topics and Workshops For This Section  If you have time, and are comfortable with the material covered, please read through the slides – and/or try out the techniques shown using RDz and sample programs.  The development techniques covered in these slides can make your standard z/OS Maintenance, Production Support and Development tasks much easier, and make you more productive. So at some point – perhaps after class please consider returning to these optional topics to build out your RDz skills.  Also – if you have access to RDz installed on your mainframe and time permits, please try out the techniques shown using your own application source.

89 89 Optional Workshop –  Optional Workshop – Horizontal Split-Screen 1. Open two programs in the editor 2. Left-click on the view tab. Hold and drag downwards until the mouse-pointer becomes a south-facing arrow 2. Release the left-mouse button 1. 2. 

90 90 Bookmarks, Task Lists, Source Compare, History  The next few slides cover:  Additional RDz Views  Bookmarks  Task List  Remote Error List  Additional RDz technical features and facilities  Annotating your programs with Bookmarks and Task Lists  Comparing source files  Comparing your source files against historical versions – and returning your source to a prior version without typing  These RDz features can be useful in many practical usage scenarios  If you have time, please:  Read the slides  Try the workshops  If you are taking this course with an instructor, be sure to ask for help if you get stuck

91 91 File Compare – Source Programs – 1 of 2 It's often necessary to compare two different releases of the same program source. RDz makes this easy to do. Select two source files:  Select the different.CBL files – note that they could be in the same or in a different project  Hold the Ctrl key to click (select) more than one file  Right-click – select:  Compare With >  Each Other  Notes:  You can compare two files  These files can be in the same or in different libraries. They can be on one or multiple LPARs  You can compare files between column boundaries  From Window > Preferences  LPEX Editor > Compare  Specify:  Column Restricted Search  Start and End boundaries

92 92 File Compare – Source Programs – 2 of 2  Results are displayed in side-by-side windows (Maximized for best viewing). Notes:  Lines changed and new lines from either source file shown in different shades  Can click on the right-hand column border to navigate – and/or use the toolbar   The COBOL Structure Compare portion of this deltas screen isolates and shows individual source deltas

93 93 Workshop –  Workshop – File Compare This workshop will demonstrate the file compare functionality. HOSPIN.cbl 1.(From RDzClass\cobol): Open: HOSPIN.cbl Ctrl+A 2.Press: Ctrl+A - to select all lines Ctrl+Insert 3.Press: Ctrl+Insert (or use the Context Menu) - to copy all lines New > File 4.Right-click over your project's \cobol\ folder, and select: New > File HOSPIN2.cbl 5.Name the file: HOSPIN2.cbl Ctrl+S 6.Paste: Ctrl+S - all of the copied source lines in your new program 7.Make a few changes to the source:  Delete a line, Add new line, Modify a line 8.Save your changes (Ctrl+S) 9.From z/OS Projects:  Select both programs (use the Ctrl key + left mouse button)  Right-click and select:  Compare With > Each Other 10.Experiment with:  The Structure compare features  The toolbar icons  The scrolling options  Close all files

94 94 Optional Topic – Optional Topic – File Compare (Explanation of Toolbar Functionality)  Besides being able edit in either side of the File Compare window (and save changes) the toolbar provides the following actions 

95 95 Organizing your tasks – Bookmarks View  What's a Bookmark?  Bookmarks are tags that allow you to quickly find specific lines of source in your program.  Reminders, sort of: electronic sticky pad notes  Create a Bookmark:  (From inside an edit session) Double-click, or Right click over the left-hand border, next to the line you want the Bookmark on - Select: Add Bookmark… - (optionally) Overtype the name of the Bookmark - Click OK –A small vertical book icon appears in the border   To clear a Bookmark:  Right-click over an existing Bookmark  Select Remove Bookmark  To see and use your Bookmarks:  From the Windows Menu  Select Show View  Bookmarks Three Bookmarks One has a customized Bookmark name See Slide Notes

96 96 Additional assignment organization features – Tasks  What's a Task?  Tasks are Bookmarks that let you capture additional information. Besides tagging lines they allow you to:  Set a task priority  Specify whether a task has been completed  Enable as follows (from an edit session)  Right click in the left-hand border, next to the line you want the Task on - Select: Add Task… - (optionally) Overtype or add text in the Task Description - Select a task Priority - Check if the task is complete See Slide Notes

97 97 The Task View  To see your Tasks in the Tasks View  Open the Windows Menu  Select Show View > Other > (type  ) tasks  From this View you can: - Navigate to specific Tasks -  Check/un-Check Task completion - Sort your Tasks - Select and work with multiple Tasks Select two or more Tasks Right-click  Context Menu options SORT

98 98  Optional Workshop – the Bookmarks and Tasks Views  Bookmarks View. With TEST1.cbl open in the editor, do the following:  Set two or three Bookmarks throughout the program (overtype the default text on at least one Bookmark)  Navigate to a Bookmark using the green rectangle in the right-hand border of the editor  Open CNTRLBRK.cbl and set a bookmark  Open the Bookmark View – and:  View your Bookmarks  Navigate to Bookmarked lines in both programs  Delete all of your Bookmarks  OPTIONAL –  OPTIONAL – If time permits:  If you can connect to your mainframe, open a program and set a bookmark somewhere in the code  Close the program  Reopen the program by clicking that Bookmark in the Bookmarks view

99 99  Optional Workshop – the Tasks View  Open three different COBOL programs in the editor and do the following:  Set (create) one or two Tasks in each program (overtype the default text on at least one Task)  (While still in edit on one of your programs): Navigate to the different Tasks using the green rectangle in the right-hand border of the editor  Open the Tasks View – and:  Modify the Task Description  Set certain Tasks status to complete  Navigate to the Task lines  Sort the list by Priority  Sort the list by Complete/not complete  OPTIONAL –  OPTIONAL – If time permits:  If you can connect to your mainframe, open a program and set a task in the code  Close the program  Reopen the program by clicking the Task in the Tasks view  Select all of the Task information – Copy the Tasks and paste into rows of an Excel spreadsheet – also:  Delete the Completed tasks  Delete the remainder of your Tasks – en masse (using the Context Menu)

100 100 Optional Topic – Named Marks  Another way of supporting ISPF Labels is through the use of Named Marks  This allows you to:  Set various named marks throughout your source code  Navigate back to the named marks with minimal effort (like ISPF labels but easier)  Marks are a two step process: From the editor:  Select a line in which to set a Mark  From the Edit menu  Name a Mark… –Mark > Name a Mark… –Find Other > Find Mark  Mark names are case-sensitive  Note that Marks do not:  Persist after you've closed your editing session  Become part of your source code

101 101  Optional Workshop – Named Marks  Open PARTSUPP.cbl  Scroll down inside this source file and set three named Marks  From the Edit menu:  Mark > Name a Mark…  Type the name (keep it short – and remember, Marks are case-sensitive)  Now find the three named Marks  From the Edit menu:  Find Other > Find Mark Kind of a pain to keep hitting for Find Other > Find Mark, isn't it? Try this:  From Window > Preferences > LPEX Editor > User Key Actions  Key: a-m –Lowercase "a"  Action: nameMark  Click: Set  Key: a-t –Lowercase "a"  Action: findMark  Click: Set  Click Apply, then OK  Repeat the above steps, but instead of using the Edit menu for Find Mark, try using: Alt+T

102 102 Optional Topic – Local History – 1 of 3  RDz provides historical versions of your saved source file changes  This allows you to:  Return a source file to a previous version  Compare a source file with a previous version  To compare versions:  From any file open in the editor  Right-click  Select: Compare With  Local History…  To replace versions:  From any file open in the editor  Right-click  Select: Replace With  Local History…

103 103 Local History – Source Programs – 2 of 3 From the Compare screen  Double-click the Revision time  This is down at the bottom of the screen  This loads the selected version into a file compare frame  Verify the version's changes  Click Replace … or … Cancel

104 104 Local History Preferences – 3 of 3 You can specify how long RDz maintains Local History files From Window > Preferences  Expand General  Expand Workspace  Select Local History  Click OK to save

105 105 Workshop –  Workshop – Local History This workshop will demonstrate the Local History file functionality. 1.Open TEST1.cbl (either from your mainframe PDS or the RDzClass cobol folder) 2.Add a new COBOL statement 3.Modify one COBOL statement 4.Delete a COBOL statement 5.Save your changes 6.Right-click over TEST1.cbl Select: Replace With > Local History… 7.Double-click one of the Revisions 8.Note the file comparison 9.Select Replace 10. Note what happened to your changes Close all files in the editor Do not save any changes

106 106 Additional Views and Features – Syntax Checking and Remote Error List  You can Syntax Check your source program, and work with syntax errors as hyperlinks from the Remote Error List  By double-clicking on a problem from the Remote Error List, the file in question is opened in the Editor, and your mouse is positioned to the line in doubt  Note that you can also  mouse-over a Red-X in the editor border to learn more about the nature of the syntax error  Syntax Checking is invoked from the Context menu (Right-mouse):  Within a file – when the file is opened in the editor  On the file list, presented in the z/OS Projects view, or Remote Systems explorer Hyper-linked syntax error, in the Remote Error List view Source file containing the problem

107 107  Workshop – Remote Error List View RDzClasslocal projectTEST1.cbl ** From your RDzClass local project, open TEST1.cbl  Right-click over the source in the editor area, and select: Local Syntax Check  Local Syntax Check  Remote Error List  Open the Remote Error List view – Note the warnings  Enter a typo/syntax error - See screen capture below for an example  Right-click, and from the context menu select: Save and Syntax Check  Save and Syntax Check  Look at the Remote Error List - Find the error message line  Double-click the error line in the Remote Error List Ctrl+Z  Press Ctrl+Z - this will undo your source modification  Right-click again, and select: Save and Syntax Check  Right-click Context Menu If you are using a mainframe, or if your program contains EXEC CICS or EXEC SQL statements please see the Slide Notes

108 108  Optional Workshop – Local Syntax Check 1. From Remote Error List:  Right-click  Select: Remove All Messages 2. From your RDzClass local project, open SYNTAX.cbl  Right-click over the source in the editor area, and select: Local Syntax Check 3. From Remote Error List: Double-click a syntax error to hyper-link to the code in question Optionally – fix the syntax error Quit when this exercise is no longer fun We know – in our world it's not difficult to create syntax errors either. You'll probably get a little practice at this (cleaning up syntax errors through Local and Remote Syntax Check) after class Remote Syntax Check is covered in an upcoming module

109 109  Optional Workshop – Check out the RDz product and external help facilities  From the Help menu, try out various options:  From Help Contents – check out what's new in the latest release  From About IBM Rational Developer for System z – find out what version you're running  Search on a few topics:  Endevor  File System Mapping  Property Group  Discover Context-Sensitive Help:  Click the z/OS File System Mapping view  Right-click inside the entries in the view and select: Add Data Set Mapping  Click on the Context Sensitive question mark (lower left-hand corner)  If you're connected to the internet, visit the COBOL Café: https://www.ibm.com/developerworks/rational/community/cafe/index.html  From the Café visit the:  RDz Hub – check out the content  From the RDz Hub visit the RDz Users Group  Scroll down  Check out the meetings  Sign up! (they're free)

110 110  Optional Topic – RDz as a "GUI File Transfer" Tool  When RDz is installed and working in your shop, you can drag & drop source datasets and files between:  PC and mainframe  Mainframe and PC  Mainframe and mainframe (from one LPAR to another)  PC and PC  Note that by "your PC" we mean "any networked drive" Optional Workshop – if you have a connection to a mainframe  Steps (assuming the RDz mainframe components have been successfully installed and configured on your host system):  Connect to a mainframe (see next section for how to)  From your PC drag & drop files to a mainframe source library (see next section for how to)  From the mainframe:  Open a library  Select a few PDS members  Drag & Drop them to one of your RDzClass folders  Select an entire PDS (library)  Drag & Drop the library to the RDzClass folder –What happened? Local Files And Datasets TransferSourceFiles

111 111 Optional Topic – Getting to other views from Maximize  In Maximized (full-screen edit) mode, all of the cool and useful RDz views are available as miniaturized icons in the sidebars  Mouse over the icons – to determine what view they represent  Click the icon – and the view "pops-up"  You can use the view while it's visible  Click back in the source – to return to full-screen edit mode and "hide" (minimize) the view  Note that the placement (location) of the minimized view icons in the sidebars can change from release to release

112 112  Optional Workshop – Hover, Hyper-links and Back  From within TRTMNT.cbl - use the Outline view to navigate into the PROCEDURE DIVISION Ctrl  Press and hold down the Ctrl Key  Mouse-over some variables - or Paragraph names... note how they turn into hyper-links - Hmmmmmmmmmm.......... what could this mean  Left-click  Left-click on a hyper-linked identifier.  Yep - Left-click takes you to the field/paragraph/section's declaration  Yep - even if that declaration is inside a copybook  Return to your place in the PROCEDURE DIVISION using the back arrow on the toolbar at the top of the Workbench How is this different than Right-click Context/Menu - or F3? It's not. But it can be one-click easier - in that you don't have to hit F3 for the look-up on each field - or use the context menu, just keep holding the Ctrl key down... scroll... click. Anyhow - the behavior is pretty cool Hyper-links inside COBOL source code – what's next built-in source History features?

113 113 Optional Topic/Workshop – One Click Hover + Open Declaration  Optional Topic/Workshop – One Click Hover + Open Declaration By holding down the Ctrl key when you hover over a variable or paragraph name, RDz hyper-links the reference to its declaration - allowing you to Left-Click and go directly to the declaration (variable or paragraph/section) Net? - Less typing - Less mouse manipulation - More productivity  Optional Workshop  Open TEST1.cbl  Navigate to the PROCEDURE DIVISION using the Outline view  Hold down the Ctrl key and mouse-over a variable  Left-click the hyper-link  Use the back arrow on the toolbar to return to your edit position in the PROCEDURE DIVISION  Try this with PARTSUPP.cbl  Partsupp is a large program that illustrates the benefits of hyper-linked navigation

114 114 Optional Topic/Workshop – Hyperlinked Program Documentation  Optional Topic/Workshop – Hyperlinked Program Documentation The Ctrl key turns anything into a legitimate hyperlink – including: internet URLS, and files stored on a networked drive. Think; Program documentation process models, etc. Workshop  Open BKP92C2.cbl  Hold down the Ctrl key  Click the file:/// link file:///  Optionally drag to create a multi-windowed view of the program and documentation side-by-side Note : If bnch.png fails to open, check the file-spec. You might have unzipped the workspace in a different location (than the C:\ root drive) file:///c:\rdzwksp85\bnch.png

115 115 Optional Topic – Identify Unreachable Code – RDz Version 8.5 You can view dead or unreachable code in the Procedure Division in version 8.5. Available from the Context Menu: Source > Identify Unreachable Code

116 116 Optional Workshop –  Optional Workshop – Identify Unreachable Code – RDz Version 8.5 From RDzClass – open SAMOS1.cbl From the Context Menu select: Source > Identify Unreachable Code Note: Indentation does not matter

117 117 Advanced Topic – The Back Arrow and Multiple Open Edit Views  Many RDz developers enjoy the multi-source views allowed by RDz (see below) – and with good reason, as they provide high-value source analysis and navigation tooling.  However, the Back Arrow is implemented as a global event listener, and does not differentiate between windowed frames. This can get confusing, as you may click the back arrow and open files, unexpectedly position in other windowed frames, etc.  As an alternative (when editing with multiple open edit views) consider clicking the small downward pointing triangle immediately to the right of the arrow.  This will open a pop-up allowing you to go to any line, in any open view – in LIFO stack sequence (last-in/first-out)  And within any single element: See: TRTMNT.cbl (8 locations) in the screen capture  Example: If you click that top element in the list you are re-focused in TRTMNT.cbl in LIFO line sequence  Also note that each time you click the back arrow the most recent source line reference is popped off (deleted from) the stack

118 118 Advanced  Advanced Workshop – Back Arrow and Multiple Open Edit Views  Open the following source files: TRTMNT.cbl, PATMSTR.cpy, TREATMENT.cpy and ABENDREC.cpy – and using the eclipse view drag & drop technique, create the RDz workbench "editing dashboard" shown below (No need to get it exact – just close)  Click inside each of the files several times – it's not important to match the screen capture exactly  Open the small, downward-pointing triangle and experiment with the Back line references.  Note the following:  By clicking any reference with (# locations) you:  Go to the line  Pop that line reference off the stack  Clicking in named files your cursor is positioned in that file

119 119 Advanced Topic – Auto Commenting Changed Lines in COBOL – 1 of 4  Your shop may require you to auto-comment columns 1-6, or 73-80 with information about changes you make to source lines. Typically this would be something like your initials and a date: JS010112 … etc.  "Out of the box" Auto Commenting is available with all of the RDz-supported languages except COBOL  But that's okay – the following slides show you how to create a COBOL Language Profile for Auto Commenting your code:

120 120 Advanced Topic – Auto Commenting Changed Lines in COBOL – 2 of 4  From Preferences > Auto Comment:  From Auto Comment Language Profiles click Add  –Add Profile Name: COBOL –Start with values from PLI  From Extension Associations click Add… …And add. cbl to the list for Language Profile: COBOL –Note that if you wanted Auto Comment to be enabled when you edit copybooks you'd need to add in.cpy  From Extension Associations: Click the Edit… button, next to the COBOL profile

121 121 Advanced Topic – Auto Commenting Changed Lines in COBOL – 3 of 4 Format  Under the Format tab, specify the options shown here   To enter an 8-character Auto Comment Insertion  Under the Insertion tab, specify:  Start column: 73  End column: 80  Optionally check Overwrite existing OK twice  Click OK twice – to close this dialog If you want to insert in columns 1  6 use the above specifications (and set Max length to 6)

122 122 Advanced Topic – Auto Commenting Changed Lines in COBOL – 4 of 4  Open a COBOL program  Right-click and from the Context Menu select: Start Flagging Changed Lines  Enter your auto comments in Base Flag:  Click OK  In the editor:  Change some lines  Insert a new line Note – if you want to stop Auto Commenting, from the Context Menu select: Change Flag > Stop Flagging Changed Lines JS060112

123 123  Advanced Workshop – Auto Commenting Changed Lines in COBOL  If time remains, try following the steps on the previous 3 slides and create Auto Comment functionality that places your two initials and the date in MMDDYY format in columns 73  80  From Window > Preferences > Auto Comment, Edit PLI as the Language Profile  Customize according to the previous slides  Save your Auto Comment preferences  Auto Comment any program in RDzClass  Modify a few lines  Add one line  When you're finished, turn of Auto Comment

124 124 Section Review What have you done so far?  Learned a few of RDz's Workbench terms and concepts – and how they contrast and compare with ISPF – including:  Workspace, Perspective, View, Menu, Editor  Understood the role of your mouse (both left or "selection" button, and the right or "context-menu" button in doing RDz development  Launched RDz and closed the Welcome tabs to access the z/OS Projects perspective  Created a new project – populated with example COBOL programs  Opened a program into the "COBOL editor"  Navigated up & down, right & left using Scroll bars  Resized your editor window  Maximized views and Restored them back to normal size  Reset your z/OS Projects perspective to the RDz default  Opened views that might have been closed accidentally  Worked in Split-screen mode  Learned a few other RDz editing techniques, utilizing:  Outline view  Back to/Forward to  Bookmarks  Task list  Local History  Remote Error List  File Compare

125 125 Advanced Topic – Accessing Remote Copybooks from Local Workstation Projects (8.5) You can configure RDz to provide access to remote (z/OS-based) copybooks – stored in PDS datasets and called programs stored in PDS datasets This is done through what are called Property Group files, a topic we will dig into a little bit later in this course. For now, if you have some background in Property Group settings and if you have a connection to a mainframe, in version 8.5: In the Property Group Manager view under Local In the COBOL tab (Copy Libraries) you can specify SYSLIB Library Names. RDz will resolve: COPY EXEC SQL INCLUDE ++INCLUDE –INC

126 126 Advanced Topic – Accessing Called Programs as Remote Program Source from Local Workstation Projects To configure RDz for called program access you can utilize the Local COBOL Settings and Editor Configurations property Separate multiple library names by one or more spaces

127 127 OPTIONAL Connecting to a Mainframe This optional section will show you how to: –Connect to a mainframe –Transfer files from your PC to the mainframe  When you've completed doing that, you can run the workshops off of your mainframe – instead from a local project  If you're using the IBM mainframe (zServerOS) you will need a TSO ID and Password, which your instructor can help you obtain  If you are using your company's mainframe:  You will have to have RDz server (the mainframe components of RDz) installed on your system  You will use your existing TSO ID and Password Please contact your instructor if you want to connect to a mainframe and are not sure if you can

128 128 The RDz Remote System explorer allows you to work with your z/OS assets and resources (programs, data files, JCL, REXX commands, CLISTS, and Batch Jobs) With Remote Systems explorer you can:  Define connections to different systems  Connect to different z/OS LPARs  View lists of files and partitioned datasets  Allocate, delete, copy and obtain statistics on datasets  Work with PDS datasets remotely  Edit source - remotely  Submit jobs  Submit TSO/REXX and CLIST commands  Create custom filters for:  Searching through disparate dataset types  Working with disparate dataset types   We will cover all of the above later in this course. For now, we will connect to the mainframe, allocate datasets and copy files from your PC to the mainframe for use in this section of the course. Using the Remote Systems explorer to Connect to a Mainframe Access to MainframeResources

129 129 How do I Use Remote Systems Explorer to Access and Edit Source? What you will do: 1.Define a connection to a z/OS LPAR (Logical Partition) 2.Allocate datasets using RDz 3.Copy files from your PC to the mainframe 4.Access and edit source files from your mainframe Notes from the above:  You must setup the connection before doing anything (else) with remote system resources (i.e. connecting comes first!)  You can do everything else in the above list at any time and in any order  If you are accessing the IBM mainframe (zserveros)  You will need to ensure that your PC can access the IP Address: 192.84.47.60 - and that your ports are open for 4035 (MVS resources) and 5446 (DB2 resources)  Start with this slide:  After finishing steps on that slide, continue with this slide: …..to the end of this section If you are working with your mainframe:  You WILL need your system programming staff to assist you in researching many of the properties (IP addresses, ports and listeners, etc.) that are necessary to successfully complete the New Connection wizard  Start with this slide named:  And continue to the end of this section

130 130  Workshop – Connecting to the IBM Mainframe From the Custom Workspace From: Remote Systems view  1.Right-click over zservos.demos.ibm.com 2.Select: Connect  This will open the Enter Password panel 3.Enter your IBM distributed credentials:  User ID:  Password: 4.Check the Save boxes 5.Expand My Data Sets 6.Open a file from one the libraries

131 131  Workshop – Connecting to Your Mainframe (1 of 4) Steps – from the Remote Systems view  1.Right-click over z/OS… 2.Select New Connection… This will begin a wizard for completing the connection specifications 3.Fill out the New Connection wizard:  Parent Profile  Will default to your local machine name  Host name:  Enter a ping-able logical name or IP address for your z/OS host machine  This can be case-sensitive  Connection name:  An optional descriptive name that will show up in the Remote Systems View  Description:  Mouse-over (hover) help for this connection  Verify host name  Will ping the host name to verify:  Connectivity  Availability of the z/OS machine Click Next >

132 132 Workshop – (2 of 4)  Workshop – Connecting to Your Mainframe (2 of 4) 4. z/OS UNIX Files definition  Specify how you would like RDz to launch the remote server (that listens for incoming activity requests from RDz on your workstation to access z/OS UNIX files and commands)  In many shops you will use the default:  Daemon Port (1-65535)  But you may have to enter a port# other than: 4035  Find this out by contacting your System Programming staff Click Next >

133 133 Workshop – (3 of 4)  Workshop – Connecting to Your Mainframe (3 of 4) 5. MVS Files definition:  Specify how you would like RDz to launch the remote server (that listens for incoming activity requests from RDz on your workstation to access z/OS files, TSO/CLIST/REXX commands and job submits)  In many shops you will use the default:  Daemon Port (1-65535)  But you may have to enter a port# other than: 4035  Find this out by contacting your System Programming staff  Click Finish  Provided you have connectivity, authorization, and have entered all of the previous settings correctly a new connection will be created for you.  However you are not connected (logged in) yet next slide…

134 134 (4 of 4)  Workshop – Connecting to Your Mainframe (4 of 4) Remote Systems view  After you have successfully created a connection to a z/OS LPAR, a new entry with the name of the connection appears in the Remote Systems view To login (or connect) to a remote z/OS system:  Right-click over your new connection Connect  Select Connect  Enter your TSO ID and Password OK  Enter your TSO ID and Password and click OK  Note that if you expand MVS Files and attempt to expand My Data Sets – or try to work with TSO Commands or access jobs (JES) a login will occur automatically  If your connection fails you will see an error message  And if it succeeds the various icons in the View will show small green arrows denoting connections See Slide Notes

135 135 Remote Systems Explorer Remote Systems Explorer (often referred to as "RSE") shows:  Your connection to the z/OS LPAR  MVS Files and "your datasets"  All files with high-level qualifiers starting with your TSO ID –You will later learn how to access any file in the LPAR  These files include: –Partitioned Data Sets (PDS or library files) –Shown as expandable windows folders –Sequential Data Sets –Shown as individual entries in the view  The JES Queue and "your batch jobs"  With access to all batch job output from jobs you "own" –You will later learn how to access any batch job output from the JES queue in the LPAR In order to use the mainframe for this portion of class, you will need to:  Allocate two Partitioned Data Sets  Copy COBOL files from your PC the new PDSs

136 136 RDz as a "GUI File Transfer" Tool  With RDz you can copy and paste, or drag & drop source datasets and files between:  PC and mainframe  Mainframe and PC  Mainframe and mainframe (from one LPAR to another) Workshop steps : In the workshop that starts on the next slide you will:  Connect to a mainframe (see next section for how to)  From your PC drag & drop files to a mainframe source library (see next section for how to)  From the mainframe you will:  Open a library  Select a few PDS members  Drag & Drop them to one of your RDzClass folders  Select an entire PDS (library)  Drag & Drop the library to the RDzClass folder  The workshop details start on the next slide … Local Files And Datasets TransferSourceFiles

137 137 Workshop –  Workshop – Allocate PDS (Libraries) for Class  Using RDz it is simple to allocate a new PDS:  Right-click over a library with the same dataset characteristics: DCB (LRECL/BLKSIZE, etc.) and select: Allocate Like…  Enter the new dataset name – and click Finish  Workshop – Using the dataset characteristics of a COBOL PDS in your TSO ID, allocate two new libraries (one library at a time) : - New Data Set:.TEST.COBOL - New Data Set:.TEST.COPYLIB Note: = your TSO ID  Note: If the dataset you are doing an Allocate Like… has been archived: Restore it on the mainframe Disconnect from RDz Reconnect and try again

138 138 Workshop –  Workshop – Copy Files From Your PC to a Mainframe  Allocating datasets on TSO creates new, empty files.  You can drag & drop or copy & paste the class programs and copybooks from your local workstation RDzClass project to the mainframe  Steps: From the z/OS Projects view 1.Expand the  cobol folder under RDzClass 2.Left-click on the top file in the list 3.Hold the  Shift key down on your PC 4.Left-click on the bottom file in the list 5.Right-click over the marked list and select: Copy 6.In the Remote Systems view: - Select (Left-click) your new COBOL PDS - Right-click and select: Paste  Repeat the above steps to transfer all of the copybooks from the  copy directory in the RDzClass project to your new COPYLIB PDS on the mainframe

139 139  Workshop – Allocate and Populate Additional Mainframe PDS Libraries Follow the steps on the previous two slides – use RSE to:  Allocate Like  Create four new PDS libraries on your mainframe, based on the dataset properties of.TEST.CBL named: –.TEST.BMS –.TEST.ASM –.TEST.JCL –.TEST.MFS  Copy/Paste (transfer) files from your PC workstation project folder, to your four new libraries (i.e. from the  bms folder to TEST.BMS, from the  asm folder to TEST.ASM, from the  jcl folder to TEST.JCL, from the  mfs folder to TEST.MFS) From the z/OS Projects view 1.Expand the folder under RDzClass 2.Left-click on the top file in the list 3.Hold the  Shift key down on your PC 4.Left-click on the bottom file in the list 5.Right-click over the marked list and select: Copy 6.In the Remote Systems view: - Select (Left-click) your new PDS - Right-click and select: Paste  When you are finished expand your mainframe PDS datasets, check to see that the files were successfully copied up to the mainframe Note Note – if you have any trouble copying (transferring files) – please see the next slide

140 140  Workshop – Allocating Adequate DASD Space For the Class Files The default DASD allocation for libraries uses BLOCKS – but we have provided quite a bit of material for use in this course. If you find that you receive an E37 out of space error message when you copy/transfer files, do the following (using a series of wizards…) 1. From MVS Files > New > Allocate Partitioned Data Set… 2. Name your Dataset 3. Select: Category: SOURCE Type: COBOL 4. Specify: Space Units: TRACKS Primary Quantity: 30 Secondary Quantity: 20 Directory Blocks: 30

141 141 Your RDzClass Files – On the Mainframe  You can now access the files in the workshops throughout this course from the mainframe.  When the instructions specify to open a file from RDzClass – or from the COBOL folder, simply open the same file from your new COBOL PDS (by double-clicking the PDS member name in the Remote Systems view)  This will transfer a copy of the file down to your workstation 

142 ® IBM Software Group © 2012 IBM Corporation Part II – Editing Your Program Source using ISPF

143 143 Editing – Topics  Edit Profiles (changing to the ISPF profile)  Editing programs using your ISPF (=2) skills  PF Key navigation  ISPF Line Commands  ISPF Prefix Commands  Combining your ISPF skills with GUI editing techniques  Common program editing techniques  Data Flow analysis  Procedural logic (Paragraph Flow) analysis  Other common ISPF techniques  Find (exclude/not exclude)  Creating new programs scratch  Working with programs that contain EBCDIC (binary) data embedded in the source file  Working with RDz Property Files

144 144 z/OS Development, Maintenance and Production Application Support Access Datasets/Source Files Program Analysis Enterprise Modernization Source Development CICS Web Services IMS Soap IMS Web 2.0 Source Navigation Windows (Standard) Navigation ISPF PF-keys + extensible Hot-keys Outline View Hover Open Declaration / Arrow keys Open copybooks Windows metaphor Edit/Browse/View “Favorites” – “Most recently used” ISPF and RDz Source Editing PF-Keys Hexedit Prefix Area Commands Command Line Commands Colorized statement support Local History PC Source editing functionality Code refactoring Wizard-driven DB2 Stored Procedure generation Comment/Un-comment multiple lines Access to 3270 Emulation within Eclipse All development options “preference-enabled” Generate: WSDL WSBIND file XSD files Deployment manifest Stub modules Test and Deploy WSDL Use Cases: Bottom Up Top Down Meet in the middle Generate XML/WSDL COBOL/PLI converters Manifest files Use Cases: Bottom Up Top down (PL/I only) Meet in the middle SCM: IBM: Team Concert, SCLM, ClearCase CA: Endevor, Panvalet, Librarian, Serena: Changeman ISPW RDz Functional Taxonomy – a Partial List Submitting/Managing Jobs Submit and Locate Job Integration with JES Job Organization options (Filters) Show JCL Cancel/Purge Windows Screen Real Estate Size-able views Multi-window development Source Filters Collapse/Expand paragraphs/sections SCM functional integration PDS Support Migrate/Recall Support Local and Remote file support Tooling support in single or across multiple LPARs Source and PDS Search QSAM Data File Search Browse Load Module Search Load Library Use of Regular Expressions Program Logic tools Control Flow Analysis Data Flow Analysis Where used/Where Referenced Content Assist COBOL, PL/I, Assembler SQL: Embedded, Interactive CICS statements Dataset Management CICS Service Flows 3270 "screen scraping" Aggregate transactions Automate processes Expose as web services Syntax Check and Build Real-time validation Local and Remote Syntax Checking Integration with z/OS Build Process Test and Debug Integration with PD Tools/Debug Tool Integration with Xpeditor and CA-Intertest Editing Data Sources QSAM File Editor DB2 Table Editor IMS Segment Editor VSAM File Editing with File Manager Integration with File-Aid Plug-ins Allocate/ Rename/Delete Create GDG Model Create VSAM Dataset Search Compress Code Quality Code Review Source Format File Compare All of the above functionality Copy Files Within an LPAR Across LPARs LPAR  PC Functional Integration with z/OS REXX/CLIST/3 rd Party Tools: Menu Manager HATS Eclipse Plug-in Integration RDz Product Integration Languages COBOL, PL/I, Assembler, Java, C/C++ JCL/CLIST/REXX SQL BMS/MFS WSDL, HTML, XML 4GLs supported with Eclipse Tooling

145 145 Selecting an Editor  The RDz product installation default editor is the LPEX editor, but there are dedicated COBOL and PL/I language editors that we will discuss later in this course  LPEX (L P EX )  LPEX (Live Parser EXtensible Editor)  A powerful PC-style editor with language-sensitive tools and features  Contains ISPF emulation – activated by changing the LPEX editor profile (next slide)  The COBOL and PL/I language editors have a number of very powerful features  They are very eclipse-centric (i.e. they behave like Java-style editors)  They also contain a number of useful leading-edge coding features:  Collapsing/Isolating code sections  Source Formatting  These editors are well-suited for developers with little-to-no ISPF experience  We will cover these editors later in the course  But if you wish to experiment with the COBOL/PL1 editors:  Right-click your source file  Select Open With > COBOL Editor

146 146 Selecting ISPF as your LPEX Editor Profile  The LPEX editor provides a number of different editor profiles you can use for development  An editor profile provides emulation of an editor product you may have used with different software:  ispf, xedit, vi, emacs, etc.  From RDz Preferences can change editor profiles at any time during your work  Like all preferences, your editor profile decision is saved in your Workspace  If you create a new, or use a different workspace you will need to return to Preferences to customize your Editor Profile  A note about RDz's ISPF emulation:  The ispf LPEX edit profile provides almost all of the LPEX functionality, plus: –Emulation of the ISPF ( =2 ) editor –The same ISPF features are available for ( =1 ) browsing datasets  RDz's emulation is very close to z/OS ISPF edit –85  95% compatibility (depending on your shop's ISPF customization) –But all of this is within a GUI editing workbench – so initially, things will seem different from your 3270 / ISPF development experience –Also – there are a number of RDz editing features that make certain ISPF edit functionality irrelevant (i.e. COLS is not needed)

147 147 Workshop –  Workshop – Changing You Editor Profile – to ISPF  From Window  Preferences Click:  LPEX Editor And in the Editor profile list ispf –Select: ispf OK  Click: OK  Set ispf as your editor profile

148 148 Workshop –  Workshop – Command Line Location – v 8.5.1 v8.5.1 If you are using RDz client v8.5.1 – you can set your command to the top – or bottom  From Window  Preferences >  LPEX Editor > –Controls  Select top or bottom: OK  Click: OK - Change the command line to top - Open an Assembler or COBOL program from RDzClass Note - in this course the command line is screen captured at the bottom – but that makes no difference to the RDz functionality or the workshop directions

149 149 Workshop –  Workshop – Other Preferences to customize your editing sessions 1. Set Tab stops:  From Window, Preferences  LPEX Editor –Tabs  OK  Press OK 2. Enable vertical lines in the editor:  From Window, Preferences  LPEX Editor –System z LPEX Editor –COBOL Parser  Check all three options OK  Press OK  Set the above two Preferences, then: TRMTRDZ.cbl  Open TRMTRDZ.cbl in the editor  Note the new (cool) vertical lines. Try out the tab stops SeeSlideNotes

150 150 Editing Using the ISPF Profile  The RDz editor when you use the ISPF profile:  New function keys are enabled and the ISPF "Prefix Area" appears  Note  Note – the same:  Scrollbars  Status line – showing:  Current line  Columns  Command line  Colorized source  New:  Prefix area - for ISPF prefix commands  PF-key assignment  The command line now works with ISPF commands  Notes: - The Esc (Escape) key on your PC positions your cursor in the command line - The  Up arrow key on your PC retrieves the previously executed command line command ISPFNOT - ISPF command line commands are NOT case sensitive X all ; f ws-ph last 20 50 Prefix Area Status line Command line

151 151 Workshop – ISPF PF-Keys and Navigation Options: Top, Bottom, ISPF commands  Workshop – ISPF PF-Keys and Navigation Options: Top, Bottom, ISPF commands  F1 – Help  F5 – Repeat Find  F6 – Repeat Change  F7 – Page Up  F8 – Page Down  Open TRMTRDZ and do the following:  Press F1 – Note that this opens RDz Help in a separate view, and the first time you do this it will take a few seconds  Press F8 – several times to page down in the source file  Press F7 – several times to page back up in the file  Double-click on the Editor tab – to maximize the size of the Editor window  Press F8 F7  Press F8 and F7 again  Note that the # of lines scrolled has changed, according to your window size  Press and hold the F8 key down  Press and hold the F8 key down – to zoom downwards in the source file  On the command line, type the ISPF command shown. P ress after each command:  Top  Bottom  Top  Bottom Note:  Note: There is no Max/PF8 or Max/PF7 option. Instead, use: Top, Bottom – or as you learned in the previous section: PgUp, PgDn and the Scrollbars

152 152 Workshop –  Workshop – "No L" Locate – Navigate Directly To A Line In Your Program  Using ISPF you locate a given line by typing Locate, Loc or: L  Using RDz (from the command line):  Type (only) the line number  Press  Locate the following lines in TRMTRDZ.cbl 22 333 444 999 – Note that the program is not 999 lines long 143 1  The Esc (Escape) key on your PC positions your cursor in the command line

153 153  Summary – Options for Navigating Through Your Program Source  Top of file: Top  Bottom of file: Bottom  Page down: F8  Page up: F7  Page down: PgDn key  Page up: PgUp key  Click inside the scrolling area – on either side of the scroll bar to Page up or Page down  Locate any line of source by typing the Line# in the command area  Scroll up/down right/left using the:  Scroll bars  Line-at-a-time up/down – click the arrow  Your mouse scroll-wheel  Fast and convenient for positioning/centering code on-screen

154 154  Workshop – Review of Navigation Options Practice your RDz navigation skills by trying out the various scrolling and navigation techniques – and make up your own workshop.  Maximize the editor view of TRMTRDZ.cbl and practice the following:  Commands:  Top  Bottom  Hint Hint – Set your mouse cursor focus in the Command line and press the up arrow key Retrieve on your keypad to "retrieve" the previous line command This is exactly like PF12 or the ISPF Retrieve command  Practice the ISPF and RDz paging and scrolling  Practice the ISPF and RDz paging and scrolling techniques:  F8 / F7  PgDn key / PgUp key  Click inside the Scroll bar on either side of the indicator  Practice centering paragraphs, long statements, records  Drag Scroll bars up and down (left-mouse button)  One line at-a-time up/down scrolling: –Click the up/down arrows –Click (set focus) inside your source file and use your mouse's scroll-wheel  One line up Dragging  scroll bar Dragging  scroll bar

155 155 Workshop – ISPF Command Line Commands – Find/Repeat Find  Workshop – ISPF Command Line Commands – Find/Repeat Find Find RDz supports the ISPF Find command and most options and variations. Let's try out a few…  With TRMTRDz.cbl loaded into the editor, do the following: - On the command line, type the ISPF command shown and press  Bottom  top  F WS-T  Press F5 several times  Bottom  F WS-T first  F WS-T last  top  F WS-T 12 20  F WS-T first 12 20  bottom  F WS-T 12 20 first  F WS-T last  F WS-T prev  Press F5 several times  top ; F WS-T all  x all ; f ws-t all  RES Note Note – You can "stack' ISPF line commands by separating with a semi-colon. But – you also need to type a space (a blank) between the operands and the semi-colon. Hint: Up Hint: Don't forget that – with mouse focus in the Command line, you can press the  Up arrow key to retrieve the previous command  Command line

156 156 Workshop – ISPF Command Line Commands – Change, Repeat Find/Repeat Change, Undo, Exclude, Bounds, RES  Workshop – ISPF Command Line Commands – Change, Repeat Find/Repeat Change, Undo, Exclude, Bounds, RES change RDz supports the ISPF change commands and most options and variations.  With TRMTRDz loaded into the editor, do the following: - On the command line, type ISPF command Press after each command:  top  C row-sub row-idx  undo  C row-sub row-idx all  undo 12  C all row-sub row-idx  undo 12  C row-sub row-idx first  undo  C row-sub row-idx last  undo  top ; c row-sub row-idx 12 40 F5 F6  Press F5 then Press F6 F5 F6  Continue pressing F5 and F6 for "discretionary find/change"  undo 12  bottom Try a few more Find / Change command combinations:  F "Y" all  F '"Y"' all F5  Press F5  F '01' all 8 12  X all ; f '01' all  RES  X all ; f '01' all 8 12  RES  X all ; f row-sub all  c * row-idx F6 a few times  Press F6 a few times  bounds 20 40 –Then try a few Find/Change commands again char, suffix, prefix, word, char, RFIND Take another few minutes and use F with the following Find operands: char, suffix, prefix, word, char, RFIND

157 157 ISPF Prefix Commands  Most of the ISPF prefix area edit commands are supported with same functionality  For a complete list of supported prefix commands:  Place your cursor in the prefix area F1  Press F1 ISPF Prefix area commands

158 158 Workshop –  Workshop – Prefix Area Commands Using your ISPF skills, issue some ISPF commands by entering commands in the Prefix area and pressing  Enter after each edit operation SANDBOX.cbl  (From RDzClass) open the SANDBOX.cbl program in the editor – and try out a a variety of ISPF Prefix Area commands:  Repeat lines  Block repeat lines  Block delete lines  Copy a line before and after  Block copy lines  Delete a single and block delete multiple lines  Move a single and block move multiple lines  Block shift lines  Exclude lines and block exclude some # of lines  Insert lines

159 159 Optional Topics and Workshops For This Section  If you have time, and are comfortable with the material covered, please read through the slides – and/or try out the techniques shown using RDz and sample programs.  The development techniques covered in these slides can make your standard z/OS Maintenance, Production Support and Development tasks much easier, and make you more productive. So at some point – perhaps after class please consider returning to these optional topics to build out your RDz skills.  Also – if you have access to RDz installed on your mainframe and time permits, please try out the techniques shown using your own application source.

160 160  Filters in preferences and other places You can use the filtering areas of many RDz tools to streamline access to target features  From Window > Preferences type the following into the filter area and press  Enter  editor  HLASM  Sql … note the effect these filters have on the Preferences shown  From Window > Show view > Other… type the following into the filter area and press  Enter  rem  ta  cics  z/ Filter 

161 161 ISPF Prefix Area Commands – Example with Excludes/Expand up or Down  A common ISPF Prefix command technique is to:  Exclude a number of lines (Xn (where n – is a number), or XX….XX)  Show a number of the excluded lines – with an "F" or "L" prefix command  With RDz you might use show less, as you get expand/collapse functionality (plus signs). But if you like ISPF show, it is supported: Optional  Optional Workshop  To show n excluded lines within an excluded block:  Exclude lines, then position your cursor on the excluded marker  Type: L  F n … or… L n - in the prefix area –Where n is a number of lines to show  F – shows the first n excluded lines  L – shows the last n excluded lines (OPTIONAL) Try: LC and UC (lower-case/uppper-case prefix area commands) – in any COBOL program

162 162  (Optional Workshop) Changing Editor Colors – 1 of 2  First – open any file in the editor (StartApp.cbl will do) Window > PreferencesAppearance  Next, from: Window > Preferences LPEX Editor Appearance Apply Set customized attributes. After each operation, click: Apply and look at your editor view  Palette: Black Foreground  Current Line – click: Foreground, and from the Color Palette, select aqua (or green), OK then click: OK on the Color Palette Foreground  prefixArea – click: Foreground, and from the Color Palette, select aqua (or green), OK then click: OK on the Color Palette Foreground OK  selection – click: Foreground, and from the Color Palette, select Black. Click Background and from the Color Palette select: Gray then click OK on the Color Palette

163 163 Optional Topic Optional Topic - Changing Editor Colors to "Green Screen"  You might also wish to customize your editor view colors – to closely match those you use on ISPF. This is easy to do, and the steps are shown on the next slide.  Note that the screen captures throughout the rest of this course are RDz default, not customized

164 164  (Optional Workshop) Changing Editor Colors – 2 of 2  From: LPEX Editor, Parsers, Parser Style Set some more customized attributes. Apply After each operation, click: Apply and look at your editor view  Ensure that Document parser is set to: cobolZosSqlCics Foreground  Set the following Style attributes (Foreground) to aqua (or green) –User defined word –Reserved word –Function –Picture string –Non-numeric literal –Comment –Numeric literal –Sequence number OK  Click OK   If you don't like your changes, there's a "Restore Defaults" button you can click that returns the editor to the install colors Under: Preferences, LPEX Editor, Parsers, Parser Style and LPEX Editor, Appearance  Note also that, if you would like to customize the above COBOL program elements to different colors (instead of all aqua or green) feel free to return to the Parser Style attributes, and experiment with different Foreground colors for User defined word (variables and paragraph names), etc.

165 165 From: Window > Preferences > General > Appearance > Colors and Fonts  You can override the installation defaults for RDz views, view text, etc.  Use this to match your Workbench to corporate color themes/standards, etc.  Note – if your Workbench ends up looking like a Peter Max poster, and you'd like to return to the out-of-the-box colors, use  (Optional Workshop) Changing the RDz Workbench Colors

166 166 Optional Workshop –  Optional Workshop – Using num cobol – to mask out columns 1-6  num cobol in the command line utilizes positions 1-6 of your LPEX editor view for ISPF commands

167 167 Optional Workshop –  Optional Workshop – Filters in preferences and other places You can use the filtering areas of many RDz tools to streamline access to target features  From Window > Preferences type the following into the filter area and press  Enter  editor  cobol  Sql  From Window > Show view > Other… type the following into the filter area and press  Enter  rem  ta  cics  z/ Filter 

168 168 ISPF Command Line Commands – COBOL Source Numbering ISPF Command Line Commands continued – COBOL Source Numbering  RDz's statement numbering is slightly different than ISPF  The default source mode is without COBOL numbers. You can display your code with the following options:  num on  num on – like ISPF – turns the Prefix area into 6 digit sequential line numbers, incremented by 100  num cobol  num cobol – turns columns 73-80 into COBOL line numbers  num off  num off – returns the Prefix area to line numbers incremented by 1  unnum  unnum – turns off the line numbers in columns 73-80 num offunnum 1. For both num off and unnum you must be in num on mode (like ISPF) 2. The commands must entered in all caps NUM OFF or in lower-case num off COBOL Line Numbers Cols 73----80 See Slide Notes For additional Info on COBOL Numbering 

169 169 Workshop – COBOL Source Numbering  Workshop – COBOL Source Numbering Let's work with the COBOL number commands a little – do the following – and note the effect of the source numbering commands: StartApp.cbl  Load StartApp.cbl into the editor  Type this series of commands on the command line (press after each command):  num on  num off  num cobol  unnum  Close StartApp.cbl – and do NOT save your changes StartApp.cbl  Again Load StartApp.cbl into the editor – and type this series of commands on the command line (press after each command):  num cobol  num on  num off  Close StartApp.cbl – and SAVE your changes StartApp.cbl  Again Load StartApp.cbl into the editor – and note:  The COBOL sequence numbers were saved  The initial message displayed reveals this

170 170 Optional Topic – Preference to Save Sequence Numbers  Note that, if you have enabled sequence numbers, then any COBOL numbering will be saved from session to session in your source file.  Enabling sequence numbers is done from:  Window  Preferences  LPEX Editor  System z LPEX Editor  Sequence Numbers   Note that you can use num cobol - to effectively "mask out" columns 1-6 from the editor view … see next slide for details

171 171 Source Code Editing – Review and Use Cases RDz Editing Tool Considerations Make ISPF the default editorFrom Preferences > LPEX Editor - select ISPFThis preference is tied to your workspace Use ISPF command line commandsSame as ISPF – for the supported commandsThe commands are case-sensitive Find out what ISPF command line commands are supported? From the command line, press Ctrl+Spacebar Use ISPF Prefix area commandsSame as ISPF – for the supported commands Change background color to blackFrom Preferences > LPEX Editor > Appearance > PaletteOther source elements can be colorized Use COBOL numberingSame as ISPF: Num COBOL, Num On, Num Off, etc.

172 172 UNIT Topics: RDz for ISPF Developers  The RDz Workbench – Terms and Concepts  Editing COBOL Programs  Editing With Keystroke Shortcuts  Find and Replace Dialog   Creating New Programs From Scratch  Miscellaneous Features – Hex edit, Content Assist  Paragraph (control flow) Analysis, Data Flow Analysis, Source Formatting and Code Review  Working with Copybooks and Property Files  Appendices

173 173 Keyboard Editing versus Mouse-based You're probably getting the picture that there are two distinct editing "modes" using RDz: 1.Using your mouse:  Navigation  Highlighting  Selection  Accessing RDz tools  and your keyboard for content editing 2.Using the keyboard:  Navigation  Highlighting  Selection  Accessing RDz tools  Content editing  Most developers feel as though it's worth mastering mouse-oriented development – as this will not only improve your z/OS work, but also modern-development tasks (Creating Web Services, Building contemporary web user interfaces, etc.)  But the RDz editor also supports Hot-Keys for power-typing

174 174 Hot-Key Combinations  The RDz editor supports an extensive collection of Hot-Key combinations:  You can see the complete list of Hot-Keys at any time during your edit session by pressing: Ctrl+Shift+L   Black entries are activated  Gray entries are unavailable in the current editing context  Hot-Keys are case-IN-sensitive Cc  Alt+C  Alt+c  We will cover the essential Hot-Keys starting on the next slide:  Navigation  Select Text  Copy/Paste Text  Line Options  Miscellaneous Ctrl + Shift + L

175 175 Hot-Key Combinations – Part 1 RDz Hot Keys Description ISPF Equivalent Ctrl+HomeTop of file Max PF7 Ctrl+EndBottom of file Max PF8 Ctrl+2Open same program in split-screen view PF2 PF2 - then open the source member Ctrl+0 Ctrl+F4 Ctrl+0 / Ctrl+F4Close edit session PF3 PF3 (or CAN on the command line) Ctrl+SSave edit sessionSave Ctrl+PPrint current fileN/A Ctrl+TMake current line top line in the editor PF7/PF8 PF7/PF8 with CSR as your paging option PgUpPage up one physical page of source at a timePF7 PgDnPage down one page of source at a timePF8 PF7/PF8Page up/down one page of source at a timePF7/PF8 Up/Down – Right/Left Arrows Scroll one character at a time through your source: Up/Down – Right/Left Up/Down/Right/Left Arrows Ctrl+PgDnPage RightPF11 Ctrl+PgUpPage LeftPF10 Ctrl+LOpen Line Number featureN/A Ctrl+GFilters out all COBOL code except the four divisions Prefix area exclude Ctrl+WShow all filtered linesRES Shift+F10Show the Context (popup) menuN/A Ctrl+Shift+LShow the list of all Hot-Key CombinationsN/A Ctrl+JReturns to the previous (most recent) edit in your source fileN/A EscapeCursor jumps to the command lineN/A

176 176 Hot-Key Combinations – Part 2 RDz Hot Keys Description ISPF Equivalent Ctrl+F Opens Find/Replace Dialog Find/Change ISPF Commands Ctrl+Z Undo last change UNDO UNDO (if Recovery On) Ctrl+Y Redo last change N/A Shift+Down Arrow Select text from the current cursor position downward in the source file Prefix Area Command: CC … CC PF7 Shift+Up Arrow Select text from the current cursor position upward in the source file Prefix Area Command: CC … CC PF7 Ctrl+Shift+Right Arrow Select word N/A Shift+End Select text from cursor position to end of line N/A Shift+Home Select text from cursor position to beginning of line N/A Ctrl+A Select all text in the source file Prefix Area Command: C99999 Alt+U Unselect selected text N/A Ctrl+C Copy currently selected source lines Prefix Area Command: C CC Prefix Area Command: C or CC Ctrl+X Cut currently selected source lines Prefix Area Command: M MM Prefix Area Command: M or MM Ctrl+V Paste currently copied source lines Prefix Area Command: A B Prefix Area Command: A or B Ctrl+J Find previous edit change N/A Ctrl+Right Arrow Locates cursor at the beginning of the next COBOL word N/A Ctrl+Backspace Delete Current line Prefix Area Command: D Ctrl+D Repeat Current line Prefix Area Command: R Ctrl+/ or Ctrl+\ Comment or Uncomment current line N/A Ctrl+Enter Insert new line Prefix Area Command: TS or I Ctrl+Delete Delete (Truncate) to end of line Erase (EOF) key F5 F6 F5 and F6 Find and Repeat Find, Change and Repeat Change PF5 / PF6

177 177 Common ISPF Key Editing Techniques Split and Join lines: 1. Split lines:  Position Cursor  Press Alt+S …or…  Press: Ctrl+Enter 2. Join lines:  Position Cursor  Press Alt/J Leading blanks can cause line joins to shift to the right (moving text past column 80). A better solution for joining lines might be:  Select and cut the text to join   Paste the text Or alternatively, use the Move Overlay prefix commands – see next slide 

178 178 Move/Overlay and GUI Editing Techniques – to Join Lines Using the ISPF Prefix commands M / O is an effective way to join two lines. Enter the "O" on the line you wish to join "to" Enter the "M" on the line you wish to join Press  Enter You can also use traditional GUI editing techniques  Starting on the the top line – hold the Shift key down and press the down  arrow key on your PC to select the line below  Press the Delete key

179 179 Common ISPF Key Editing Techniques - continued You're probably used to Erase (EOF) Ctrl+Delete Using RDz press: Ctrl+Delete Other useful PC-key combos 1. Select to the end-of-lineShift+End 2. Move your cursor to the end and beginning of a statement  Position your cursor inside a statement   Press  End  Home Ctrl+Delete

180 180 Command Line Help To get a comprehensive list of the commands that are available in the command line of LPEX 1. Place your cursor in the Command line Ctrl+Spacebar 2. Press Ctrl+Spacebar help ispf Enter 3. Or type: help ispf and press Enter 

181 181  Workshop – Editing Hot-Key Combinations TRMTRDZ.cbl into the editor. Load TRMTRDZ.cbl into the editor. Press Ctrl + Shift + L - and scroll through the hot key list Take 5 minutes (no more than) and from the previous two slides, try out some of the hot-key combinations that you will most likely use Some of the ones many ISPF developers include (but are not limited to):  Make several source changes – Press Ctrl+Z - several times  Move your cursor to the middle of the screen – Press Ctrl+T  Press Ctrl+2  Press Ctrl+S  Move your cursor to the middle of any line and press Ctrl+Del  Move your cursor between two keywords and press Ctrl+Enter  Press Ctrl+F - note, we'll cover this Find dialog in the next section of the course

182 182 GUI Editing Techniques  Workshop - GUI Editing Techniques From z/OS Projects SANDBOX.cbl  Open the SANDBOX.cbl program in the editor  Using the Outline view, find the beginning of the PROCEDURE DIVISION MOVE "000-HOUSEKEEPING" TO PARA-NAME.  Find the MOVE "000-HOUSEKEEPING" TO PARA-NAME. Statement TO  Using Ctrl+Enter, split the line before the TO  Using the mouse Cut & Paste technique – or Move/Overlay, rejoin the lines TO  Under the * DATE VALUES comment line, split the next four MOVE statements after the TO operand Ctrl+Delete  Scroll to the top of file and using Ctrl+Delete erase to end of line five of the comments  Using the Outline view, return to the 000-HOUSEKEEPING  Using the command line, Find the first occurrence of : INPATIENT-TREATMENT-REC-DATA in the source  Place your cursor on that line at column 22  Press the Home and End keys a few times  Press Shift+Home and Shift+End  Scroll down to the PROCEDURE DIVISION and practice/experiment using: Ctrl+Enter, Joining Lines, Ctrl+Delete, Shift+End, Home and End  Close the editor and do NOT save your changes

183 183 Optional Topics and Workshops For This Section  If you have time, and are comfortable with the material covered, please read through the slides – and/or try out the techniques shown using RDz and sample programs.  The development techniques covered in these slides can make your standard z/OS Maintenance, Production Support and Development tasks much easier, and make you more productive. So at some point – perhaps after class please consider returning to these optional topics to build out your RDz skills.  Also – if you have access to RDz installed on your mainframe and time permits, please try out the techniques shown using your own application source.

184 184  Optional Workshop – Source Navigation and Hot-Key Combinations TRMTRDZ.cbl into the editor. (Optional) Load TRMTRDZ.cbl into the editor. Press the following Hot-Key combinations. (Optional) Type or write down what happens after you press the Hot-Key combination  Ctrl+L 77 Enter  Ctrl+L Type: 77 and Press: Enter ________________________________________  Ctrl+T ________________________________________  Ctrl+2 ________________________________________  Ctrl+0 ________________________________________  Ctrl+L 77 Ctrl+/ ________________________________________  Ctrl+L Type: 77 and Press: Ctrl+/ ________________________________________  Ctrl+\ ________________________________________  Ctrl+End ________________________________________  Ctrl+Home ________________________________________  Ctrl+Shift+L ________________________________________  PF8 ________________________________________  PF7 ________________________________________  PgDn ________________________________________  PgUp ________________________________________  Ctrl+PgUp ________________________________________  Ctrl+PgDn ________________________________________  Ctrl+G ________________________________________  Ctrl+W ________________________________________  Ctrl+F10 ________________________________________  Ctrl+P ________________________  Ctrl+P You can decide if you want to print the file ________________________  Down Arrow ______________________  Down Arrow Continually press the down arrow ______________________  Up Arrow ___________________________  Up Arrow Continually press the up arrow ___________________________

185 185  Optional Workshop – Editing Hot-Key Combinations TRMTRDZ.cbl into the editor. (Optional) Load TRMTRDZ.cbl into the editor. Press the following Hot-Key combinations. (Optional) Type or write down what happens after you press the Hot-Key combination  Ctrl+A  Ctrl+A ________________________________________  Alt+U ________________________________________  Ctrl+Backspace ________________________________________  Ctrl+Z ________________________________________  Ctrl+Y ________________________________________  Ctrl+D ________________________________________  Shift+Right arrow ________________________________________  Shift+Right arrow ________________________________________ (Repeat with Shift+Left Arrow)  Shift+Down arrow ________________________________________  Shift+Down arrow ________________________________________ (Repeat with Shift+Up Arrow) Shift+End _______________________________  (With your mouse cursor at the beginning of a line) Shift+End _______________________________ Shift+Home _______________________________  (With your mouse cursor at the END of a line) Shift+Home _______________________________  Ctrl+X ________________________________________  Ctrl+Home ________________________________________  Ctrl+V ________________________________________  Ctrl+End ________________________________________  Ctrl+J ________________________________________ Ctrl+Delete _______________________________  (With your mouse cursor in the middle of a line) Ctrl+Delete _______________________________ Ctrl+Shift+Right arrow _______________________________  (Multiple times) Ctrl+Shift+Right arrow _______________________________ Ctrl+Right arrow _______________________________  (Holding these keys down) Ctrl+Right arrow _______________________________ Ctrl+Left arrow _______________________________  (Holding these keys down) Ctrl+Left arrow _______________________________ Customizing your Hot Keys If time permits see the advanced topic Customizing your Hot Keys

186 186 Optional Topic and Workshop  Optional Topic and Workshop – Nested Logic Selection with Ctrl+M  In understanding complex nested IF statements, it can be extremely useful to be able to visualize each sub-division of the conditional logic – Ctrl+M can help with this.  Position your cursor on a bracket (any kind: ()[]{}) – and press Ctrl-M  LPEX finds the balanced bracket and selects anything between the two  To try this out:  Open PATLIST.cbl  From the command line, do a find on CTRL+M  In the nested IF statement, position your cursor outside of the open parenthesis and press Ctrl+M. Try this again, starting with an inner-parenthesis

187 187 Optional Topic and Workshop  Optional Topic and Workshop – Block (Rectangle) Copy  Sometimes it's useful to select and copy a block of source (essentially, a rectangle of text … for example: a group of PIC clauses). LPEX supports block copy  Workshop: 1.Open a COBOL program and locate a block of text to copy 2.Open a few blank lines above or below the block 3.Press Alt+R – to get into Block-copy mode. 4.After selecting your rectangle, use Alt+Left-Click to move the cursor to the desired position without changing your rectangle selection 5.Press one of the hot-keys shown here, or use the Context Menu to Copy/Overlay/Move your source You can also use the COBOL or PL/I editor to Block Copy Please see Appendix A for more on these tools

188 188 Optional Topic and Workshop  Optional Topic and Workshop – Sorting Data Within a File – Based on Column Data  You may wish to sort the data inside of a file while editing. Here's how you can sort using LPEX and RDz:  Switch to the lpex editor profile:  Open SAM1V.cbl  From the Context Menu go to Preferences  Switch to (select) the lpex editor profile   Click OK  Sort SAM1V.cbl  On the command line, type the following: sort columnRange 12 20  Scroll down through the sorted file. Note that spaces (ASCII X'20') sort to the top  Optionally try other sorts: sort columnRange 12 20 descending  Note that LPEX commands are case sensitive  See slide notes for an example of sorting on two columns  Switch back to the ISPF editor profile:  From the Context Menu go to Preferences  Switch back to the ispf editor profile   Click OK

189 189 Optional Topic and Workshop  Optional Topic and Workshop – Sorting Data Within a Column Range  You can also sort just the data inside of column-range  For this you can us the ISPF editor  Make sure that ISPF is your editor profile:  Open your program  Enter: BNDS xx yy on the command line  Type Sort  Optionally can sort descending: sort D

190 190 Optional Topic Optional Topic – Navigating the Eclipse Views – with Hot Keys  Some developers truly prefer to stay "hands on" with their keyboards  In order to fully do this, you need to know how to navigate Eclipse with hot-keys. Here's how: Ctrl+F7 Ctrl+F7  Opens a pop-up, that allows you to select a view Ctrl+F6 Ctrl+F6  Provides the same facility, but to select one of several open edit sessions Ctrl+F6  Press Ctrl+F6  Use the arrow keys to select an editor session Ctrl+F7  Press Ctrl+F7 Use the arrow keys to select a view 

191 191 Optional Workshop  Optional Workshop – Map Ctrl to  Enter in HCE – v8.5 From: Preferences > General > Keys > Host Connection Emulator (HCE) Starting in RDz v8.5 you can set the Left and/or Right Ctrl keys to any PC key or option (like ATTN) when you're working in Host Connection Emulator Note that we will be covering HCE in an upcoming course module

192 192 Advanced Topic ( Advanced Topic ) Customizing your Hot Keys  Available from Window > Preferences > LPEX Editor > User Key Actions  Feature:  You can define custom "User key Actions" for any LPEX Action in the drop-down list  This allows you to assign hot keys to things such as:  Filtering what's selected  Open the Hex Editor  Steps:  Type the Keys  Lower-case  Separate with dashes for multiple keys  Select the Action from the drop-down list  Press Set then click OK  Notes:  You can only map keys to Actions in the list  The Help topics provide a good explanation of the available editor actions  Keys that are already mapped by Eclipse or LPEX either won't be able to be mapped or must be re-mapped with Keys (next topic)  However, you can often use multiple keys to support a function (see example)

193 193 (Advanced Topic) (Advanced Topic) Re-Mapping Keys  Available from Window > Preferences  Steps: - Select the key from the Command column - Click on the field area for Binding. - Press the key or key combination that they desire to set for that command - Select a category in the When drop- down list - Click Apply - See screen shot on next slide for an example of mapping Ctrl+Q to newline in Host Connection Emulator  Notes:  You will not be able to map the CTRL key itself since Eclipse does not allow the CTRL key to be remapped.  You can only remap a combination of the CTRL key + some other key

194 194 (Advanced Topic) (Advanced Topic) Re-Mapping Keys – Example Example: Mapping Ctrl+Q to newline, when using Host Connection Emulator

195 195  Advanced Workshop –  Advanced Workshop – Customize Key Mappings  Map c-numpadEnter to the  Enter key 1.From Window > Preferences > General > Keys 2.Type: enter into the keys filter and select: c-numpadEnter 3.Click your mouse into the Binding field and press the  Enter key 4.Open the When: combo-box, and select LPEX/ispf 5.Press OK – and test your customized key mapping by editing a source file 2 1 4 2 3

196 196  Advanced Workshop –  Advanced Workshop – Customize Hotkeys  Using the steps on the previous slides, assign:  Ctrl+Q to [newline] for Host Connection Emulator  Ctrl+B to Add Bookmark Test out your "Add Bookmark" customized Hotkey in the editor

197 197 Advanced Workshop  Advanced Workshop Custom User Key Actions From: Preferences > LPEX Editor > User Key Actions You can setup combinations of Ctrl/Alt + a function key to customize the RDz/LPEX editor functionality Key 1. In the Key area, type (lower case): a  Alt … or … c  Ctrl - (dash to connect to keys) f1  f12 Or any other key that isn't already in use or mapped to some LPEX function (recall that Ctrl+Shift+L will list all in-use hot keys) Action 2. Select an Action from the drop-down list 3. Click Set ( don't forget this ) 4. Click OK Test out your functionality in the LPEX editor Note that if you have mad java skills, you can even define custom Actions as Eclipse plugins. However this topic is well beyond the scope of the course. Example to emulate M/PF8 M/PF7 functionality

198 198 Source Code Editing – Review and Use Cases RDz Editing Tool Considerations Make ISPF the default editorFrom Preferences > LPEX Editor - select ISPFThis preference is tied to your workspace Use ISPF command line commandsSame as ISPF – for the supported commandsThe commands are case-sensitive Find out what ISPF command line commands are supported? From the command line, press Ctrl+Spacebar Use ISPF Prefix area commandsSame as ISPF – for the supported commands Change editor background color > blackFrom Preferences > LPEX Editor > Appearance > PaletteOther source elements can be colorized Use COBOL numberingSame as ISPF: Num COBOL, Num On, Num Off, etc. Show the list of all available hot keysFrom inside the editor, Press: Ctrl+Shift+LThe list is context sensitive Customize your hot keysFrom Window > Preferences > General > Keys – specify the Binding (hot-keys) and When (the RDz context) under which to invoke the hot- key Hot-key combinations that are currently in use by Eclipse will take precedence over custom settings Delete to end of line (EOF) functionalityFrom with the editor press: Ctrl+Del

199 199 UNIT Topics: RDz for ISPF Developers  The RDz Workbench – Terms and Concepts  Editing COBOL Programs  ISPF Prefix Area Commands  Editing With Keystroke Shortcuts  Find and Replace Dialog   Creating New Programs From Scratch  Miscellaneous Features – Hex edit, Content Assist  Paragraph (control flow), Data Flow Analysis, Source Formatting and Code Review  Working with Copybooks and Property Files  Appendices

200 200 Find/Replace Dialog – 1 of 4 – Alternative Searching Functionality Besides the ISPF Find/Change command, there are other ways to search and replace text within a file From anywhere inside your source, press: Ctrl+FCtrl+f Ctrl+F …or… Ctrl+f Brings up the following dialog with find options  1. Enter Find and/or Replace value 2. Check one or more search refinement options  3. Press a Find button (covered on the next slide) checkboxes Find option checkboxes:  Case sensitive – case sensitive search  Whole word – finds your text delimited by spaces or dashes  Regular expression – powerful search meta-language – for complex search  Wrap – if starting mid-way through source, continue find from the top  Select found text – shows and selects found element  Peek: Shows specified number of lines of source after the found element  Restrict search to columns – search between start and end columns only See Notes

201 201 Find/Replace Dialog – 2 of 4 – Options  Next –Find forward in the source not –Does not find text inside copy or include files –Ctrl+n –Ctrl+n – finds next  Previous –Find upwards (back) in the source from your current cursor position  All –Finds all lines within the source exclude –Additionally will exclude or filter all source not matching your Find string  Provides an intermediate set of lines to AND your search with Ctrl+W –Press Ctrl+W to "show all" excluded lines …and/or to close the find dialog box –Clicking anywhere in the main body of your source file also closes the Find dialog –Click the pluses in the left-hand border to show filtered source  Replace –Adheres to COBOL columns –If replace would push text past column 73 you will receive a warning  Replace  Replace all –Changes "found" to replacement of values throughout file  Note that whatever you enter the Find/Replace dialog persists  This can be useful to do repeated searches within multiple files

202 202 Find/Replace Dialog – 3 of 4 – "ANDing" Search Results Sets When you've completed a "Find ALL" search, the resulting set of statements can be searched through, providing a means of "AND" filtering – useful for complex search requirements Process: FindALL Perform an initial Find … ALL Find any other string: NextPrevious Press Next or Previous All (not All)

203 203 Find/Replace Dialog – 4 of 4 – Find Dialog Preferences From: Window > Preferences > LPEX Editor > Find Text … you can set workspace preferences for the Find Replace dialog.  Consider: (for COBOL)  Incremental find dialog  Column restricted search 8  73

204 204 Workshop -  Workshop - Find/Replace Dialog SANDBOX.cbl Load SANDBOX.cbl into the editor Ctrl+F  Do a Ctrl+F All01  Search for All 01 Why?  Note that this found a bunch of comment lines. Why?  Restrict the column search to between 8 and 20  F All:01  Find All: 01 (again)  Expand some of the plus-signs Ctrl+W  Press: Ctrl+W … What does Ctrl+W do? Customizing Search From Window, Preferences From Window, Preferences Scroll down and select: - LPEX Editor - Find Text Check: Select found text  Select found text Incremental find dialog  Incremental find dialog Click OK Click OK Re-run the above searches Re-run the above searches

205 205 Workshop -  Workshop - Find/Replace Dialog – continued  Experiment with the Find/Replace options and option buttons covered on the previous Find/Replace Dialog slides. After each search press Ctrl/W. Here are some suggested steps: Find All  Use Find All to search for the following from the Find/Replace dialog  date –Check  Case sensitive – and rerun this search. –Then un-check Case sensitive  811 –Check  Whole word – and rerun this search – note that Find/Replace ignores the minus sign in  Experiment with your own searches, using these Find/Replace options:  Case sensitive  Whole word  Select found text  R  Replace p  Replace All v  Previous  N  Next  N  Next (combined with)  R  Replace ( This is like PF5/PF6) not When you are finished, close your editor session and do not save changes

206 206  OPTIONAL Workshop – Using Regular Expressions  Open WARDRPT.cbl  Press Ctrl+F  To open the Find/Replace dialog  Check  Regular expression  Enter the following find expression: row-sub|records-written All  Click: All Note that the single pipe separator | is a logical "OR" operator

207 207 ISPF - Find All (Exclude) Search Within File Common ISPF editing technique: - Exclude various source lines - find (within) excluded lines - Used extensively on giant production source files Command ====> F (or C) 'xxx' X To perform this using RDz use the same command line syntax format: 1. Exclude lines 2. Then type: F ALL X This will limit the scope of the search to only the excluded source lines Note that ALL operand is not required

208 208 ISPF - Find All (Not Exclude) Search Another common ISPF technique - Exclude various source lines - Find within (not) excluded lines Command ====> F (or C) 'xxx' NX To perform this using RDz use the same command line syntax format: 1. Exclude lines 2. Then type: F ALL NX This will limit the scope of the search to only the NOT excluded source lines Note that the ALL operand is not required

209 209  Workshop – Find All (X and NX)  Open WARDRPT  Exclude 9999 lines starting at the top of the file  From the command line, enter following ISPF commands:  f ws-lines x  Press F5 four times  f new-ward all x  res  Using the Outline view – navigate to the PROCEDURE DIVISION  Exclude 999 lines at the PROCEDURE DIVISION  From the command line, enter following ISPF commands:  f ws-lines nx  f new-ward all x  res

210 210  Workshop – Other Supported ISPF Find Techniques  Open TRTMNT  Exclude 9999 lines from the top of the file  From the command line, enter following ISPF commands:  f PATIENT-ID ALL  F 'EXEC SQL' ALL  Just like ISPF/Edit – you can build out a list of found results  Note that this is the equivalent, of using Regular Expressions with multiple text patterns separated by logical OR symbols |

211 211 Find/Replace – Review and Use Cases RDz Editing Tool Considerations Find/Change one time (one-off command) Use ISPF F 'xxx' – same as ISPFMost of the ISPF Find operands work Complex search (Logical OR/AND find) for application and program analysis Use Ctrl+F and "Regular expressions"Regular expressions are discussed in the Optional Topics of this section of the course Combine the results of multiple searches (AND the search results) without using Regular expressions Use Ctrl+F find – and then Find within (against) the editor results Peek at (view) n lines above and below the Found text Use Ctrl+F and set Peek to > 0 in the Peek tool Search for binary (hex) data (EBCDIC format) Find (Ctrl+F ) using the COBOL editorThe COBOL editor is discussed in Appendix B of this module. Hex find for EBCDIC binary data is available in v8.5 Search through Excluded/Not-excluded source lines Use the Prefix area to exclude lines. From the command line, enter: F 'xxx' X … or… F 'xxx' NX Highlight all found occurrences of a search Preferences > LPEX Editor > System z LPEX Editor > Find Text Not that this disables "incremental find". Incremental find behaves like Google's search Persist Find results in a viewSelect a variable or partial text, and use Search > Text > FileCan "Pin the Search View" to allow for multiple persistent search results

212 212 Source Code Editing, Find/Replace – Review and Use Cases RDz Editing Tool Considerations Make ISPF the default editorFrom Preferences > LPEX Editor - select ISPFThis preference is tied to your workspace Use ISPF command line commandsSame as ISPF – for the supported commandsThe commands are case-sensitive Find out what ISPF command line commands are supported? From the command line, press Ctrl+Spacebar Use ISPF Prefix area commandsSame as ISPF – for the supported commands Change editor background color > blackFrom Preferences > LPEX Editor > Appearance > PaletteOther source elements can be colorized Use COBOL numberingSame as ISPF: Num COBOL, Num On, Num Off, etc. Show the list of all available hot keysFrom inside the editor, Press: Ctrl+Shift+LThe list is context sensitive Customize your hot keysFrom Window > Preferences > General > Keys – specify the Binding (hot-keys) and When (the RDz context) under which to invoke the hot-key Hot-key combinations that are currently in use by Eclipse will take precedence over custom settings Delete to end of line (EOF) functionalityFrom with the editor press: Ctrl+Del Find one time (one-off find command)Use ISPF F 'xxx' – same as ISPFMost of the ISPF Find operands work Complex search (Logical OR/AND find)Use Ctrl+F and "Regular expressions"Regular expressions are discussed in the Optional Topics of this section of the course Combine the results of AND'd searchingUse Ctrl+F find – and then Find within (against) the editor results Peek at (view) n lines above and below the Found text Use Ctrl+F and set Peek to > 0 in the Peek tool Search for binary (hex) dataFind (Ctrl+F ) using the COBOL editorThe COBOL editor is discussed in Appendix B of this module Search through Excluded/Not-excluded source lines Use the Prefix area to exclude lines. From the command line, enter: F 'xxx' X … or… F 'xxx' NX Highlight all found occurrences of a search Preferences > LPEX Editor > System z LPEX Editor > Find Text Not that this disables "incremental find". Incremental find behaves like Google's search Persist Find results in a viewSelect a variable or partial text, and use Search > Text > FileCan "Pin the Search View" to allow for multiple persistent search results

213 213 Optional Topics and Workshops For This Section  If you have time, and are comfortable with the material covered, please read through the slides – and/or try out the techniques shown using RDz and sample programs.  The development techniques covered in these slides can make your standard z/OS Maintenance, Production Support and Development tasks much easier, and make you more productive. So at some point – perhaps after class please consider returning to these optional topics to build out your RDz skills.  Also – if you have access to RDz installed on your mainframe and time permits, please try out the techniques shown using your own application source.

214 214 Optional Workshop -  Optional Workshop - Find/Replace Dialog – AND'd Searching Results Problem – find all occurrences in a program that contain BOTH the COBOL MOVE verb and a variable: sqlcode Solution/Steps:  Open WARDRPT.cbl MOVE  Find MOVE ALL  With the set of "found" MOVE statements in the editor, again: sqlcode  Find sqlcode Next  Continue to press Next Optional practice workshop:  Using the above process find all IF statements that contain the TRAILER-REC variable When you click All – the lines from your program source showing in the editor represent a temporary "Results Set" Click the Next button – to search through this Result Set This allows for And'd" search techniques Show me all lines in my source that have this AND that

215 215 A few more examples :  Find all non-display (binary or hex) values in a program: [^\x20-\x7E]  Note that there are no hex-values in WARDRPT. But – if you are using a mainframe for these labs - you can edit in Hex (see prior topic) then searching for the hex values using this regular expression  Find all numeric variables in a COBOL program: PIC.9|PIC 9\(  Find all lines that reference any of three wildcard strings: pat-records*|records-writ*|error-fo* PARTSUPP.cbl  (Logical AND search) Find all lines with compute+ size-supp in the program PARTSUPP.cbl (compute.*size-supp) PeekAll  Increase Peek to 1, Click All again  (Combined AND/OR search in PARTSUPP.cbl) Find all lines with compute+ size-supp in the program PARM-LENGTH|(compute.*size-supp)  OPTIONAL Workshop – Using Regular Expressions – continued

216 216 Optional Topic – Using Regular Expressions to Search for Hex Values You can use regular expressions to search for EBCDIC Hexadecimal Values, embedded in a program or in copybook source:  Regular Expressions are an ASCII search mechanism  Use ASCII/EBCDIC comparison charts to map to the EBCDIC value you're looking for  ASCII - 1a  EBCDIC - 3f  A typical conversion table URL: http://www.flounder.com/ebcdictoascii1.htm http://www.flounder.com/ebcdictoascii1.htm Regular Expression: [\x1a] Hex Edit of line  ASCII  EBCDIC  See Slide Notes for URLs to useful Regular Expression tutorials online

217 217 Optional Topic – Using Regular Expressions to change all within columns You can use regular expressions to substitute for ISPF picture string editing. Example – change all characters in columns 73  80 to blanks (spaces)   Regular Expression  Start column: 73 End column: 80  Find: Type a period.  Replace: Type a space

218 218 Optional Topic – Regular Expressions to search for "any hex chars in a file" You can use Regular Expressions to find any EBCDIC (hex) data in source files:   Regular Expression [\x00-\x1F]  Type this in the find area: [\x00-\x1F] Note – the COBOL Editor (see Appendix B) can be use to effectively search for specific Hex (binary) values in EBCDIC. The LPEX editor's regular expression search is for ASCII hex characters

219 219 Regular Expressions Can Be Used in All Search Contexts  You can use Regular Expressions to search for text:  In a program  Throughout all programs in a project  On the mainframe:  Across all members n a PDS  Across multiple PDSs of different types:.COBOL,.BMS,.JCL, etc.

220 220 Finding Related Text on Adjacent Lines  Sometimes what you're looking for is broken across adjacent lines. Example: Find MOVE and a specific variable when the variable is not on the same line as the MOVE verb  The pattern for search across lines is  ABC[\s\S]*?DEF  In order to search across lines you will need to use the Search menu (similar to the previous example)  Try this:  Open TRTMNT.cbl  From the Search menu  Select: Search…  Enter: move[\s\S]*?actual-val  Enter: TRTMNT.cbl in the File name patterns edit box  Press Search

221 221 Regular Expressions – Used to Support ISPF Find "Picture Strings" ISPF Editor LPEX Editor Simple String Y Previous String Find Previous / F5 Delimited String Y Text string Y Picture Strings – special characters Y – with regular expressions P'=' – any character P'=' – any character Ctlr+F, Regular Expression,. Ctlr+F,  Regular Expression,. P'-' – any non-blank character P'-' – any non-blank character Ctlr+F, Regular Expression, [^\x20] Ctlr+F,  Regular Expression, [^\x20] P'.' – any non-displayable character P'.' – any non-displayable character Ctlr+F, Regular Expression, [^\x20-\x7E] Ctlr+F,  Regular Expression, [^\x20-\x7E] P'#' – any numeric character P'#' – any numeric character Ctlr+F, Regular Expression, [0-9] Ctlr+F,  Regular Expression, [0-9] P'-' – any non-numeric character P'-' – any non-numeric character Ctlr+F, Regular Expression, [^0-9\x20] Ctlr+F,  Regular Expression, [^0-9\x20] P'@' – any alphabetic character P'@' – any alphabetic character Ctlr+F, Regular Expression, [A-Za-z] Ctlr+F,  Regular Expression, [A-Za-z] P'<' – any lower-case character P'<' – any lower-case character Ctlr+F, Regular Expression, [a-z] Ctlr+F,  Regular Expression, [a-z] P'>' any upper-case alphabetic character P'>' any upper-case alphabetic character Ctlr+F, Regular Expression, [A-Z] Ctlr+F,  Regular Expression, [A-Z] P'$' – any special character (not alphanumeric) P'$' – any special character (not alphanumeric) Ctlr+F, Regular Expression, [^A-Za-z0-9] Ctlr+F,  Regular Expression, [^A-Za-z0-9] Ctrl+F ^ logical NOT \ special Expression \x Hexadecimal. Dot, any single character

222 222 (Optional Topic) Find/Replace Dialog – Regular Expressions The Regular Expression meta-language is based on a few simple constructs

223 223 Workshop  Workshop Find/Replace With Regular Expressions test1.cbl  Load test1.cbl into the editor  Check Regular expression Enter the following Regular expressions, and click All after each: ExpressionWhat it does [0-9] All numeric characters [a-z] All alphabetic characters [a-z] Check:  Case sensitive in the dialog, and reissue this regular expression. Then un-check Case sensitive before continuing DL.C Find all variables with "DL" – any character – then the letter C [^\s] Find all characters except for white space (blanks: \s ) [^a-z] Non-alphabetic characters [^A-Z\x20] Non-alphabetic characters and no white spaces [^A-Z0-9\x20] alphanumeric Non-alphanumeric characters and no white spaces [^A-Z0-9\x20-] Non-alphanumeric characters, no white spaces, no dashes [^A-Z0-9\x20\(\)..-] Non-alphanumeric characters, no parenthesis and no white spaces [^*A-Z0-9\x20\(\)..-] Non-alphanumeric characters, no parenthesis, no asterisks, no white spaces.*(data) end Find all variables that end in "data" PIC.9|PIC 9\( Find all numeric variable declarations  Expression See Notes

224 224 Optional Optional Topic – Another Useful Search Mechanism – Persist Find Results  Using the Search menu, you can search on a variable (or any partial selected text) in a program with:  Search  Text > File  The results persist and are hyperlinked – for easy navigation, and can be:  Copied/pasted to a requirements document  Changed Replace Selected… Replace All…  Searched Again to provide the capability of AND-ing multiple search patterns

225 225 Optional Optional Topic – Highlight Found Text  Some ISPF developers prefer to highlight all found text occurrences.  This can be accomplished from: Preferences > LPEX Editor > System z LPEX Editor > Find Text Ctrl+F  Use Ctrl+F (Find) to search and highlight text in your source To remove highlighted entries, type: clearMatches on the editor command line

226 226 Optional Topic – Supporting the Optional Topic – Supporting the ISPF "ONLY" Command ISPF provides a "one-command" exclude/find all – "ONLY" ISPF "ONLY" does the following: Top ; x all ; F 'xxx' all The RDz ONLY emulation is: 1.Select the variable (or text pattern) 2.Right-click > Selected > Filter selection Note that you can create a custom "User Key Action" – for filterSelection – so that ONLY is more closely emulated.  Preferences > LPEX Editor > User Key Actions filterSelection  Define a custom Key for filterSelection  In this example, Alt+F9 (a-f9) is set to: filterSelection

227 227  It's common practice in ISPF to use the CREATE/REPLACE  While not offering the exact TSO command-line syntax, this is the RDz way:  Open up the PDS member to be copied from  Find/Select and Copy program source lines   Right-click over the target PDS and select:  New > Create Member…  Double-click to open the new member in the editor  Find the right line to insert the copied lines Optional Topic – ISPF Create/Replace Commands To Replace rather than Create (after copying the source lines) 1. Open an existing PDS member 2. Select the lines in the PDS member 3. Right-click and select Paste

228 228 UNIT Topics: RDz for ISPF Developers  The RDz Workbench – Terms and Concepts  Editing COBOL Programs  ISPF Prefix Area Commands  Editing With Keystroke Shortcuts  Find and Replace Dialog  Creating New Programs From Scratch Miscellaneous Features – Hex edit, Content Assist Paragraph (control flow) Analysis, Data Flow Analysis Source Formatting and Code Review Working with Copybooks and Property Files Appendices

229 229  Workshop – Creating New Programs Using Templates  There are several ways to create new programs from scratch  The "Best Practice" method is to use RDz's COBOL program templates  From File, New > Other… …in the Wizards panel, cobol - Type: cobol - Select COBOL Program - Click Next > …in the COBOL Program panel, - Name the Program - Click Next >  Finally you specify which folder to create the program:  Select the cobol folder  Click Next > Note – You can create new programs

230 230 Workshop  Workshop - Creating New Programs From Templates – continued You can add CICS or DB2 template sample code to your new program:  Check the features you'd like Finish  Click Finish  A few things happen:  Your new program is created   The Snippets view is opened  Snippets information can be found in Appendix B of these slides  Note that you can customize the templates used to create new programs Window, Preferences, From Window, Preferences, select: COBOL COBOL –Code Templates –Features

231 231 OPTIONAL TOPIC – Create New Program in a z/OS LPAR  You can create new programs using the New COBOL Program wizard, provided you are connected to a z/OS LPAR, and that you have created a z/OS Project/MVS Subproject (see Location: in the screen capture below). MVS SubProjects and z/OS Projects are covered in another module of this course

232 232 Creating New Programs Using Copy/Paste Instead of using pre-defined templates, you may be used to "cannibalizing" pre- existing programs, by creating a new PDS member from an existing program, then editing OUT the code you don't need for your new development work. + Pluses: + Fast – Minuses: - Must clean-up PDS member fragments - More difficult with SCM (instead of PDS) - Most useful if copying either the entire program or one long contiguous block of code There are two development patterns that you will want to employ to do this with RDz 1.Create a new empty file – saved as.cbl 2.Open a second (existing) COBOL program and 3.Copy all of the existing program into the new file.cbl …or… 1.Create a new empty file – saved as.cbl 2.Open a second (existing) COBOL program and 3.Copy/Paste only specific portions of the existing program into the new file.cbl Both have their uses, so let's have a look at how to proceed with them

233 233  Workshop – Creating New Programs Using Copy/Paste This you've done already, using code embedded in the slide notes: StartApp.cbl 1.Open an existing program source in the editor: StartApp.cbl Ctrl+ACtrl+C - Select all (Ctrl+A) then Copy (Ctrl+C) all of the statements in the program 2.Right-clickcobol 2.Right-click over the cobol folder in z/OS Projects and select: –New > File Start2.cbl –Name your new file: Start2.cbl Ctrl+V 3.Click your mouse-pointer into the new file in the top-left hand corner (column 1, row 1) and press Ctrl+V to paste the program statements you copied in step 1 Ctrl+S 4.Save the file (Ctrl+S) 5. Close both programs  Repeat the above process: - PrintApp.cbl – copy the entire program to: Print2.cbl - TRMTRDZ.cbl – copy the entire program to: TRMT2.cbl

234 234 Creating New Programs Using Copy/Paste Code Blocks Often it's easier to create new programs from non-contiguous blocks of code, cannibalized from an existing program.  Example – grab specific SELECT/ASSIGNS, Useful WORKING-STORAGE fields not part of COPY or INCLUDE, a (couple of) paragraphs or a lengthy computation, etc. This is easily done combining mouse-based copy/paste with the previous new program technique or (even better) starting from a Template: 1.Open an existing to-be-copied program in the editor (we'll call this: From-Program) 2.Start from a program template, or create a new empty program as before (we'll call this: To-Program) 3.Maximize your Editors 4. Find and Select copy source within: From-Program 5. Paste the copied source into the appropriate area of: To-Program 6. Scroll down and find the next piece of code to copy in From-Program – repeat steps 5 & 6

235 235  Workshop - Creating New Programs using Copy/Paste Statements DFLOWRDZ.cbl 1.From the mainframe or from your RDzClass project, open DFLOWRDZ.cbl 2.Right-clickcobol 2.Right-click over the cobol folder in z/OS Projects and select: –New > File DFLOW2.cbl –Name your new file: DFLOW2.cbl 3.Maximize your Editors (Double-click the tab) 4.(Using your mouse you will do the following): 4a. Select and (Right-click to) copy source from DFLOWRDZ 4b. (Right-click to) Paste the copied source into DFLOW2 4c. Scroll down in DFLOWRDZ and find the next piece of code to copy. Repeat 4a, 4b and 4c – and use graphical editing techniques copy the following source code from DFLOWRDZ to DFLOW2: - The TRMTDATA and PATMSTR: SELECT/ASSIGN statement blocks FDs and WORKING-STORAGE structures: - INPATIENT-TREATMENT-REC, PATIENT-MASTER-REC READ INTO Paragraphs (Paragraphs 900-READ-TRMTDATA and 500-CROSS-FILE-EDITS) - Two or more non-adjacent: WORKING-STORAGE 01 structures Paragraphs – including the READ S ave DFLOW2.cbl when finished If time permits, repeat this workshop using sections of SANDBOX to create another new program

236 236 UNIT Topics: RDz for ISPF Developers  The RDz Workbench – Terms and Concepts  Editing COBOL Programs  ISPF Prefix Area Commands  Editing With Keystroke Shortcuts  Find and Replace Dialog   Creating New Programs From Scratch Miscellaneous Features – Hex edit, Content Assist,  Miscellaneous Features – Hex edit, Content Assist, Filtering, Help, Templates, Refactoring source code, Editing JCL Refactoring source code, Editing JCL Editing Fixed Length datasets, Editing Fixed Length datasets, Editing non-IBM source languages Editing non-IBM source languages  Paragraph (control flow) Analysis, Data Flow Analysis Source Formatting and Code Review  Working with Copybooks and Property Files  Appendices

237 237 Working With Source Code Containing Hex Values – continued To view or source lines that contain embedded Hex characters – or to enter binary values in your source files:  Select the source line  Right-click and select:  Source > Hex edit line This Hex line view shows the text, and different source encodings (essentially, ASCII vs. EBCDIC character set) The bottom line (Source encoding Cp037) shows EBCDIC values  To edit an EBCDIC hex value (like the 3F shown in the screen capture):  Make your change in HEX (overtype the value)  Press before clicking your mouse out of the Hex line editor

238 238 Hover (mouse-over) Variable and Paragraph Name To see the declaration of a variable, paragraph or section name:  Move your mouse-pointer over the identifier – and just hoverNotes:  You can hover anywhere (not just on the "current line")  Hover works even if the declarations are contained in a copybook (although you have to configure the SYSLIB property in your project)   Workshop : - TRMTRDZ - Open TRMTRDZ - - Scroll down in the source and hover over variables, file names (FDs) and fields within a record

239 239 Real-Time Syntax Validation Validation Markers  When the COBOL Validator does not understand what you've coded, a yellow warning triangle appears in the prefix column on the far left of the editor  If you mouse over the column you can get context-specific language coding "hints" Preferences You can enable/disable Validation from the Preferences menu See Slide Notes

240 240  Workshop – Combined Workbench Editing Techniques TEST1.cbl Open TEST1.cbl Outline View 1.From the Outline View – do the following:  Click on several of the COBOL Divisions  Click on: FD STUDENT-FILE  Expand: PROCEDURE DIVISION  Click on: 200-PROCESS-RECORDS  Click on and Expand the WORKING-STORAGE SECTION  Click on several lines in TEST1 - within the editor and note the effect on the Outline View 2. Experiment with several of the ISPF editing options: PF7/PF8 Prefix area commands Find / Change (command line) commands 3. Experiment with mouse hover Hover over STUDENT-FILE, CTR-STUDENTS, END-OF-DATA Press Ctrl+F - to find these variables 4. Experiment with validations (by editing in some COBOL syntax errors) Press Ctrl+Z - to undo the errors 5. Experiment with several of the RDz Hot-Key combinations 6. From inside the source file: - Find the 200-PROCESS-RECORDS paragraph - Click your mouse inside the paragraph name - Right-click and select: Open Perform Hierarchy - Expand the entries – and consider how the Perform Hierarchy is different from the Outline View 7. Practice with any other techniques you've learned so far – especially: Content Assist Perform Hierarchy

241 241  Workshop – Syntax Validation  Steps: StartApp.cbl 1.With StartApp.cbl open in the editor 53 2.Scroll to line 53 untilunti 3.Change: until to unti 4.Move the cursor to see the yellow syntax validation triangle 5.Move your cursor directly over the validation triangle to view the validation message text untiuntil 6.Then correct unti back to: until 7.Note that the validation triangle disappears If time permits find out what else validation works for: Misspell variable name references inside the Procedure Division (in TEST1.cbl) misspell paragraph names in PERFORM statements Do not save your changes

242 242 Ctrl+Spacebar Content Assist (Ctrl+Spacebar) Ctrl+Spacebar Content Assist allows you to code statements by selecting values from a list after typing partial text and pressing: Ctrl+Spacebar The process:  Partially type a:  COBOL keyword  Variable (including 88-level)  Paragraph name immediately  Move your cursor immediately at the end of the text you wish to use Content Assist to complete "immediately" = the very next byte after the text Ctrl + Spacebar  Press Ctrl + Spacebar  Select the completion identifier from the list – which is sorted alphabetically within type  Variables – either GROUP or elementary fields  Paragraph labels  Language keywords Benefits:  Makes coding faster & easier  Reduces typos and syntax errors  Particularly helpful for less-than-meaningful & lengthy COBOL variables and paragraph identifiers Different Content Assist options Group field  Elementary field  Paragraph  Keyword 

243 243  Workshop – Content Assist Change the 300-WRAP-UP paragraph in TEST1.cbl using Content Assist – and move the file close statement into a new performed paragraph. 1.Add a new 290-File-Close COBOL paragraph name above the 300-WRAP-UP paragaraph 2.Enter a new blank line below the paragraph name 3.Type: cl and press Ctrl+Spacebar  Select CLOSE 4.Use content assist to select both file names (one at a time - see graphic for actual names  ) 5.Add a period at the end of the CLOSE statement 6.Enter a blank line in place of the current CLOSE statement in 300-WRAP-UP 7.Use Content Assist to select: 7a. PERFORM 7b. Your new paragraph name - Note that you may have to hit Ctrl+Spacebar twice to get to the Template Proposals (explanation on the next slide) When finished: Save your changes and using the Context Menu do a Local Syntax Check. Remove any syntax errors 3. 4. 7a. 7b.

244 244 Other Context Menu Items – Source Options: Comment/Uncomment When you have selected a line or some text in a line there are two useful options under Context Menu: Source > Source >  Comment selected lines  Comments out – with an asterisk in column 7 one or more lines of COBOL source  Uncomment selected lines  Will uncomment all selected lines that are comments

245 245 Other Context Menu Items – Filter view Large complex programs can be more easily understood, viewed modified and maintained if certain details are filtered out From the Context Menu click Filter view > and select collapse and expand  Divisions – collapse and expand filters by COBOL Divisions  Code – filters out comments  Comments – filters out code  Outline – shows high-level abstraction of your source (very useful)  Embedded SQL/CICS/DLI – show only SQL statements, or EXEC CICS  Errors – show only syntax errors  To show all of the lines of source in your editor: Ctrl+WShow All  Press Ctrl+W – or use the Context Menu's "Show All" option 

246 246 Filter Example – Show Only CICS and SQL Statements  Filter all statements except for  Screen  EXEC CICS  Database  EXEC SQL Note the plus signs  Expand/Collapse filtered code Ctrl/Wun Press Ctrl/W to un-filter and return to normal program view See Notes

247 247 Another Example of Text Filtering – Selected > Filter selection  Double-click to select a:  COBOL Keyword  Literal  Variable  Label (Paragraph or Section name)  Right-Click  Selected  Filter selection  Note the plus signs Expand/Collapse filtered code Ctrl/Wun  Press Ctrl/W to un-filter and return to normal program view

248 248 Workshop –  Workshop – Filtering For Improved Code Understanding Exercise #1 – Context Menu filtering From your mainframe PDS or the cobol folder in RDzClass open: CADDDB2.cbl Try each of the Context Menu Filters out   Try expanding the filtered source lines by clicking the plus signs in the Editor's left-hand border Exercise #2 – Filtering selected text TEST1.cbl  Open TEST1.cbl in the editor  Use the technique of selecting either a variable or a COBOL reserved word  Examples: WRITE, IF, MOVE  Statements: WRITE, IF, MOVE CTR-COURSES, SR-NAME  Variables: CTR-COURSES, SR-NAME 'Y'  Literals (with single quotes): 'Y' 230-READ-A-RECORD  Paragraph: 230-READ-A-RECORD Ctrl-W will re-display all source code lines!

249 249 Editing JCL  LPEX provides some level of smart-editing:  Colorized source:  Labels in black  Comments in green  Keywords: –JOB/EXEC/DD - maroon –Parameters in blue  Keywords that are incorrectly typed will be flagged when you move your cursor to the next source line  The Outline view shows your EXEC steps, and is useful for navigating large batch job source

250 250 JCL Editing – Context Menu Features  There are also some useful Context menu options:  Filter view  Filter view – to allows you to isolate specific areas of your JCL to work with  Submit  Submit – subs the Job to the LPAR you are connected  Open member  You can select a PDS member (such as PARMLIB - or report output) – and open the member directly into the editor

251 251 JCL Templates – and Content Assist (v8.5)  Starting in RDz version 8.5, LPEX provides Content Assist for JCL editing.  The initial set of proposals (JCL statements) is somewhat limited, but you can easily turn this product feature into a valuable customized JCL editing facility by adding your own shop-specific PROCs, MVS Utility code, etc. See Optional Workshop for steps on how to create and utilize this 

252 252 Editing Source Languages Other Than: COBOL, PL/I, Assembler  In this section of the course you have seen that RDz provides extensive language-specific tools for work on:  COBOL, PL/I, Assembler, JCL, SQL – you will learn more about this in the next module  And there are many others supported by LPEX (REXX, Fortran (!!), Java, RPG, etc.)  But, what if you needed maintain or develop in a language other than one of these?  You have all of the ISPF LPEX editing features (you've learned about) and in addition you have access to:  Multiple Eclipse views  Search - with Regular expressions, incremental find, search AND'ng and OR'ng for complex search requirements - and Pinned search results (recall for doing Data Flow Analysis)  Local History  File compare  Changed and deleted lines in the editor  Rectangle vs. line source selection  Etc.  And (as you will see in the next few sections of this course) you also have all of RDz advanced functionality specific to z/OS datasets:  The ability to transfer SAS programs:  From LPAR to LPAR  From PC --> Mainframe --> PC  The ability to do things like the following, with concurrent and GUI development tools:  Edit a program  Save changes  Submit compile JCL without having to open a JCL member – and without having to close your edit session  The ability to work with MVS Subprojects – including work offline to save development MIPS

253 253 Source Code Editing, Find/Replace Review and Use Cases RDz Editing Tool Considerations Edit in HexFrom the Context Menu, select: Source > Hex Edit line Look-ahead "intelli-sense" typingPress Ctrl+Spacebar – Works for: COBOL, PL/I, Assembler, JCL (8.5) and SQL You can customize the proposals presented by Content Assist in Preferences > COBOL. Comment / Uncomment multiple lines with one operation From the Context Menu, select: Source > CommentOr Uncomment Show only comments in your sourceSource > Filter view > Comments Show only operational code in your sourceSource > Filter view > Code Show only SQL and CICS statementsSource > Filter view > Embedded SQL, CICS, DL/I Show only EXEC statements in JCLSource > Filter view > EXEC statements

254 254 Optional Topics and Workshops For This Section  If you have time, and are comfortable with the material covered, please read through the slides – and/or try out the techniques shown using RDz and sample programs.  The development techniques covered in these slides can make your standard z/OS Maintenance, Production Support and Development tasks much easier, and make you more productive. So at some point – perhaps after class please consider returning to these optional topics to build out your RDz skills.  Also – if you have access to RDz installed on your mainframe and time permits, please try out the techniques shown using your own application source.

255 255  Optional Workshop – Editing JCL - 1 of 2 From either your mainframe connection or the RDzClass project:  Open the jcl folder and open BNCHMRK.jcl  Explore (note) the JCL statement colorization  Use the Outline view to navigate within the JCL  Right-click in the JCL and select Filter and experiment with the Filter options (try several out)  Add a comment line  Modify an EXEC statement – or DCB parameter on a //DD statement  Move your cursor to the next line  Note the syntax error  Press Ctrl+z  Undo  Close the file  Do not save changes

256 256  Optional Workshop – Editing JCL - 2 of 2  Again open BNCHMRK.jcl  Open the program: TRTMNT.cbl  Drag one of the views so that they are side-by-side (see screen capture)  Select the JCL, and from the Outline view navigate to the TRTMNT job step.  Filter the JCL – show only EXEC statements  Filter TRTMNT.cbl – Edit the program in Outline mode. Then expand FILE-CONTROL (see screen capture)  View the COBOL program's ASSIGN statements. Match them up against the JCL //DD statements in the TRTMNT step  Note that the you may have to experiment with these techniques to make the best use of the combined tools  Note also that the Outline view displays the proper contents depending on which file is selected

257 257 Workshop –  Workshop – JCL Templates – and Content Assist – 1 of 2 From Window > Preferences > LPEX Editor > System z LPEX Editor > JCL Parser > Templates  Click New… Add this template //ALLOC EXEC PGM=IEBGENER,COND=(0,NE) //SYSPRINT DD SYSOUT=* //SYSIN DD DUMMY //SYSUT1 DD DSN=DDS0001.TEST.UNCATLG.DATA2,DISP=(NEW,CATLG,DELETE), // VOL=SER=DMEPG1,UNIT=3390,SPACE=(TRK,(1,1),RLSE), // DCB=(LRECL=80,BLKSIZE=800,RECFM=FB,DSORG=PS) //SYSUT1 DD DSN=DDS0001.TEST.UNCATLG.DATA3,DISP=(NEW,CATLG,DELETE), // VOL=SER=DMEPG1,UNIT=3390,SPACE=(TRK,(1,1),RLSE), // DCB=(LRECL=80,BLKSIZE=800,RECFM=FB,DSORG=PS) //SYSUT2 DD DSN=DDS0001.TEST.UNCATLG.DATA4,DISP=(NEW,CATLG,DELETE), // VOL=SER=DMEPG1,UNIT=3390,SPACE=(TRK,(1,1),RLSE), // DCB=(LRECL=80,BLKSIZE=800,RECFM=FB,DSORG=PS) // Use this code

258 258 Workshop –  Workshop – JCL Templates – and Content Assist – 2 of 2 From RDzClass, from the  - jcl folder, open BR14.jcl  Open a new line somewhere in the file  Press Ctrl+Spacebar  Select your IEBGENER JCL template

259 259 Optional Topic – Default and Template "Proposals"  RDz's Content Assist has been improved to provide access to customize- able "templates" – code proposals you can add into your workspace to:  Meet corporate standards  Make common coding patterns part of Content Assist (i.e. calls to common corporate sub-routines, use of common variable groups, etc.)  Improve productivity (cut down on typing)  To access the Content Assist Template Proposals, hit Ctrl+Spacebar a 2 nd time  - from within your code, where you'd normally hit Ctrl+Spacebar  This will bring up a deeper – and sometimes different list  Examples of Content Assist Template Proposals:  SQL statements  SQL statements with access to DB2 tables, views, column-names, etc.  Customized templates (from preferences)  Your customized statements  In-the-box templates (from IBM) at Level 2 of Content Assist

260 260 OptionalWorkshop –  Optional Workshop – Level 2 Content Assist  From: Window, Preferences, COBOL, Templates  View (scroll through) the existing Templates  Do not make any changes (yet)  Close preferences  Open: PATLIST.cbl in the editor  Using the Outline view, find 200-NEW-PATIENT  Insert a new (blank) line immediately below the paragraph label PER  Type: PER and press Ctrl+Spacebar  Press Ctrl+Spacebar a second time  Press Ctrl+Spacebar a second time, and select PERFORM X TIMES  For "arg1" in the list:  Double-click and delete the text  Press Ctrl+Spacebar two times – to bring up a list of variables.  Select a variable from the list (any variable – it doesn't matter for this exercise)  In the empty (blank line) in the middle between PERFORM and END-PERFORM  Add an IF-THEN-ELSE-END-IF template  Create a valid conditional statement using Content Assist similar to what is shown here 

261 261 Optional Topic - RDz's Customize-able Content Assist Templates  In version 8.0 – you can customize the template "proposals" offered in the Content Assist  You access this from:  Window  Preferences –COBOL –Templates  Customization options include:  Modify (Edit…) an existing template  Add a (New…) template  Remove a template  Export all templates – so that other team members can share  Import…  Restore Removed (un-delete)  Revert to Default (un-modify) You can customize a template's: - Content - Pattern - Context - where it's applicable - Description – hover help

262 262 Workshop –  Optional Workshop – Customizing Template Proposals  From Window, Preferences, COBOL, Templates:  Select one of the Template proposals and delete (Remove…) it  Select a Template proposal and Edit… (change it) – something simple like changing the case to mixed-case, instead of all UPPER case  Add a New… proposal, as shown here  You can copy and paste the this text. If Then If Else Else.  Test your work out in one of the sample programs, like: PATLIST.cbl

263 263 Optional Workshop –  Optional Workshop – EXEC CICS and EXEC SQL Content Assist  Open PATLIST.cbl  Using Content Assist (template proposals): ***  Add the EXEC SQL statement shown just below the 740-WRITE-PAT-DETAIL paragraph ***  Add the EXEC CICS XCTL statement shown just below the EXEC SQL statement *** *** Note that, when we show you to connect to DB2 in a subsequent module of this course, we will return to revisit SQL content assist, and describe how to use Content Assist to access valid DB2 column and table names for your EXEC SQL statements

264 264 Refactor Other Context Menu Items – Refactor – 1 of 2 Renaming variables and paragraph or SECTION labels can have far- reaching and sometimes unintentional consequences  Refactor allows you to Preview the impact of a change before deciding to go through with it To Refactor/Rename: 1.Select the variable or Paragraph name you wish to change Refactor > Rename 2.Right Click, and from the Context Menu select Refactor > Rename 3.Overtype the old name with the new name Preview > 4.Click Preview > Click Continue 5.Preview automatically scopes the change. Click Continue Scope of changes for this variable Refactor1.2. 3. 4. 5.

265 265 Refactor Refactor continued – 2 of 2 6. 6. Finally, the Refactor wizard displays the deltas between your original and Refactored source side-by-side, allowing you to verify before proceeding. OK  Click OK to rename (if you press Cancel no changes are made to your source) You can also Refactor "noise words" – COBOL clauses that if removed, could make your programs easier to understand, without impacting program behavior Refactor > Remove Noise Words Refactor Source Deltas

266 266 Workshop – Refactor  Optional Workshop – Refactor Steps: \cobol\RDzClass 1. Create a new COBOL program in the \cobol\ folder of your RDzClass project – note that you will have to use your local workstation project for this workshop (using either of the techniques shown earlier in this course) – name it testRefactor.cbl TEST1.cbl 2a. Edit TEST1.cbl 2b. Press Ctrl+A 2c. Press Ctrl+Ins (insert key – this copies all of the source statements) 2d. Paste the copied source into testRefactor.cbl 3. In testRefactor.cbl Refactor: CTR-LINES - change it to WS-CTR-LINES 4. Refactor: 200-PROCESS-RECORDS - change it to: 201-PROCESS-RECORDS After you've finished, Syntax Check testRefactor – to make sure everything worked as expected

267 267 Optional Workshop –  Optional Workshop – Filtering for Documentation Exercise #3 – With CADDDB2.cbl loaded into the editor:  Filter the program into an Outline view  Select all (Ctrl+A) and copy all of the source  Open Notepad or MS-Word  Paste the source

268 268 Optional Workshop – Comment  Optional Workshop – Comment Task Tags – 1 of 2  Do the following:  Open HLASMEX.asm in the editor TODO  Type a TODO Task Tag into the HLASMEX source in a comment  Note: TODO – is case-sensitive  Save your changes and note the effect (a Task is created)  Close HLASMEX Notes: In order to permanently delete these Task Tags you must remove the TODO comment from your source Comment Task tags work in: COBOL, JCL, REXX, PL/I, Assembler, etc.

269 269 Optional Workshop –  Optional Workshop – Task Tags – 2 of 2  Open the Tasks view  Window > Show view > Other… Tasks  Re-open HLASMEX.asm  Use the Task view to navigate in the source  From the Context Menu, select:  Filter > –Comment task tags  Press Ctrl+W (Show All)  Close HLASMEX.asm

270 270  Optional Workshop – New to COBOL? F1  Language Reference If you are new to COBOL - no problem. There's hyper-linked access to the COBOL Reference manual – assuming the online help is installed on your workstation. SelectF1 Select the COBOL word you're unfamiliar with, and press: F1  F1  F1 Help opens up in a separate Windows frame. F1 language help is also available for: F1 Help opens up in a separate Windows frame. F1 language help is also available for: Assembler (HLASM) Assembler (HLASM) PL/I PL/I Workshop - try F1 (help) out on the Printapp.cbl program for:  Workshop - try F1 (help) out on the Printapp.cbl program for: Inspect Inspect Compute Compute Linkage Linkage Open one of the Assembler programs and try F1 help out on an instruction like : MVC, LA, ST, CLC  Open one of the Assembler programs and try F1 help out on an instruction like : MVC, LA, ST, CLC Note that F1 works for Assembler and PL/I as well as COBOL

271 271  Optional Workshop – New to COBOL? Model Statements Content Assist (Ctrl+Spacebar) can also help you build new COBOL statements:  Workshop: TEST1.cbl  With TEST1.cbl open in the editor  Enter a few new blank lines  Enter the beginnings of some COBOL statements:  if  perfo  compu  div  Experiment with the Ctrl+Spacebar statement models  Please do not save changes  Note that you can combine model statement building, with content assist to select declared COBOL variables from the DATA DIVISION into the statements.

272 272 Optional Topic – Editing z/OS (Fixed-Length) Records record editing boundaries  When you edit z/OS datasets RDz opens them into the editor using the file LRECL (which you can see from the Properties view) to mark record editing boundaries. From the screenshot below, note the following:  LRECL = 133, RECFM = FBA - this is a compiler listing dataset  When the file was opened RDz placed a vertical line to mark the record boundary  If you attempt to type past the boundary RDz warns that truncation will occur upon save  Note that you can edit both fixed and variable length records

273 273 Workshops – Editing Source Languages Other Than: COBOL, PL/I, Assembler  The next few slides present a short workshop just to allow you to see for yourself, what is and what is not available, when working with RDz on languages not formally supported by the LPEX editor  The programs you will use are ©CA-Easytrieve http://en.wikipedia.org/wiki/Easytrieve http://en.wikipedia.org/wiki/Easytrieve  But it wouldn't matter if the programs were:  SAS  Focus  Visual Basic  Powerbuilder  PhP  Or any other software language  The point is that:  You get all of the ISPF editing capabilities  You get all of the RDz / Eclipse capabilities  Using RDz integration tools (which you will learn about later in the course) you can include your custom tools and processes for build, etc.

274 274 Optional  Optional Workshop – Working with Easytrieve From either the mainframe, or RDzClass:  Open the  easytrieve directory (it's under  other languages and files )  (Using Ctrl+Shift) Select all five files  Right-Click and select Open Marked changes:  Delete some lines  Change some lines and then mouse over the left-frame to see the original Ctrl+Shift to select multiple files

275 275 Optional  Optional Workshop – Easytrieve in the Eclipse Views  Using your eclipse skills, create the editing dashboard similar to what is shown in this screen capture  Note that it doesn't have to look exact – just get it close

276 276 Optional  Optional Workshop – Easytrieve and Split Screen  Close All open views  Do not save any changes  Open DEMOESY2.EST  Press Ctrl+2  To split the screen  Scroll throughout  (Optionally) Copy/Paste between source copies  Close the files  Do not save any changes

277 277 Optional  Optional Workshop – Easytrieve and RDz Compare  Select both DEMOESY3.ESY and DEMOESY3.ESY  Right-click and select: Compare With > Each Other  Scroll through either (or both) compare views. Close the compare window

278 278 Optional  Optional Workshop – Easytrieve and Local History  Open DEMOESY4.EST and make a few source changes  Save the file  Right-click over the file, and select Replace With > Local History…  Scroll and view the compare screen From the list  Select the previous version  Click Replace  Close the file

279 279 Optional  Optional Workshop – Easytrieve and Advanced RDz Find  Open DEMOESY2.EST  Press Ctrl+F – and check: Regular expression  Find All – using a variable string such as: hold-process-type|300|balance  Try AND'd Find searching From within the results screen:  Find Next: Process-type

280 280 UNIT Topics: RDz for ISPF Developers  The RDz Workbench – Terms and Concepts  Editing COBOL Programs  ISPF Prefix Area Commands  Editing With Keystroke Shortcuts  Find and Replace Dialog   Creating New Programs From Scratch  Miscellaneous Features – Hex edit, Content Assist Refactor, Help, Filtering, etc. Paragraph Analysis, Data Flow Analysis  Paragraph (control flow) Analysis, Data Flow Analysis Source Formatting and Code Review Source Formatting and Code Review  Appendices

281 281 z/OS Development, Maintenance and Production Application Support Access Datasets/Source Files Program Analysis Enterprise Modernization Source Development CICS Web Services IMS Soap IMS Web 2.0 Source Navigation Windows (Standard) Navigation ISPF PF-keys + extensible Hot-keys Outline View Hover Open Declaration / Arrow keys Open copybooks Windows metaphor Edit/Browse/View “Favorites” – “Most recently used” ISPF and RDz Source Editing PF-Keys Hexedit Prefix Area Commands Command Line Commands Colorized statement support Local History PC Source editing functionality Code refactoring Wizard-driven DB2 Stored Procedure generation Comment/Un-comment multiple lines Access to 3270 Emulation within Eclipse All development options “preference-enabled” Generate: WSDL WSBIND file XSD files Deployment manifest Stub modules Test and Deploy WSDL Use Cases: Bottom Up Top Down Meet in the middle Generate XML/WSDL COBOL/PLI converters Manifest files Use Cases: Bottom Up Top down (PL/I only) Meet in the middle SCM: IBM: Team Concert, SCLM, ClearCase CA: Endevor, Panvalet, Librarian, Serena: Changeman ISPW RDz Functional Taxonomy – a Partial List Submitting/Managing Jobs Submit and Locate Job Integration with JES Job Organization options (Filters) Show JCL Cancel/Purge Windows Screen Real Estate Size-able views Multi-window development Source Filters Collapse/Expand paragraphs/sections SCM functional integration PDS Support Migrate/Recall Support Local and Remote file support Tooling support in single or across multiple LPARs Source and PDS Search QSAM Data File Search Browse Load Module Search Load Library Use of Regular Expressions Program Logic tools Control Flow Analysis Data Flow Analysis Where used/Where Referenced Content Assist COBOL, PL/I, Assembler SQL: Embedded, Interactive CICS statements Dataset Management CICS Service Flows 3270 "screen scraping" Aggregate transactions Automate processes Expose as web services Syntax Check and Build Real-time validation Local and Remote Syntax Checking Integration with z/OS Build Process Test and Debug Integration with PD Tools/Debug Tool Integration with Xpeditor and CA-Intertest Editing Data Sources QSAM File Editor DB2 Table Editor IMS Segment Editor VSAM File Editing with File Manager Integration with File-Aid Plug-ins Allocate/ Rename/Delete Create GDG Model Create VSAM Dataset Search Compress Code Quality Code Review Source Format File Compare All of the above functionality Copy Files Within an LPAR Across LPARs LPAR  PC Functional Integration with z/OS REXX/CLIST/3 rd Party Tools: Menu Manager HATS Eclipse Plug-in Integration RDz Product Integration Languages COBOL, PL/I, Assembler, Java, C/C++ JCL/CLIST/REXX SQL BMS/MFS WSDL, HTML, XML 4GLs supported with Eclipse Tooling

282 282 RDz's Code Execution Flow Tools Often you will need to discover a program's control flow (business logic) by tracing through a PERFORM chain, following GO TO statements or tracing program CALLs, in order to understand the code, track down the cause of an ABEND, etc. You have two choices for logic flow analysis tooling (note that you can use both together to obtain maximum logic coverage) 1.The Program Control Flow diagram – covered in an earlier module in this course 2.The Perform Hierarchy Which of these two you choose depends on what you need to do: Control Flow Diagram Perform Hierarchy Illustrate PERFORM chainXX Illustrate GO TO statementsXX Illustrate Fall-Thru potentialY – Does not highlight Fall-Thru Y – Highlights potential Fall-Thru Include CALL statements in control flow displayNY Show when logic branches occur in conditional expressions NY Externalize (save) logic flow diagramming result YN Synchronize with source code in the editorYY Show iterative paragraph and Section loopsNY See Slide Notes on PL/I and Assembler

283 283 Paragraph Control Flow Analysis using the Perform Hierarchy To access the Perform Hierarchy: 1.Select (double-click) your starting paragraph name 2.Right-click and select: Open Perform Hierarchy 2. 1. Perform Hierarchy Paragraph Name List  Paragraph relationships (nested PERFORM chain) shown through indentation Note – if you are using RDz v8.0.3 or later the icons will be different from those shown here. We explain the enhanced icons in an upcoming slide.

284 284 Paragraph Control Flow Analysis – continued If you wish to navigate to the paragraphs declaration in the source: 1. Double-click (to select) the paragraph in editor Open Declaration 2. Press F3 – or use the Context menu to Open Declaration You can return to your original source position in the paragraph control flow analysis by: Clicking a paragraph in the Perform Hierarchy …or… Pressing: Alt+Left arrow Perform Hierarchy Paragraph Name List Expand the Hierarchy Name List - to see the nesting of the PERFORM chain paragraph relationships (GO TO as well) Click a Paragraph name in the Perform Hierarchy view - to navigate to that line within the source (Editor View)

285 285 PERFORM Hierarchy – Enhancements in Version 8.0.3  Catches possibility of fall-thru in programs  Now visually identifies logic branching:  Within Loops  Within conditional statements  Call statements  Statements that break out of a Perform chain (and could potentially cause program fall-thru)  Preference to toggle between Performee/Performer analysis modes, and to turn off/hide:  Fall thru calculation  GOBACK/Stop Run  Subroutine Calls  Paragraph Exits Perform within conditional  Perform Until  Potential Fall-thru 

286 286  Workshop – Paragraph Flow Analysis TRMTRDZ.cbl 1.Open TRMTRDZ.cbl in the editor 100-MAINLINE 2.From the Outline view, click on the 100-MAINLINE paragraph 100-MAINLINE 3.Double-click on the 100-MAINLINE paragraph name in the editor 4.Right-click and select: Perform Hierarchy 5.Expand all paragraphs displayed in the Perform Hierarchy 6.Scroll up to the top of the Perform Hierarchy Paragraph Names List 7.Double-click five or six of the paragraph names in the Perform Hierarchy – and note how the editor window code synchronizes with the paragraph name reference in the Perform Hierarchy view 8.To view the source-level declaration for one of your selected paragraphs from the Perform Hierarchy In the source editor:  Double-click (to select) a paragraph name  Press F3 – or use the Context menu and Open Declaration 9.To return to your place in the Perform Hierarchy and analyze more of the program's procedural flow, double-click another paragraph name entry in the Perform Hierarchy Paragraph Name list Alternatively, you can trace backwards/forwards through your code by pressing:  Alt-Left - to go back up through previously selected source lines  Alt-Right – to go forward through selected lines

287 287  Optional Workshop TRTMNT.cbl 1.Open TRTMNT.cbl in the editor 2.From the Outline view, click on PROCEDURE DIVISION 3.Open the Perform Hierarchy, starting from the Procedure Division statement 4.Using the Context Menu  From Show In open the Control Flow Diagram Navigate the program using these two business logic analysis tools. Note the differences in procedural logic illustration and the value offered by each tool in the RDz workbench.

288 288  Optional Workshop – Perform Hierarchy Fall Thru If you have RDz version 8.0.3 or higher installed on your PC try this workshop:  Part 1. FORMATER  Open FORMATER.cbl from your RDzClass project  Using the Outline view locate the Procedure Division  Hover your mouse over the 100-MAINLINE paragraph  Right-click and select: Open Perform Hierarchy  Expand the first few paragraphs  Note the following: IF statement flags, CALL statement, Iteration icons  Part 2.  In the 100-MAINLINE paragraph, find and un-comment the GO TO 300-FIELD-EDITS. statement  Save the file (press Ctrl+S)  Create another Perform Hierarchy (see steps above) on the 100-MAINLINE paragraph  Expand the second reference to 300-FIELD-EDITS (the GO TO statement)  Note that the uncommented GO TO breaks the logic out of the "perform chain" – and execution falls out of the bottom of the program  These sorts of errors can be very difficult to see in large complex code  PERFORM 1000-RETURN-SORT THRU 10000-EXIT.

289 289 Application-Wide Control Flow and Dependency Analysis  If you need to view a "bigger picture" of the control flow among different COBOL, PL/I and Assembler modules in an application you can utilize IBM's Rational Asset Analyzer (RAA) – which integrates with RDz, and can render different levels of:  Transaction Flow Diagrams, Batch Job Diagrams, Call/Calling (Run unit) Diagrams  Impact Analysis  Various cross-referenced/hyper-linked file/database and program dependency analytics  Where used/Where modified, etc. Batch Jobs  Composite load modules  Data Access

290 290 Data Flow Analysis – Maintenance and Production Support technique  Data Flow research is a complex analysis process that involves iterative searching and building of mental "dependency maps" for variables that are modified or referenced through statements within one or more programs  On the mainframe, you either:  Utilize listing files/XREF entries – or –  Using ISPF you access option 3.4, or =3.14 and issue a series of manual text FIND operations – saving or writing down interim results.  This is:  Typing-intensive  Error-prone  With lots of time spent loading programs into the editor in split-screen, etc.  Using RDz you:  Find your starting Search variable  Pin the Search View and double-click each found-reference  This is:  Not typing-intensive  Less error-prone  With RDz, all Search results are:  Fixed  Hyperlinked – available from a mouse click

291 291 RDz's Data Flow Analysis Techniques Many categories of project requirements necessitate that you track the order in which data values propagate within a program and across an application. This is commonly referred to as "Data Flow Analysis" While there is no single declarative function in RDz to address Data Flow Analysis, there are techniques that exploit the advanced Eclipse functionality in the tooling. RDz also provides a "Data Elements" view – that presents the complete list of variables in a "Compilation Unit" – which can be used as an organizing interface for your data analysis tasks. Finally, it should be noted that RAA (Rational Asset Analyzer) does offer a single "Impact Analysis" function that provides Data Flow Analysis Marked Occurrences Ctrl+F Search ISPF Command Line Find RAA Hyperlinked references – synchronized with editor YYNY Color-coded "Modified" vs. "Referenced" results YNNY Use of Regular Expressions in Search YYNY Automated Impact AnalysisNNNY Multi-window views (Analysis "Dashboard") YYNN Search using Filtering Excludes with lines/columns NYYN

292 292 Data Flow Analysis Using RDz Technique steps:  From the starting point (a variable): 1.Select the field and search (using a menu) for all occurrences 2."Pin" the search results 3.Double-click each result line – which co-locates the line in the editor 4.Analyze the statements operation 5.If another variable is indicated as being part of the Data Flow, return to Step 1 and search on the next variable This will be similar to what you did earlier in the course, using Marked Occurrences. In fact – this is basically a more generic way of using RDz's hyper-linked FIND functionality, and you could do this same workshop using Marked Occurrences – which has the added advantage of illustrating "where modified" vs. "where referenced"

293 293 Data Flow Analysis  Workshop – Data Flow Analysis Open DFLOWRDZ.cbl in the editor F WS-PHARM  From the command line, type: F WS-PHARM and press Double-click 1.In the Editor source, Double-click (to select) WS-PHARMACY-CHARGES Search 2.From the Search menu, Text > select, Text > File File This will launch a search for WS-PHARMACY-CHARGES throughout your program, and save the search results in a new persistent view Search 3.From the Search View, click: Pin the Search View – This keeps the view intact, when you launch additional searches

294 294 Data Flow Analysis  Workshop – Data Flow Analysis – continued 4.Double-click each line in the Search View – the source code will synchronize in the Editor 5.Analyze each COBOL statement. If the operation would alter the value of some other variable (through a MOVE or COMPUTE statement) return to Step 1 on the previous slide, and search on the next variable in data flow  Double-click to select another variable - in this example, double-click: PATIENT-PHRM-PER-DAY-O Search  Pull down the Search Menu, and select, Text > File  From the (new) Search results click: Pin the Search View

295 295 Data Flow Analysis  Workshop – Data Flow Analysis – continued Again analyze each COBOL statement in the pinned Search view. If the operation would alter the value of some other variable (through a MOVE or COMPUTE statement) return to Step 1 and search on the next variable in data flow  Double-click to select another variable  From the Search Menu select, Text > File  From the (new) Search results click: Pin the Search View  Analyze the next variable's usage and continue If the operations for a COBOL variable do not modify the contents of storage, return to a previously pinned view, and double-click the next line Additional pinned Search Views for other variables

296 296 Create a Data Analysis "Dashboard"  Optional – Create a Data Analysis "Dashboard" You can move (Drag & Drop) the Search results views to different Workbench areas Detach Or you can Detach the views for optimized use of "screen real estate" in your analysis Here's an example of this with an Assembler program

297 297  Workshop – Optional Approach to Data Flow Analysis  An alternative to the multiple-windows approach for certain search use cases is to use Ctrl+F searching, iteratively building up an "OR" condition  Try this:  Open BNCHS601  Press Ctrl+F and check: Regular expression  Search for WS-PHARMACY-CHARGES, using All  Find will show that WS-PHARMACY-CHARGES is compared to IN-PHARMACY- CHARGES.  Double click: IN-PHARMACY-CHARGES, and press Ctrl+C  Press Ctrl+F again  Type a separator pipe: | - and paste IN-PHARMACY-CHARGES after, press All  You will grow the list of returned rows and continue to iterate over newly-found variables  At any time you may:  Stop and edit the code –Return to search (press Ctrl+F) – your search expression persists  Select, copy and paste the results into a spreadsheet – for a more permanent analysis documentation  See next slide for a snapshot of how this approach differs from the previous

298 298 Data Flow Analysis – Using Ctrl+F Regular Expressions (Review) Find String with text separated by | Clicking All excludes rows You can do Data Flow Analysis using : Ctrl+F Regular Expressions – to OR multiple variable searches Peek (set at 1 or 2) to see rows surrounding the found lines

299 299 Data Flow Analysis – Review  Data Flow analysis is an iterative complex process, that involves expanding the scope of your search as new variables in the data flow are discovered  On the mainframe, you either:  Utilize listing files/SX-REF entries – or  Using ISPF you access option 3.4, or =3.14 and issue a series of manual text FIND operations – saving or writing down interim results. This is:  Typing-intensive and error-prone  With lots of time spent loading programs into the editor in split-screen, etc.  Using RDz you: 1.Find your starting Search variable 2.Pin the Search View and double-click each reference  There are static analysis tools from IBM that are dedicated to providing this information, through ultra-quick and simple techniques (ask your instructor about Rational Asset Analyzer)

300 300 RDz Version 8.0.3 and later – Source Formatting  Source formatting applies rules-based code formatting:  Indents statements  Outlines nested IF statements – showing the nested logic visually  Modifies statement case (upper/lower/mixed/etc.) Source  Available under the Source context menu for individual programs opened from Remote Systems or Local Workstation project, using the dedicated language editors:  COBOL Editor and PL/I Editor  Not in the LPEX editor  To open a file using the COBOL or PL/I editor  Right-click the file  Select Open With >  Formatting rules are configurable:  Define your own custom rules for source formatting

301 301 Source Formatting – Examples  Nested IF  Data Division Before After

302 302 Formatting Preferences The values set in these preferences will also impact the capitalization of text In Content Assist proposals

303 303  Workshop – Source Format Steps:  Open FORMATER.cbl with the COBOL Editor  Using the Outline view, locate the paragraph: 400-NUMERIC-RANGE-EDITS  Stare at this paragraph for a second. Aren't you glad you don't have to modify it?  Using your mouse, select all of the code in the paragraph  Right-click and select:  Source > Format  Note the following:  The indentation follows the logical structure of the code: - MOVE "Y"… is unconditional - IF nesting is visually correct - Etc.

304 304 Software Analyzer (Code Review) – Version 8.0.3 and later  Essentially "electronic desk-checking" that provides a means for you to enforce shop coding standards and best practices  Available for COBOL programs opened from:  Remote Systems Explorer  Local Workstation Projects – including a PDS downloaded to a local project  z/OS Projects/MVS SubProjects  Easy to use:  Context-menu accessible  Easy to setup:  Create custom rule sets configuration based on in-the-box COBOL rules  More requirements (from customers) are encouraged/gladly accepted  Somewhat customizable:  In-the-box rules customizable through Preferences/Configurations for rules  Considerations:  Code Review runs locally (on your PC – not on z/OS)  You can drag & drop an entire COBOL PDS to your Local Workstation – to run Code Review against all of the members in the PDS at one time  Its functionality expands on existing Java code review  Check for COBOL standards deviations in the editor  Can run reports on standards compliance and trends

305 305 Software Analyzer (Code Review) – Version 8.5  Starting in Version 8.5 Code Review provides:  Considerably more:  In-the-box rules  Semi-custom rules –Accessed via Preferences > Software Analyzer > Custom Rules and Categories  An ability to create and import your own completely custom (in-house) COBOL code review rules  These require you to create Java/Eclipse plug-ins  RDz provides: –COBOL code review class framework –An externalized API for understanding and working with your COBOL code (in essence – the API for parsing your code in Java)  Both the Semi-custom and completely custom COBOL code review rules are beyond the scope of this course  We continue with material and a workshop that shows the Code Review feature with default rules and rule configurations (named collections of coding rules)

306 306 Software Analyzer (Code Review) – Example  Single program results  Each of the collapsed rule indicator allows you to hyper-link to the statement in the source program  Click this Red X to delete the results (and associated source tags)

307 307 Software Analyzer (Code Review) – Example You can drag an entire PDS to a Local Project and run Code Review against all of the programs at once And you could drag multiple libraries to a Local Project and run Code Review against all of the files in the workspace You can select multiple specific programs to run Code Review against in a Local Project

308 308  Workshop – Code Review – Access the Configurations Wizard  Open WARDRPT.cbl in the editor  Right-click and select: Software Analyzer > Software Analyzer Configurations…

309 309  Workshop Code Review – Create a Ruleset  Select Software Analyzer and Click: the New launch configuration icon  Name your Ruleset   Select the Rules tab  Expand COBOL Code Review  Uncheck a few of the available default rules in the three ruleset categories: 1.Naming Convention rules 2.COBOL performance and run-time efficiency rules 3.Code maintainability ("Program Structures") rules  Click Close and Yes – to the "Save changes?" prompt Notes  You can return to Software Configuration, and modify your rule selection at any time.  If you are using RDz v8.5 you will see different COBOL Code Review rules than this screen capture  

310 310  Workshop – Review the Code in WARDRPT.cbl  Right-click and select: Software Analyzer > Software Analyzer Configurations…  COBOL RULES  Or whatever you named your Ruleset  Note what happens:  Any statement that "breaks" a rule is:  Flagged  Hyperlinked  Navigate around in the results a bit until you get the idea behind Code Review  Click the Red X icon in the view, to delete the Code Review analysis

311 311  Workshop – Review all of the COBOL Code in RDzClass  From z/OS Projects:  Right-click over your cobol folder and select: Software Analyzer > Software Analyzer Configurations… > COBOL RULES  Or whatever you named your custom Ruleset  You might want to run this in the background When the analysis process finishes: Browse several of the results Expand the categories Double-click a broken analysis rule – what does this do? Do not delete the result (one more workshop step – on the next slide) Note that you could drag a mainframe PDS to a Local Workstation project – and perform code review against all of the PDS members in the library in a single operation

312 312 Source Code Editing, Filtering, Analysis – Review and Use Cases RDz Editing Tool Considerations Edit in HexFrom the Context Menu, select: Source > Hex Edit line Look-ahead "intelli-sense" typingPress Ctrl+Spacebar – Works for: COBOL, PL/I, Assembler, JCL (8.5) and SQL You can customize the proposals presented by Content Assist in Preferences > COBOL. Comment / Uncomment multiple lines with one operation From the Context Menu, select: Source > CommentOr Uncomment Show only comments in your sourceSource > Filter view > Comments Show only operational code in your sourceSource > Filter view > Code Show only SQL and CICS statementsSource > Filter view > Embedded SQL, CICS, DL/I Show only EXEC statements in JCLSource > Filter view > EXEC statements Illustrate the control flow (procedural) logic in a COBOL program Use Program Control Flow – or Perform HierarchySee table at the beginning of this section that exposes the differences Trace the flow of data – throughout the PROCEDURE DIVISION Select a variable and use the Search menu – combined with pinned search results. Or use Ctrl+F (Find) and the All option Can also utilize Occurrences in Compilation Unit – to show where used vs. where referenced semantics Indent your code to expose the actual procedural flow of code within a paragraph Using the COBOL Editor - Select the statement and from the Context Menu > Source > Format You can customize the indentation and capitalization characteristics of formatting. Format an entire program by not selecting a statement. Apply standard (default) or custom COBOL coding rules and standards to your programs From Software Configuration define a configuration for the rules you wish to apply. From the program: Context Menu > Software Analyzer > select your configuration A set of custom rules are included with RDz and can be implemented in Preferences. Completely custom coding rules are created as Java/Eclipse plug-ins

313 313 Optional Topics and Workshops For This Section  If you have time, and are comfortable with the material covered, please read through the slides – and/or try out the techniques shown using RDz and sample programs.  The development techniques covered in these slides can make your standard z/OS Maintenance, Production Support and Development tasks much easier, and make you more productive. So at some point – perhaps after class please consider returning to these optional topics to build out your RDz skills.  Also – if you have access to RDz installed on your mainframe and time permits, please try out the techniques shown using your own application source.

314 314  Optional Workshop – Create a PDF Report for your Code Review  From the Software Analyzer Results view  Click Generate a report for the current selection  Select PDF Report and click OK It will take a few seconds to generate this PDF… But it's worth it 

315 315 Code Review – PDF Report (sample)

316 316 Optional Workshop  Optional Workshop - Manipulating Views for Optimum Data Analysis Capabilities  Open SAM1.cbl. Find the call to SAM2 and open SAM2.cbl from the Context menu  Open multiple Occurrences in Compilation Unit views – one for each of the sending/receiving parms between the programs  Pin the Search views so that each "Occurrences…" view persists, and you can hyper-link from the entries in it

317 317  Optional Workshop – Source Format – Data Division  Steps (still using FORMATER.cbl):  Using the Outline view, expand: WORKING-STORAGE SECTION Find and click the variable: 01 DCLDIAG-CODES  Notice that this 01 structure is not very well coded - in fact, it's plain ugly!  Left (single) click anywhere in the source – but do not select anything I.E. make sure that your code is not inverse video  Right-click and from the Context menu select:  Source > Format  Note the following:  The variables line up  Formatting was applied to the entire program –Not just a selected portion of the code  This is how source formatting works:  If code is selected format just the selected code  If nothing's been selected format the entire program

318 318  Optional Workshop – Source Format Preferences From the Window menu, select Preferences  Type: formatter in the filter box and click the COBOL > Editor > Formatter  Time permitting experiment with this feature, changing:  Custom Indentations – note the Preview window  Capitalization Reserved wordUser-defined wordMixed Case  Change Reserved word and User-defined word to Mixed Case Source Format  Click OK – return to your source program and do another Source Format

319 319 UNIT Topics: Advanced Eclipse Topics Course Review Questions Workbench Final Workshop Notes: Notes: The content in this section will help you to further develop and lock-down your RDz skills, as well as to show you how RDz works with "production-scale" COBOL programs. It's actually very important that you finish the Review Questions. And it will help you to understand the value of RDz by working with the large program in the Final Workshop RDz for ISPF Developers

320 320 Advanced Topic (for experienced eclipse users) – Short cut to Eclipse Views, Menus, Perspectives  Say you're doing something in RDz and want to go somewhere else, like Preferences, open a View, access a Help topic, switch to a perspective, etc.  Eclipse offers a hot-key (Ctrl+3) and/or menu'd access to all of the above Window > Navigation > Quick Access  Use the Window > Navigation > Quick Access menu Ctrl+3  Or (from anywhere in RDz) press Ctrl+3 Type something here  …that relates to what you want to do or where you want to go Double-click your selection  Or press Ctrl+F3  Mouse/Menus Workshop  Workshop Time-permitting, try this technique out: Press Ctrl+3 Type: da Double-click Data Perspective

321 321 Advanced Topic (for experienced eclipse users) – Access to Views from within Maximized work Working on production-scale programs in Maximized screen mode is very helpful, but you may wonder: "How can I get access to features like: the Outline View or Perform Hierarchy, while working in Maximized mode?"  Press Ctrl+3 (see previous slide) and to access the outline view. In maximized mode the Outline view displays across the bottom (not shown) When you click outside of the Outline view it minimizes down to an icon – (see screen capture)  From any paragraph, use the Context Menu to open the Perform Hierarchy. In maximized mode the Perform Hierarchy initially appears on the right side as an icon  Click the icon to see it  Click in the editor and the Perform Hierarchy minimizes back to the icon shown on the far right  When you restore the view (non-maximized) the Perform Hierarchy and Outline views behave as usual Workshop:  Workshop: Try this technique out with any of the programs you've used so far in this class Click to open the Outline View Click to open the Perform Hierarchy

322 322 Final Review – "How do I" - Using RDz, be sure you know how to do the following How do I …  Change from LPEX to the ISPF editor?  Save my changes when editing a program (and how do I know if I've made changes to a file)?  Bring up a list of variables while typing in new COBOL statements ("code completion")  From the Procedure Division show the declaration of a variable?  View or edit a COBOL statement in HEX?  From the Procedure Division – discover what the declaration of a variable is?  See how COBOL paragraphs are chained (performed) from one another?  Replace the current version of a file I'm editing with one I saved a few hours ago?  Open a file? Close a file?  Split screen edit on a single program? View multiple programs and/or copybooks in split screen mode?  Filter out all comments from program source, so that I can focus on the code?  Go to a full-screen view of a program so that I can see more source code?  Open the Context menu? Which mouse-button opens the Context menu?  Change the installation default colors of my editor?  Access the Find menu?  Go to the top of / or bottom of file What are the commands and/or hot-keys to do this?  Know what column my cursor is in, when I'm editing a program?  Analyze data movement throughout variables in a COBOL program?  Select multiple lines in a COBOL program and make them all comments without typing?  Reset, open or switch perspectives – to access different product views for Debugging, SQL work, etc.  Delete text to the end of a line (like the EOF key)?  Analyze the Performed paragraph structure in my PROCEDURE DIVISION?  Go directly to the declaration of a variable by pressing a PF-key (and which PF-key does this)?  Reopen a View that I've closed by accident – or just generally open a View that is not currently displayed?

323 323 Review – Answer the following (be sure you're right by trying your answer out in RDz)  What does the Outline view show – and how does it work?  What is a Workspace?  What does Ctrl+Shift+L do inside the Editor?  What is the purpose of a Property Group file?  What is in the Properties view?  What is the difference between the Outline and Perform Hierarchy views?  What is in the Snippets view – and how do I open the Snippets view if it's not showing in my perspective?  What does Ctrl+S do when I'm editing?  What is a COBOL program Template – and how can I customize the default Templates IBM ships?  What happens when I select a COBOL reserved word and press F1. Do you think this works for Assembler? is  Just what is a perspective?  What are several ways to create a brand new COBOL program?  What is a Bookmark? How do I create a bookmark and navigate to a bookmark? (how about a Task)?  What's in the Context menu:  (Right-click) When I'm editing a file?  (Right-click) When I've selected a file in the z/OS Projects view?  True / False:  A file's extension (.cbl,.cpy) is not important  The Hover feature, which show's a variable's declaration doesn't work on COBOL 88-level indicators  Content Assist does not provide code completion for file FDs – when coding OPEN/CLOSE statements  You can not stack ISPF commands using the RDz editor when using the ISPF profile  You can only split screens vertically – you can't split them horizontally as you would with ISPF  Content Assist only works with COBOL programs, in fact, RDz's language sensitive editors only work with COBOL

324 324  Final Workshop – Working With RDz on Large Programs – 1 of 4  You may have been wondering as you went through the labs and content in this course how RDz actually works with large, production-scale programs. Here's your chance to find out.  Workshop pre-requisites:  You must have setup your Property Groups to enable SYSLIB for resolving references to copybooks  If you are using the Local Workstation RDzClass project  please finish the lab titled Enabling a Local Project for Copybook Access  If you are using your mainframe (or zserveros) please finish the lab titled: Property Groups for Remote Systems  From RDzClass (or from your mainframe) PARTSUPP  From the  partsupp folder, open the program named: PARTSUPP Local Syntax Check  Right-click in the program, and select: Local Syntax Check  Check out the results in the Remote Error List view Continue with workshop steps in the next slide…

325 325  Final Workshop – Working With RDz on Large Programs – 2 of 4 Program Understanding Find all of the COPY statements and open: ACCOUNT, MASTER, DETAIL and WAREHOUS Create a multi-windowed view as shown below – to provide optimal viewing of: - Program source - Copybooks In PARTSUPP: - Hover over a field - Hover over a section - Navigate using: - F8/F7 - PgUp/PgDn - Cntrl+PgUp - Cntrl+Home - Cntrl+End - Commands - to a specific line# - top/bottom Close all of the editing sessions Don't save any changes you may have made

326 326  Final Workshop – Working With RDz on Large Programs – 3 of 4 Control Flow (Procedure Division) Code Analysis 1.Load PARTSUPP into the editor. From the Outline view, click: Show Procedure Division Only  This is because (not unlike most Production programs) PARTSUPP has a LOT of variables 2.From the Outline view 300-LOOKUP SECTION  Click on the 300-LOOKUP SECTION  Expand the Section so you that you can see all of the paragraphs inside the Section 3.Inside of the editor, mouse over the Section name  Note the abbreviated paragraph list  Note also that, neither the Outline view nor Hover gives you a complete understanding of the code structure  - Let's look at the Perform Hierarchy 4.Right-click over 300-LOOKUP SECTION and select: Open Perform Hierarchy  We recommend that you move the Perform Hierarchy view to the top right frame  5.(For a few minutes – and a few minutes only) Use the Perform Hierarchy to study the Control Flow in this large and complex program  Click a paragraph or section in the Perform Hierarchy – note the editor code-synch From the source editor:  To view the source-level declaration for a selected paragraph - From the source editor:  Double-click (to select) a paragraph name  Press F3 – or use the Context menu and Open Declaration  To return to your place in the Perform Hierarchy and analyze more of the program's procedural flow:  Double-click another paragraph name entry in the Perform Hierarchy Paragraph Name list  Alternatively, you can trace backwards/forwards through your code by pressing:  Alt-Left - to go back up through previously selected source lines  Alt-Right – to go forward through selected lines Note how the above techniques allow you to navigate to your analysis "points-of-interest" quickly and effectively, and learn complex programs Top-Down

327 327  Final Workshop – Working With RDz on Large Programs – 4 of 4 Data Flow (Impact) Analysis Part I – Problem: Trace the impact of a change to the variable COLR-TC-CUST throughout PARTSUPP 1.Press Ctrl+F – and check:  Regular expression All 2.In the find area type: COLR-TC-CUST and click All 3.Add several additional variable names to the search pattern - as they appear in the find results – separated by a regular expression OR character: | Don't spend too much time doing this, but your list could include: colr-tc-cust|rdz0001-wrehouse-number|new-unit-cust-no|docum1-wrehouse-no|docum1-sort-cust|ibm3-custnum Note: if you inadvertently close search part-way through the above, just press Ctrl+F and hit the up arrow key Data Flow (Impact) Analysis Part II – Narrow down the search by AND'ng results also Find only statements in the above results set that also contain references to:  IF  PRT  PRT or LOCATN Note: click Next to AND your search within an existing result set

328 ® IBM Software Group Appendices - Custom Pre-processor Support - COBOL and PL/I Language Editors - Local Workstation Project Debugging - Snippets, Code Templates - ISPF  RDz Comparison Matrix

329 ® IBM Software Group Appendix A – RDz Custom Pre-processor Support – for: - IDMS (batch) - 4GLs - COBOL Report Writer - CA-Telon, Netron Cap, etc. - Any custom in-house macro processing

330 330 Preprocessor Support  RDz 8.0.3 (and later) allows you to invoke remote** or local pre-processors on COBOL and PL/I programs  This large categories of new application work for RDz:  IDMS applications  Custom (in-house developed) pre-processors  Invoking pre-processor functionality is available from a new Source menu option:  On the menu bar in the New COBOL and PL/I editors  From the Context Menu in the LPEX editor  Existing statements in file automatically pre-processed upon file open  New statements can be sent (dynamically) to the pre-processor during edit (see next slide)  Several preferences provide flexible pre-processor use cases  Preprocessor support enabled from:  LPEX editor  COBOL and PL/I Editors  z/OS Projects (MVS SubProjects) **Remote preprocessing requires 8.0.3 (or later) Server

331 331 Preprocessor Support – Big Picture / Local Preprocessor Source file sent to Preprocessor Preprocessor output sent back to editor Before opening a file in the editor, all statements are sent to the specified pre-processor Pre-processed statements:  Marked in dark blue  Annotated with a vertical line

332 332 Preprocessor Support – Big Picture / Remote Preprocessor Program source sent to Preprocessor by invoking a CLIST or REXX Exec Preprocessor output opened from library PL/I Macro file Pre-processed inline

333 333 Pre-processor Integration Preferences  Preferences to:  Trigger the timing of pre-processing identification routines  Ignore cosmetic source changes

334 334 How does this work?  A combination of your Property Group entries + a custom REXX that parses the Property Group XML  Other Property Group entries can be utilized / parsed if necessary.  Example: SYSLIB is pulled from the Copy libraries entry

335 335 How does this work? (Part II)  A sample REXX to invoke the COBOL Report Writer Pre-Processor

336 ® IBM Software Group Appendix B – The COBOL and PL/I Editors: Appendix B – The COBOL and PL/I Editors: - Terms and Concepts - Feature/Function

337 337 COBOL and PL/I Language Editors  Starting in version 8.0 IBM introduced language-specific editors for COBOL and PL/I  These editors are built entirely from the Eclipse framework, and thus behave like the Eclipse Java editor used in many colleges and universities  The functionality in these editors was limited in the first release, but it is gradually being built-up over time, and – starting at version 8.0.3 – these editors contend strongly for "editor-of-choice" status with many RDz users – especially those without deep ISPF experience  Pluses:  Powerful GUI code development features/functions  Heavy investment by IBM for future enhancements  Minuses  These language editors do not contain ISPF editing features (there is no profile, no command line, no prefix area, no ISPF PF-Key emulation, etc.)  The slides in this Appendix section introduce some of the features of these editors, but please note that the slides:  Are not a formal and detailed tutorial like the LPEX material you studied in this module  Assume that you have:  Eclipse skills and experience  Finished the material in this Powerpoint on RDz

338 338 Invoking the COBOL or PL/I Editors  Invoke the editor by right-clicking over a COBOL or PL/I file, and selecting: Open With > COBOL Editor  Note that you will only have to do this one time. RDz will open persist your decision to your workspace  Also – in Preferences you can change your default editor to the COBOL or PL/I editor instead of LPEX All of the other RDz views work (Overview, Remote Systems Explorer, etc.) work exactly the same with the COBOL, PL/I and LPEX editors

339 339 Menus and Toolbars  Note that the menus and toolbars are different from the LPEX editor  Many of the functions are the same as in LPEX  But getting to them requires different keystrokes  You will probably use the menu and toolbar with this editor more frequently than you did with LPEX  Also:  Many functions in these editors not available in LPEX  And many functions in LPEX not available in these editors

340 340 Editing Context Menu  Select some source and right-click to find the edit operations available from the COBOL or PL/I editors  Subset of what is in LPEX  Some new functionality and options:  Source - Format your program, etc.  Revert File – one click "cancel all changes" – without leaving edit

341 341 Some very nice COBOL editing features  Enhanced Hover  Variables  Hover over a variable  Slide your mouse focus point into the hover rectangle (or press F2)  This opens a graphical area – for viewing the variable - with icons for navigating to the declaration  All with one-click  COBOL Paragraphs/Sections  The same technique – when you hover over a COBOL paragraph or section allows you to: –Open the Perform Hierarchy on the paragraph/section –Navigate to the paragraph/section declaration in the source

342 342 Collapsible Sections  In the COBOL editor you can collapse/expand:  Divisions  Sections  Paragraphs  In the PL/I editor, you can collapse/expand PL/I procedures  Useful for isolating code … as is "Show only selected source"

343 343 Show Source of Selected Element Only**  Toolbar option that allows you to select a paragraph, section, or procedure and isolate (show only) the statements in that COBOL paragraph or PL/I procedure Range indicator 1. Click anywhere inside of a paragraph 2. Click "Show Source of Selected Element Only Isolates the paragraph **See Slide Notes

344 344 Variable Markers  In the COBOL and PL/I editors, when you select a variable, the editor marks:  The declaration in gold  Any statement that modifies the contents of the variable in gold – COBOL only  All other statements in gray  Conditionals  Search statements  START  Assignment statement (sending portion)  etc.

345 345 Surround With  You can select a set of statements, right-click and ask RDz to surround the statements with a:  Conditional statements: IF, Evaluate  PERFORM – UNTIL, VARYING  Configure Templates… allows you to add/change/delete the default COBOL statement templates

346 346 Block Copy/Paste  The COBOL/PL1 editors have enhanced code block (rectangle/block) editing capabilities – when compared with LPEX  Enter Block selection mode  Draw your rectangle (left-mouse/drag)  Copy/Paste

347 347 Quick Fix  Provides mouse-based code fixes for:  Keywords  COBOL and PL/I variables  Shown as a small light-bulb in the left-margin next to real-time syntax validations  Mouse-over syntax errors to get click-able proposals list  Double-click over an entry in the list to pick up the Quick Fix

348 348 Hex Editing  A toolbar option in the COBOL and PL/I Editors that opens up a Hex Edit area for the selected line  Toggle on and Toggle off from the toolbar – or using a Hot-Key (Ctrl+Shift+H)  Edit in hexadecimal  The editing area persists:  From line-to-line – when you move around in your source file  From file-to-file – when you close and open different files  From RDz launch-to-launch – when you open and close and reopen RDz

349 349 COBOL Numbers  New to the COBOL Editor:  From the Source menu:  Renumber  Unnumber  Default puts COBOL numbers in columns 73  80  Start Numbering At Column 1 shifts COBOL numbers to bytes 1  6 **This particular feature is available for the COBOL editor LPEX has supported COBOL numbering for many releases

350 350 Task Tags  Files opened in the COBOL & PL/I editors will be scanned for tags in comments.  Tasks will be created for matching patterns in the Tasks View.  Preference pages will allow customization of tag patterns.  Generated Tasks will persist after closing the editor.

351 351 COBOL and PL/I Editor Functionality – Preferences  From Window > Preferences

352 352 Find EBCDIC Hex Characters – in a File (v8.5)  Find text (Ctrl+F) using the hexadecimal values based on the file's remote codepage  Override the behavior of the existing escape sequence “\xhh” to always be interpreted as being based on the remote codepage values.  This behavior works on both the Find text field and the Replace text field.  Content Assist provided for the Regular Expression (press Ctrl+Spacebar)

353 353 Show Matching Parenthesis and Brackets (v8.5) Can highlight conditional and math parenthesizing of logical expressions  New preference pages will be added under COBOL and PL/I > Editor categories  Add preference to set the color used in the matching parenthesis annotation  Placing the caret to the right of an open or closed parenthesis will annotate the matching parenthesis

354 354 “Save Actions” in COBOL and PL/I Editor (v8.5) Enable actions before and after a file is saved  A new preference page added under the COBOL (top) and PL/I (bottom) Editor preference category called “Save Actions”  Source files have an option to Format source code, plus a sub-option to only apply the capitalization  When an editor is saved, the save actions will be run in this order:  Formatting  Save the file  Identify Preprocessor Statements  Identify Unreachable Code  Note: PL/I Save Actions will not have:  Identify Unreachable Code  Formatting of Include Files

355 355 Cosmetic Upgrades in v8.5 New Ctrl + Mouse click hyperlink on COBOL copybooks and PL/I includes TREATMENT Open Copy Member View Copy Member Browse Copy Member CUST2PLI Open Copy Member View Copy Member Browse Copy Member  

356 ® IBM Software Group Appendix C - Code Reuse - Program Templates - Code Snippets - Code Templates

357 357 Reusable Source Code – Snippets and Templates Reusing code has been a "holy grail" of software development for decades. While there is no silver bullet solution, there are a number of innovative and useful options in RDz for this:  Program Templates  Code Snippets  Code Templates We've already seen in previous slides that you can create new programs using templates, which allows you to create and enforce standards, and simplify development. Snippets allow you to create smaller, "packets" of reusable code – from single statements to routines. We'll first look at customizing the program templates: To access their defaults: From Window > Preferences > COBOL > Code Templates

358 358 Creating New Programs Using Templates  There are several ways to create new programs from scratch  The "Best Practice" method is to use RDz's COBOL program templates  From File, New > Other… …in the Wizards panel, cobol - Type: cobol - Select COBOL Program - Click Next > …in the COBOL Program panel, - Name the Program - Click Next >  Finally you specify which folder to create the program:  Select the cobol folder  Click Next > Note – You can create new programs

359 359 Creating New Programs From Templates – continued You can add CICS or DB2 template sample code to your new program:  Check the features you'd like Finish  Click Finish  A few things happen:  Your new program is created   The Snippets view is opened  Snippets information can be found in Appendix B of these slides  Note that you can customize the templates used to create new programs Window, Preferences, From Window, Preferences, select: COBOL COBOL –Code Templates –Features

360 360 OPTIONAL TOPIC – Create New Program in a z/OS LPAR  You can create new programs using the New COBOL Program wizard, provided you are connected to a z/OS LPAR, and that you have created a z/OS Project/MVS Subproject (see Location: in the screen capture below). MVS SubProjects and z/OS Projects are covered in another module of this course

361 361 Customize the New Program Templates – Comments You can create a custom Code Template for COBOL comments or the base program code itself. To add or customize comments:  Click the comment option you wish to modify  Code an asterisk in position 7 (you'll have to space over 1-6)  You can insert Variables that are filled in when new "templatized" programs are created

362 362 Customize the New Program Templates – Program Code And you can add your own entries, common files, databases, variables, routines etc. to either:  An entire program  Separate program divisions When a new program is created using the templates all of the custom comments and code are inserted.

363 363 Code Snippets Sometimes, instead of entire programs you might want to:  Save some code temporarily for reuse – similar to the ISPF: "CREATE" and "COPY" command line commands  Create a paragraph, computation, complex conditional – that can be re-purposed in other programs  Provide a library "standard" routines – using your shop's coding conventions  Provide a library of syntactically-correct and infrequently used/high-value statements:  Job Cards  Database routines  Complex COBOL code: UNSTRING etc. Snippets are the preferred way of doing this. You access them through a Snippets view, which you get to by:  From Window > Show View > other…  Type: snippets – and select the Snippets view On the right are a group of custom Snippets that we have created. You will see a subset of these in your workspace. Individual Snippets are contained in "drawers" which are the accordion menus that collapse/expand on-click. Snippets can be Exported and Imported (for sharing)

364 364 Using Code Snippets (ISPF "COPY" command line command) To use an existing code Snippet follow the steps below: 1.Place your cursor at the exact focal point (position in the source) where you want a code snippet inserted 2.Find your Code Snippet in the snippet drawers 3.Double-Click the Snippet 4.If there are variables in the snippet, you can:  Accept the defaults  Over-ride the values before the code is inserted 5.Click Insert

365 365 Creating Code Snippets (ISPF "CREATE" command) – 1 of 2 To create a new code Snippet follow the steps below: 1.Create a new Snippet category  Right-click over the Snippets view  Select Customize  From Customize Palette, under New Select: New Category  Name the Category  Add a description  Click OK 2.Select and copy the code you wish to Snippet-ify 3.Expand the category you wish to add the Snippet to, and select Paste as Snippet…

366 366 Creating Code Snippets (ISPF "CREATE" command) – 2 of 2 4.Rename the Snippet and give it a Description 5.Optionally add Variables to be filled in by Snippet users (or they can accept the defaults)

367 367 Using a Code Snippet for a Job Card In ISPF you might use the ISPF command line COPY command to insert a Job Card into a JCL deck. Let's try this with RDz  From the \ jcl \ folder, open: BR14.jcl  Select and Cut (Ctrl+X) the Job card  From the Snippets view, double-click: JOB Card  Enter a new JobName and a new MsgClass value  Click OK and verify your work

368 368 IMS The IMS Code Snippets If you are using RDz v7.6 or later, a number of very useful IMS Code Snippets are shipped with the product  These snippets go beyond simple text-based insertion to read your Data Division entries, and offer options for building statements using combo-boxes

369 369 RDz's Customize-able Content Assist Templates  Finally - you can customize RDz's template "proposals" offered in the Content Assist  You access this from:  Window  Preferences –COBOL –Templates  Customization options include:  Modify (Edit…) an existing template  Add a (New…) template  Remove a template  Export all templates – so that other team members can share  Import…  Restore Removed (un-delete)  Revert to Default (un-modify) You can customize a template's: - Content - Pattern - Context - where it's applicable - Description – hover help

370 370 Workshop –  OPTIONAL Workshop – Customizing Template Proposals  From Window, Preferences, COBOL, Templates:  Select one of the Template proposals and delete (Remove…) it  Select a Template proposal and Edit… (change it) – something simple like changing the case to mixed-case, instead of all UPPER case  Add a New… proposal, as shown here  You can copy and paste the this text. If Then If Else Else.  Test your work out in one of the sample programs, like: PATLIST.cbl

371 371 Code Reuse – Summary  Three methods of Code Reuse: 1. Program Templates  Useful if creating a new COBOL or PL/I program using the New program wizard  Can include standard (not customized) minimal CICS and SQL statements 2. Snippets  Most flexible and simple method of code reuse  Snippet scope can be from anywhere from a keyword to an entire program  Can define any number of custom variables to manage idiosyncratic requirements  Can export/import Snippets with Workspace  Can include Snippets view in custom Perspective 3. Code Templates  Most granular form of code reuse  Integrates with Content Assist  Typically used for statements – but could extend to more code (just, the interface is a little unwieldy)

372 ® IBM Software Group Appendix D – ISPF  RDz/LPEX Editor "Cheat Sheets"

373 373 RDz – z/OS Comparison Concepts and Products and TSO TSO/ISPF RDz – Integrated Development Environment Mainframe – z/OS PC – Windows/Linux JCL JCL. If doing offloading from z/OS. Shell scripts – on AIX machines Manually analyze code RDz (see slides in this PowerPoint), and RAAi - http://www-01.ibm.com/software/awdtools/raa/ http://www-01.ibm.com/software/awdtools/raa/ Edit Code - ISPF LPEX editor. Native LPEX or ISPF profile Compile/Compiler Options Validation, Syntax Check (Local or Remote) – Compiler options under RDz Property Groups Submit Job Edit JCL and submit job, or just use the Context menu and Submit Unit Test – DISPLAY/READY Trace, Xpeditor Debug Perspective – for z/OS (batch and online) applications – as well as Local COBOL projects Integration Test – Xpeditor IBM Debug Tool Integration QA – Regression Test - WinRunner Remote Systems Testing utilizing Rational Function Tester and Rational Performance Tester ABEND-AID/IBM Fault Analyzer RDz – Integrated Fault Analyzer from the IBM Problem Determination Tools File-Aid/IBM File Manager RDz – Integrated File Manager from the IBM Problem Determination Tools PDS (library) Folders - For Remote/SCM-based Projects and Local (z/OS) Projects JES Remote Systems View / JES functionality Endevor/ChangeMan – or Your SCLM 3rd Party SCMs utilize RDz's CARMA feature. RTCz and SCLM utilizing the SCLM provide their own RDz views. And there is Local History and source compare in native RDz ISPF Option 0 Window, Preferences ISPF Option 1 and Option 2 RDz Editor ISPF Option 3.1 (Library Utilities) Remote Systems view (Context Menu options) ISPF Option 3.2 (Dataset Utilities) Remote Systems view (Context Menu options) ISPF Option 3.3 (Move and Copy) Remote Systems view (Context Menu options) ISPF Option 3.4 (DSList) Project Explorer and Filters and Context Menu in Remote Systems Explorer and LPEX Editor ISPF Option 3.8 (Outlist) Remote Systems View – JES/My Jobs ISPF Option 3.11  3.15 (Extended Search) Search menu – covered in another RDz Distance Learning module ISPF Option 4 (Foreground) Context Menu, Run ISPF Option 6 TSO Command Shell – with some functional limitations (e.g. cannot issue Host Execs) ISHELL Remote Systems Explorer - USS files/filters + Context menu OMVS USS Command Shell SPUFI/QMF Data Perspective

374 374 RDz – ISPF Comparison Chart – PF-Keys ISPF Editor LPEX Editor PF 1 = Help F1, Help Menu*** See slide notes PF 2 = Split: Split the session (lets you use two functions of TSO at the same time.) Ctrl/2 or Context Menu – Open New View. Note that you can open an unlimited number of views PF 3 = End Ctrl+F4, Ctrl + 0, or close the Content Area PF 4 = Return Ctrl+F4, or close the Content Area PF 5 = RFind (repeat last find ) F5 or Ctrl/F – and / from LPEX command PF = 6 RChange (repeat lst change) F6 or Ctrl/N PF = 7 Page Backward F7 or PgUp key – or slider in window PF = 8 Page forward F8 or PgDn key – or slider in window PF = 9 Switch between screens during a split session; goes with PF 2 Mouse – or Alt + Shift + Right/Left arrows PF = 10 Page left Ctrl+PgUp or, the Home key, or slider in window PF = 11 Page right Ctrl+PgDn or, the End key, or slider in Window PF 12 Retrieve For LPEX commands, the Up Arrow Use ISPF Option 0 to customize PF-Keys Use Preferences to customize and extend Function key behavior The LPEX Context Menu can be accessed from the Right-mouse button – and from the Windows Menu key (on the keyboard between the right Alt & Ctrl keys) It should be noted that with the LPEX editor, it is not necessary for most of the above functions to actually press Ctrl/Key combinations, as the functionality is available from a context menu (right-mouse)

375 375 RDz – ISPF Comparison Chart – Primary Edit Commands ISPF Editor LPEX Editor Home key – Jump to the Command Line Escape key – jumps to the LPEX command line AUTOSAVE/REC Prompt for Save on exit, and Autosave (Preferences), and the asterisk – next to unsaved file names BOTtom LPEX command: bottom / Ctrl+End CANcel Close Content Area w/Save no (Ctrl CHANGE – All – NEXT, CHARS, X, ALL PREFIX, FIRST, SUFFIX, LAST, WORD, PREV, [col-1] [col-2] Supported using Change All, Next, PREV, Prefix and Suffix (with wildcards), Prev, Word, [col- 1][col-2], …or… Find/Replace menu (Ctrl+F), ISPF or the Search/Replace dialog: Copy Member Name LPEX command: Get filename CREATE Save file as…, or use Snippets View FIND – NEXT, CHARS, X, ALL PREFIX, FIRST, SUFFIX, LAST, WORD, PREV, [col-1] [col-2] http://www.felgall.com/tso2.htm Supported using findText, Ctrl+F, or the Search window: Find All, Next, PREV, Prefix and Suffix (with wildcards), Prev, Word, [col-1][col-2], P Not supported: First, Last HEX – Displays all lines in Hexadecimal Display one individual lines in Hex ISPF Macros Not available – but can be re-written using Java for LPEX. Also, note that with the LPEX functionality some of the Macro functionality may not be necessary LOCATE Ctrl+L, or use the Outline View MODEL Snippets and Templates (both options) MOVE Member Name LPEX Get command, in a different way, the Snippets View NUMBER LPEX command: number std (columns 73  80), or number cob PRINT – from ISPF 3.4 LPEX command: print, or Ctrl+P PROFILE – are the changes made to your profile Preferences Replace Member Name Snippets functionality RESet RES command, or: Ctrl+W, or expandAll, or: action showAll Save Ctrl/S or LPEX: save command Sort LPEX command: sort STATS – updates statistics Windows updates file statisticsautomatically SUBmit LPEX command: Submit, or edit JCL/Context Menu/Submit, or use Context Menu/Submit option TABS Set margins in Preferences, LPEX Editor, Tabs TOP LPEX command: top / Ctrl+Home TSO SUB LPEX command: submit, and edit JCL/Context Menu/Submit, or use Context Menu/Submit option UNNUM LPEX command: unnum

376 376 RDz – ISPF Comparison Chart – Find Commands – Picture Strings ISPF Editor LPEX Editor Simple String Y Previous String Find Previous / F5 Delimited String Y Text string Y Picture Strings – special characters Y – with regular expressions P'=' – any character Ctlr+F, Regular Expression,. Ctlr+F,  Regular Expression,. P'-' – any non-blank character Ctlr+F, Regular Expression, [^\s] Ctlr+F,  Regular Expression, [^\s] P'.' – any non-displayable character Ctlr+F, Regular Expression, [^\x20-\x7E] Ctlr+F,  Regular Expression, [^\x20-\x7E] P'#' – any numeric character Ctlr+F, Regular Expression, [0-9] Ctlr+F,  Regular Expression, [0-9] P'-' – any non-numeric character Ctlr+F, Regular Expression, [^0-9\x20] Ctlr+F,  Regular Expression, [^0-9\x20] P'@' – any alphabetic character Ctlr+F, Regular Expression, [A-Za-z] Ctlr+F,  Regular Expression, [A-Za-z] P'<' – any lower-case character Ctlr+F, Regular Expression, [a-z] Ctlr+F,  Regular Expression, [a-z] P'>' any upper-case alphabetic character Ctlr+F, Regular Expression, [A-Z] Ctlr+F,  Regular Expression, [A-Z] P'$' – any special character (not alphanumeric) Ctlr+F, Regular Expression, [^A-Za-z0-9] Ctlr+F,  Regular Expression, [^A-Za-z0-9] Note: for more Regular expression searches: http://en.wikipedia.org/wiki/Regular_expressionhttp://en.wikipedia.org/wiki/Regular_expression Ctrl+F ^ logical NOT \ special Expression \x Hexadecimal. Dot, any single character

377 377 RDz – ISPF Comparison Chart – Prefix Area Commands ISPF Editor LPEX Editor – ISPF Mode LPEX Editor – lpex Mode A, An – After A, An Context menu B, Bn – Before B, Bn Context menu COLS – show columns Columns always shown C, Cn, CC – Copy C, Cn, CC Context menu D, Dn, DD Context menu or Ctrl+Backspace F, Fn – First (used with eXclude) F, Fn (used with eXclude) N - Find excludes lines of code I, In – Insert lines I, In Press, or LPEX command: insert LPEX command: add L, Ln – Last (used with eXclude) N - Find excludes lines of code M, Mn, MM – Move M, Mn, MM-Move, and Context menu Context menu R, Rn, RR, RRn – Repeat lines R, Rn, RR, RRn, and Context menu, Ctrl+D Context menu – or Ctrl+D S, Sn – Show (used with eXclude) S, Sn – Show (used with eXclude) and Filter Filter TABS – used with TAB On Set with Preferences X, Xn, XX eXclude X, Xn, XX Filter O, On, OO – Overlay O, On, OO Use Rectangle Copy/Paste LC, UC – Lower-case/Upper-case LC, UC Use the Context menu TS, TSn – Text Split Ctrl+<Enter><Enter> <, <n, <<N Shift Data Left <, <n, <<n Use Rectangle Select – shift >, >n, >>n Shift Data right >, >n, >>n Use Rectangle Select – shift (, (n, ((, ((N – columns left – Used with COBOL (, (n, ((n Use Rectangle Select – shift ), )n, )), ))n – Columns Right ), )n, ))n Use Rectangle Select – shift

378 378 RDz – ISPF Comparison Chart – LPEX Editing Operations – 1 of 2 LPEX Editor ISPF Editor Refactor – Remove Noise Words: - IS, THEN, PROCEED TO N/A Multiple Line Comment/Uncomment N/A Virtual margins – in the editor N/A Code completion (Content Assist) N/A Open Copybook N/A Open Declaration – of variable or PERFORM'd paragraph from anywhere in the Procedure Division N/A Perform Hierarchy N/A Refactor – wizard for intelligent variable name changes N/A Outline View N/A Filter View – Show only Divisions, SQL,CICS,DL/I, Code (no comments), etc. N/A COBOL, PL/I and HLASM keyword / language help N/A Show lines that have been changed during edit (before save) N/A Find and Change against multiple file types N/A Block Marking (Ctrl+Down, Ctrl+Up, Ctrl+Home, Ctrl+End) N/A Virtual 'A' and 'B' Column lines in the source code N/A Allocate Like N/A Remote System Filters N/A Side-by-side Compare and/or Restore from Local History N/A Close all split screens in one operation (context menu) N/A See file attributes and statistics at all times (in a View) N/A

379 379 RDz – ISPF Comparison Chart – LPEX Editing Operations LPEX Editor ISPF Editor See file attributes and statistics at all times (in a View) N/A Wizard-driven approach to creating Web Services (WSDL files) from: CICS and IMS TM applications N/A Wizard-driven approach to creating, testing and deploying DB2 Stored Procedures N/A Copy files from one LPAR to another N/A Edit/Compile/Unit Test if the mainframe is offline N/A Syntax error – automatically select line with problem N/A See 46  76 lines of source at once N/A Templatized program development N/A Regular expression searches – including across Filtered files of different file types N/A Keystroke recorder (useful for repetitive tasks and online testing) N/A Bookmark and Tasks (both lines of source and filtered views) N/A Find "Last Changed" line of source code / Ctrl+J N/A Mark lines – including individual names N/A Find Marked Lines / Find named Marked Lines N/A Syntax errors as you type N/A Syntax check in the editor N/A

380 ® IBM Software Group Appendix E – Creating a Local Workstation Project for class Appendix E – Creating a Local Workstation Project for class (if you're not using the Custom Workspace)

381 381  Workshop – If you are not using the Custom Workspace start  From your desktop or the Windows start menu launch RDz OK  When you are prompted for a Workspace you can either customize/edit the Drive:\Directory name, or just click OK to accept the default  Close  Close the Welcome tab X By clicking the X as shown here: z/OS Projects  RDz will open to what is called the: z/OS Projects perspective  We'll explain these terms a bit later  From now on, the product will open directly here  Close  Close the Welcome to z/OS Projects tab   If you're using the Custom Workspace for this class, please skip ahead to the slide titled:

382 382  Workshop Setup – Create a Local Project File 1.From the File menu, select: New > Example… Example… From New Example… Workstation COBOL 2.Scroll down in the list and expand: Workstation COBOL COBOL Sample 1 3.Select: COBOL Sample 1 4.Click: Next > 5.Name the project: RDzClass  Be sure a Property Group is selected Finish 6.Click: Finish Note: If as part of the course setup, you already created an example project named  project1 - please follow steps 1  6 above to create RDzClass. You will then have two projects in your workspace, but will use RDzClass during the labs.

383 383  Workshop – Import the Sample Files – 1 of 3 From the z/OS Projects view: RDzClass 1. Select RDzClass 2. From the File menu: Import…  Select: Import… GeneralFile System  Expand General select File System Next >  Click: Next > 3. From File system: RDzClass  Into folder: RDzClass Browse…  From directory - click: Browse…

384 384  Workshop – Import the Sample Files – 2 of 3  From the Windows Browse panels RDzClass  Find and select the unzipped directory you created named: RDzClass RDzClass.zip  Note that you should have downloaded and unzipped RDzClass.zip onto your PC to create this directory. Talk with your instructor if you don't have this file OK  Click: OK  Check the box next to:  RDzClass Finish  Click: Finish  Your z/OS Projects view will update with the new file list 

385 385 Sample Files – Imported into a Local Workstation z/OS Project  Congratulationslocal  Congratulations – you have just imported a local project on your workstation, containing:  Folders  Files  The files are (mostly) programs of different software language origins. In this class we will work with:  COBOL  COBOL Copybooks  JCL  BMS (if you're a CICS developer)  MFS (if you’re an IMS developer)  SQL  But RDz supports all of the languages (and a few more) organized in the folders you've imported Connecting to a Mainframe  Note – We will learn about RDz's editor and how to navigate the Workbench with the files you've just imported. If you'd like to learn how to transfer these files up to your mainframe (or the IBM mainframe – if you have a TSO ID), please go to the slide at the end of this section with the header: Connecting to a Mainframe - Then return to this slide to continue with the workshops in this section

386 ® IBM Software Group Appendix F – Using the Custom Workspace if you're not on RDz 8.0.3

387 387  Enabling the Custom Workspace for RDz 8.0.1 – 1 of 2  If you are not using RDz 8.0.3 (or later) you can still use the Custom Workspace provided that you assign a Local Workstation project Property Group file – and set SYSLIB to the \copy\ directory  Steps:  From the Property Group Manager view  Right-click over Local  Select: New Property Group… COBOL  Click the COBOL tab SYSLIB:  Type the following in SYSLIB: c:\rdzwksp\RDzClass\copy Ctrl+S  Press Ctrl+S to save

388 388  Enabling the Custom Workspace for RDz 8.0.1 – 2 of 2  Right-click on RDzClass – in z/OS Projects – and select:  Property Group >  Associate Property Group  Check Property-Group-1 and click OK Test your work:  From the \cobol\ folder open: TRTMNT  Scroll down in the source and find a copybook reference  Double-click the copybook name (to select the entire copybook name)  Right-click and select: Open Copy Member

389 ® IBM Software Group Appendix G – Configuring Local Workspaces for DB2 and SYSLIB (copybook handling)

390 390 Enabling Your Project for Copybooks – for Local Workstation Projects SYSLIB Copybook and Include files are found by RDz using a SYSLIB property – a project attribute specified in a Property Group file. To set SYSLIB --- From the Window menu : Show View > z/OS Project Views > Property Group Manager  From the Property Group Manager View 1. Expand LOCAL Edit… 2. Right-click COBOL Sample Property Group, select: Edit… 3. COBOL tab SYSLIB: 3. Click the COBOL tab and In the SYSLIB: setting, enter the fully-qualified directory structure of where RDz can find your copybooks – AND/OR where to find your COBOL programs  The SYSLIB directory must be within your project  The SYSLIB setting is case-sensitive to directory and folder names  In this example:  d:  d: - drive  \D-Drive\Marlboro  \D-Drive\Marlboro – my workspace folder – yours will be different  RDzClass  RDzClass – my local workstation project folder in the workspace  copy  copy – a folder inside of the RDzClass project  cobol  cobol – a folder inside of the RDzClass project  Concatenate multiple SYSLIB entries separated by a semi-colon ;

391 391 Optional Topic Optional Topic – Enabling Property Groups for Local Syntax Check of CICS and DB2  You may want to enable RDz to perform Local Syntax checking of DB2/SQL or CICS applications  MIPS savings – achieved through offloaded development and Syntax Check  Improved development speed  Isolation of offloaded project resources  Considerations:  Primarily, that you will have to ensure source modifications are kept synchronized with your mainframe SCM – or with RTC server  Pre-requisites:  CICS requires you to install IBM's TX-Series on your workstation.  TX-Series is a CICS emulator that runs on Windows.  A free copy comes with RDz for the purposes of doing development  DB2 applications require you to either reference DB2 objects defined in a local UDB database – or -  You can use DB2 Connect – another IBM product to connect your UDB server with a mainframe DB2 database  A free copy of DB2 Connect comes with RDz for the purposes of doing Local Syntax checking against remote DB2 resources  You will have to modify your Local Property Groups in order to invoke the resources  On the next slide we discuss more on Local Property Groups, RDz and DB2  There's a workshop for RDz and Local Syntax of CICS

392 392 Optional Topic Optional Topic – Enabling Property Groups for Local Syntax Check of DB2 (Assuming you have DB2 Connect installed or are using a local UDB database) – To setup Local Property Groups file for DB2 Local Syntax Check  From the Property Group Manager view:  Edit the LOCAL Property Group file  Check:  Source contains SQL Statements  Either Browse… to a connection, or select New… and create a connection to either: –A UDB database –A connection to a DB2 –We will be describing how to create connections to DB2 in an upcoming module  Note that, with EXEC SQL statements enabled, RDz validate your DB2/SQL references in your source  SQL Options can be used to further customize your Local Syntax check  See screen capture for an example of how you could explicitly set the Schema name for any unqualified embedded SQL statements  In this example: PROD1DBA will be used to qualify SQL table/view names in your code

393 393 Workshop – Enabling a Local Project for Copybook Access  Workshop – Enabling a Local Project for Copybook Access 1. 1. Click (select) your new copy folder, and from the Properties view  Right-click over location Copy  Select Copy 2. 2. Enable your project for copybook access – by customizing SYSLIB in your Property Group file: - From the Property Group Manager view - Expand LOCAL - Right-click COBOL Sample Property Group - Click on the COBOL tab - Paste the copied location into SYSLIB - Delete everything to left of the valid filespec Ctrl+S - Save your changes (Ctrl+S) Close - Close the Property Group file Repeat steps 1 and 2 - to add the cobol directory so that you can open COBOL called modules  Notes 1. Do this workshop if you are using the RDzClass project as the source for your program code ${project_loc}\copy

394 394 OptionalWorkshop  Optional Workshop – Enabling Property Groups for Local Syntax Check of CICS (Assuming you have TX-Series installed) - Setup the Local Property Groups file for CICS Local Syntax Check  From the Property Group Manager view:  Edit the LOCAL Property Group file  Check:  Source contains EXEC CICS statements  Save your changes  Test your work:  From the Remote Error List view:  Right-click and select: Remove All Messages CPAT400  From RDzClass, open: CPAT400 Local Syntax Check  From within the editor, right-click and select: Local Syntax Check  Check the Remote Error List view   Make a CICS statement syntax error   Save Local Syntax Check  Save and Local Syntax Check  Check the Remote Error List view

395 395 In order for RDz to Syntax Check your program on the mainframe (Remote Syntax Check) and do other development techniques you need to give it compiler options and the SYSLIB value (for copybook resolution). You do this in RDz using what's called a Property Group file. Later in this course we will cover Property Group files in-depth. For now you will import a Property Group file for use with your Remote System resources…  From Property Group Manager  - Right-Click over your connection - Select: Import… From Import Property Groups - Click: Browse RDzDL - Select: RDzDL (a file you obtained from IBM) OK - Click OK  Workshop – Property Groups For Remote Systems – 1 of 2

396 396  Steps continued from Remote Systems Explorer: - Right-Click over MVS Files - Select: Property Group > Associate Property Group - Check:  RDzDL - Click: OK Notes:  This action assigns the Property Group to your connection  All settings in the Property Group will be used in your development activities (Open Copybook – among other techniques and functions)  In another course module we will discuss how to edit and customize a z/OS Property Group  Workshop – Property Groups For Remote Systems – 2 of 2

397 397  Press Alt+Z to overlay text with the copied block


Download ppt "® IBM Software Group © 2013 IBM Corporation Updated: April, 2013 Jon Sayles RDz Technical Enablement Introduction to Rational Developer."

Similar presentations


Ads by Google