IBM Software Group Introduction to Rational Developer for
® IBM Software Group Introduction to Rational Developer for System z – Version 8. 5 for ISPF Developers Original Editor: Jon Sayles RDz Technical Enablement jsayles@us. ibm. com Updated for C++ by Brian Lee leeby@us. ibm. com © 2013 IBM Corporation Updated: August, 2013
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. 2
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 Mc. Millin, 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 3
Workshop Session Schedule for Visa Day 1 (all day) Remote C/C++ development with RDz (Morning) Local C/C++ development with RDz and Min. GW: (Afternoon) Day 2 (Morning) RDz Tips and Tricks Q & A This is an hands-on session Your own development environment is required Workstation with RDz V 8. 5 and connection to z/OS Laptop with RDz V 8. 5 and connection to z/OS Some optional features may be required C and C++ development feature Min. GW Please raise your hand or shout, if you have a difficulty in following Questions are welcome during the session anytime 4
Table of Contents The RDz Workbench – Terms and Concepts Connecting to a mainframe Create a new z/OS (Enterprise) project Set up a property group for C/C++ development Allocate PDSs and create members RDz editors JCL generation Compile, Link and Run Hovering feature Open declaration/definition HOD Code Assist Bookmarks/Tasks Local history Compare/Replace with Remote search 5
Using this Power. Point There are two types of slides in this Power. Point: 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 Power. Point contain additional explanations and/or program code that you can use in workshops. To view a Power. Point 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 6
Course Assumptions 1. You know ISPF and have used it for at least two years, doing production work on z/OS with C/C++ Note that all of the workshops in this course are in C/C++ – 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. 5 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 7
UNIT RDz for ISPF Developers Topics: The RDz Workbench – Terms and Concepts Connecting to a mainframe Create a new z/OS (Enterprise) project Set up a property group for C/C++ development Allocate PDSs and create members RDz editors JCL generation Compile, Link and Run Hovering feature Open declaration/definition HOD Code Assist Bookmarks/Tasks Local history Compare/Replace with Remote search 8
What is Rational Developer for System z (RDz)? 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 RDz interacts with z/OS resources through a host-installed listener … and interacts through JDBC drivers to data sources MVS Resources RDz Listener Started Task RDz Client Software JDBC Security/Authorization RACF/ACF-2/Top Secret • • z/OS Datasets JES TSO CICS Region IMS Region SCM CLISTs/REXX Data Resources • DB 2 Data Objects • IMS Databases RDz also interacts with data sources (DB 2 tables/views, IMS database segments) through efficient JDBC access 9 See Slide notes on SSL/Encryption and Linux client support
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/J 2 EE and C++ development z/OS application modernization 10
RDz Functional Taxonomy – a Partial List z/OS Development, Maintenance and Production Application Support Enterprise Modernization Access Datasets/Source Files CICS Web Services • SCM functional integration • PDS Support • Migrate/Recall Support • Local and Remote file support • Tooling support in single or across multiple LPARs • • • Windows (Standard) Navigation ISPF PF-keys + extensible Hot-keys Outline View Hover Open Declaration / Arrow keys Open copybooks ISPF and RDz Source Editing • • • • Submit and Locate Job • Integration with JES • Job Organization options (Filters) • Show JCL • Cancel/Purge 11 • • Control Flow Analysis Data Flow Analysis Where used/Where Referenced Source Development Submitting/Managing Jobs • • Windows Screen Real Estate Program Logic tools PF-Keys Hexedit Prefix Area Commands Command Line Commands Colorized statement support Local History PC Source editing functionality Code refactoring Wizard-driven DB 2 Stored Procedure generation Comment/Un-comment multiple lines Access to 3270 Emulation within Eclipse All development options “preference-enabled” SCM: • Windows metaphor • Edit/Browse/View • “Favorites” – “Most recently used” Program Analysis Source Navigation IBM: Team Concert, SCLM, Clear. Case CA: Endevor, Panvalet, Librarian, Serena: Changeman ISPW • Source and PDS Search • QSAM Data File Search • Browse Load Module • Search Load Library • Use of Regular Expressions Languages • • • COBOL, PL/I, Assembler, Java, C/C++ JCL/CLIST/REXX SQL BMS/MFS WSDL, HTML, XML 4 GLs supported with Eclipse Tooling Editing Data Sources • • • QSAM File Editor DB 2 Table Editor IMS Segment Editor VSAM File Editing with File Manager Integration with File-Aid Plug-ins Test and Debug • • Integration with PD Tools/Debug Tool Integration with Xpeditor and CA-Intertest Content Assist Syntax Check and Build • • • Size-able views Multi-window development Source Filters Collapse/Expand paragraphs/sections Real-time validation Local and Remote Syntax Checking Integration with z/OS Build Process • • • COBOL, PL/I, Assembler SQL: Embedded, Interactive CICS statements Dataset Management • Allocate/ Rename/Delete • Create GDG Model • Create VSAM Dataset • Search • Compress Generate: • WSDL • WSBIND file • XSD files • Deployment manifest • Stub modules • Test and Deploy WSDL • Use Cases: • Bottom Up • Top Down • Meet in the middle Copy Files • Within an LPAR • Across LPARs • LPAR PC Code Quality • Code Review • Source Format • File Compare • Automated Unit Test IMS Soap IMS Web 2. 0 Generate • XML/WSDL • COBOL/PLI converters • Manifest files Use Cases: • Bottom Up • Top down (PL/I only) • Meet in the middle CICS Service Flows • 3270 "screen scraping" • Aggregate transactions • Automate processes • Expose as web services Functional Integration with z/OS REXX/CLIST/3 rd Party Tools: • • • Menu Manager HATS Eclipse Plug-in Integration 11 RDz Product Integration
Crossing the Chasm – From ISPF to RDz The ISPF development paradigm consists of: Typing Familiarity with ISPF: Panels Commands 12
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: - DB 2 table values - IMS Database values - VSAM files - QSAM files 13
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 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/W 2 e 35 a 50023 ef_4 b 39_a 867_04 fb 9 e 1 d 3329/page/Distance%20 Learning%20 Resources/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 14
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 Datasets stored on your PC Meta-data ("data about data") – examples: – Your development preferences and settings – Your z/OS connection information Workstation Hard-drive C: rdzwksp 85 Custom Workspace 15 ISPF Option 0
The RDz "Workbench" – a Graphical IDE Based on Eclipse Menus and toolbars RDz Workbench Scrollbars for navigation Tabs (lots of tabs) 16
ISPF Menus 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: - Primary Option Menu - Panel Menus In ISPF you use menus to navigate from option to option, and from panel to panel 17
RDz Menus And in RDz you use menus (you can also use a Toolbar) Standard Menu Toolbar A Toolbar is simply a shortcut to certain menu functions 18
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 19
RDz Views and Perspectives The RDz IDE is organized as a collection of tabbed and COBOL Editor View resize-able windows called “Views” Views display z/OS Projects View information or provide access to: - z/OS datasets - Local projects - Source editors - Syntax errors - Dataset editors - Analysis tools - Debug monitors - DB 2 tables - SQL statement results Outline Views Remote Systems View All of the Views that you see, and that relate to a common task are called a "Perspective" A Perspective is a collection of Views related to/organized around common tasks – such as z/OS development, Debugging, DB 2/SQL/Stored Procedure development and testing, etc. 20
The Benefits of a RDz's IDE Instead of maneuvering to access panels and working sequentially, in RDz the functionality you need is always in-focus – you work concurrently Edit a program Access Datasets + Dataset Management File Compare Submit a Compile File Search Dataset Statistics Access Jobs (Outlist facility) 21
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 – RDz Enterprise – Enterprise Development Perspective Debugging – Debug Perspective DB 2 and SQL work – Data 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 22
Workshop – Launch RDz and Select the Custom Workspace – RDz Enterprise – v 8. 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 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. 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 throughout the course - in all workshops and in the Powerpoint slide materials 23 Projects
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 Right-mouse button Select some thing - Click – to set focus to or to select a field - Select a file in the Editor Opens a “context menu” menu - From a program in the Editor Area - Open a Declaration or Copybook - Syntax Check - Rename/factor - Copy/Paste/Move/Delete code 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 Scrolling wheel – used primarily for: - Opening Split-Screen views in the editor - Dragging and dropping files - CICS/BMS and IMS/MFS screen painting Used to scroll up/down inside source files - Fast and convenient 24
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 C/C++ 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 25
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 Local Files And Datasets 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. 26 Where does my source live?
Workshop – Launch RDz and Select the Custom Workspace 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: rdzwksp 85 or C: rdzwksp 8. 0. 3 (depending on which release you are using) RDz v 8. 5 users RDz v 8. 0. 3 users 27
Workshop – Launch RDz and Select the Custom Workspace RDz opens in Welcome screen 28
Workshop – Launch RDz and Select the Custom Workspace RDz opens in Enterprise Development (z/OS Projects) Perspective 29
UNIT 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 (z. Server. OS) 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 30
Using the Remote Systems explorer to Connect to a Mainframe 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 Work with PDS datasets Edit source - remotely Submit jobs Submit TSO/REXX and CLIST commands Create custom filters for: on datasets Access to Mainframe Resources 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. 31
How do I Use Remote Systems Explorer to Access and Edit Source? What you will do: 1. 2. 3. 4. Define a connection to a z/OS LPAR (Logical Partition) Allocate datasets using RDz Copy files from your PC to the mainframe 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 (DB 2 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 32
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 33
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 This can be case-sensitive Connection name: An optional descriptive name that will show up in the Description: Mouse-over (hover) help for this connection z/OS host machine Verify host name Will ping the host name to verify: Connectivity Availability of the z/OS machine Click Next > 34 Remote Systems View
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 > 35
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… 36
Workshop – Connecting to Your Mainframe (4 of 4) 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 Select Connect 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 37 See Slide Notes
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 four Partitioned Data Sets Create C/C++ and JCL files based on Lab files provided 38
RDz as a "GUI File Transfer" Tool Local Files And Datasets Transfer Source Files 39
Hands-On material If you don’t have an access to the hands-on material, please ask instructor to get it 40
Workshop – Create a new z/OS project Click “File” menu and select “Project…” sub menu under “New” menu Select “z/OS Project” under “z/OS” category Click Next> 41
Workshop – Create a new z/OS project Enter a project name z. OSCpp. Lab is used Make sure “Create an MVS subproject” has been chosen Click Finish 42
Workshop – Create a new z/OS project Create a new MVS subproject Make sure your connection name is the one that you created previously Enter a subproject name Cpp. Lottery is used Leave the “Runtime environment” to “Any” Make sure “Select and add resources to the subproject” has been checked Make sure “Create a property group and associate it with the subproject Or you can use an existing property group Enter a name for a property group Cpp. Prop. Grp Leave “Application language” to “Any” Click Finish 43
Workshop – Create a new z/OS project Add Resources to Subproject You have a chance to add resources from your data sets and/or retrieved data sets The dialog showed up since we chose “Select and add resource…” option from the previous dialog box Please do not check any of the data set since we are going to create new data sets Click OK 44
Workshop – Create a new z/OS project The RDz screen should look like this. You will see z. OSCpp. Lab project and Cpp. Lottery MVS subproject under “Enterprise Projects” view You will also see Cpp. Prop. Grp property group in the middle Let’s update the property group to meet C/C++ development 45
Workshop – z/OS Project Property Group for C/C++ Development Click “Categories” tab Under the Language Uncheck “Assembler Settings” Uncheck “COBOL Settings” Uncheck “PLI Settings” Under the Screen maps Uncheck “BMS Settings” Uncheck “MFS Settings” We are doing this since we are developing an C/C++ application without using IBM’s map facility As soon as you uncheck those options, you will see the corresponding tab is going away 46
Workshop – z/OS Project Property Group for C/C++ Development JCL tab You may want to update the job card If you are planning to use PROCs, you may need to provide PROC data set names If you are planning to use RDz’s JCL generation capability, you may want to provide a data set to store the generated JCLs 47
Workshop – z/OS Project Property Group for C/C++ Development C/C++ tab This will give an option to provide additional information to the PROCs We will be coming back to this soon Click “Save” (floppy disk icon) or “Ctrl+S” to save the change 48
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 PDS in your TSO ID, allocate seven new libraries (one library at a time): - <HLQ>. CPPLAB. CPP and <HLQ>. CPPLAB. JCL - <HLQ>. CPPLAB. H and <HLQ>. CPPLAB. HPP - <HLQ>. CPPLAB. OBJ and <HLQ>. CPPLAB. LOAD - <HLQ>. CPPLAB. SYSEVENT Note: If the dataset you are doing an Allocate Like… has been archived: CPPLAB. CPP Note: <HLQ> = your TSO ID • Restore it on the mainframe • Disconnect from RDz • Reconnect and try again 49
Workshop – Allocate PDS/PDSE data set for C++ Lab Data Sets needed for Lab Name Category Type Record format Record Length <HLQ>. CPPLAB. CPP Source C/C++ FB 80 <HLQ>. CPPLAB. HPP Source C/C++ FB 80 <HLQ>. CPPLAB. OBJ Others OBJECT FB 80 <HLQ>. CPPLAB. JCL Source JCL FB 80 <HLQ>. CPPLAB. LOAD Others LOADMOD U <HLQ>. CPPLAB. SYSEVENT Others SYSEVENT VB 50 Block Size 3200 4096 4095
Workshop – Allocate PDS/PDSE data set for C++ Lab Right click on “Cpp. Lottery” MVS subproject Select “Allocate Partitioned Data Set…” under “New” context menu Enter data set name Make sure the dialog box has correct “Connection name and HLQ Enter “CPPLAB. CPP” Click Next> 51
Workshop – Allocate PDS/PDSE data set for C++ Lab Specify characteristics For CPPLAB. CPP SOURCE for Category C/C++ for Type Click Next> Data Set Characteristics For CPPLAB. CPP FB for Record format 80 for Record length Click Next> It is also possible to choose other options in the “Data Set Allocation” dialog box We will be using “Copy characteristics from an existing data set other source related data sets 52
Workshop – Allocate PDS/PDSE data set for C++ Lab Right click on the Cpp. Lottery MVS subproject and select “Allocate Partitioned Data Set. . ” Enter “CPPLAB. H” Click Next> Choose “Copy characteristics…” Click “Browse…” button Select “<HLQ>. CPPLAB. CPP” from “Destination Container Selection” dialog box Click OK 53
Workshop – Allocate PDS/PDSE data set for C++ Lab <HLQ>. CPPLAB. CPP data set name should show up under “Copy characteristics from…” Click Next> Review data set characteristics Click Finish Repeat the same procedure to allocate <HLQ>. CPPLAB. HPP There should be 3 data sets that you just allocated under Cpp. Lottery MVS subproject These 3 new data set should also be showing up under My Data Sets in the Remote Systems view 54
Workshop – Create a data set member for C++ Lab Create a data set member for C++ lab You should have lab material that contains source code, header and JCL in a separate folders in you workstation After the creation of a new member, copy the content of corresponding lab file and paste it to the new member You should keep the same structure as lab folder structure Right click on <HLQ>. CPPLAB. CPP and select “Create Member…” under “New” context Menu 55
Workshop – Create a data set member for C++ Lab Enter “LOTTERY” for the member name Click Finish You will see LOTTERY. cpp member created under <HLQ>. CPPLAB. CPP File name extension “. cpp” will be added in the view but the actual member name won’t have the extension It is done by RDz mapping feature Double click “LOTTERY. cpp” (in RDz) that we just created It will open up an editor with empty content Open up LOTTERY. cpp of the lab material with a Notepad Press Ctrl+A to select all the content Press Ctrl+C to copy the selected content 56
Workshop – Create a data set member for C++ Lab Paste it to the LOTTERY. cpp in RDz Now you should have C++ code in the new LOTTERY. cpp member Notice that there is * in front of file name This indicates that the file has been modified Please save the LOTTERY. cpp 57
Workshop – Create a data set member for C++ Lab Repeat same procedure to add remaining source codes, headers into the corresponding places Don’t forget to save it You can also user “Save All” menu or icon to save all of the updated members 58
Navigating Files in z/OS (Enterprise) Project Open and Close Double click a file to open Click “x” in the tab to close Scroll up/down Use scroll bar on the right Maximize/Restore Double click the tab Resize Use mouse to move the vertical or horizontal line Move the views or editors Click a tab and move around 59
The RDz "Workbench" – Project Organization You will work with a variety of C/C++ resources: programs, header files, compile listings, executable, 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 Local Workstation Project RDz resources are organized into - Project(s) - Folders – and sub-folders - Files Folders Files 60
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 An easy fix is to restore your workbench is to access the Window menu and either: Reset your perspective to the RDz installation defaults …or… Open (Show) 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: 1. Left-click the Window menu 2. Click: – Reset Perspective… – At the prompt, click OK Note that from the Window menu you can also open other perspectives and open specific workbench views (the Show View option) 61
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: 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 62
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 PF 2 (Split-Screen) and Browse/Edit a second file Using RDz it's simple to work with independent program edit views … (next slide for details) 63
Workshop – Working With More Than One Program at a Time (How To) From the mainframe, or within z/OS Projects/within: RDz. Class and the cobol directory: 1. 2. Double-click MAIN. cpp – to load it into the editor Double-click LOTTERY. cpp – to load it into the editor 3. Double-click the LOTTERY. cpp tab – to maximize the editing view With both programs open in maximized view: 4. Left-click and hold the left mouse button down over the Print. App. 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 64
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 Note – by "Normal frame view we mean including the other RDz Workbench views 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 Create a split-screen view Restore the view to a single edit screen 65
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 66
Workshop – Create a data set member for C++ Lab Allocate remaining 4 data sets (JCL, LOAD, OBJ and SYSEVENT) based on the table (on page 50) Create 3 JCL members and copy and paste from the lab materials Job card and data set HLQ require updates!! 67
RDz Editors RDz ships with many editors For C/C++ development the following editors might be useful to know C/C++ editor For local C/C++ development Remote C/C++ editor For Remote C/C++ development on MVS subproject Suitable for a new programmer, who is familiar with eclipse Ctrl+Space for content assist System z LPEX editor RDz extended the base LPEX editor for traditional z/OS development, such as COBOL, PL/I, HLASM, JCL and etc… Suitable for a seasoned mainframe programmer Support a subset of ISPF editor Selectable By “Open with” menu By using “File Association” preferences Please remember the icons for each editor!! 68
Choosing a RDz Editor Open With File Associations 69
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 LPEX Editor 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 a number of RDz editing features that make certain ISPF edit functionality irrelevant (i. e. COLS is not needed) 70
Workshop – Editing a File with System z LPEX editor Overtype <HLQ> with your data set high level qualifier The normal editing feature of System z LPEX editor in RDz is not different than other editors Notice that JCL files have been opened with System z LPEX editor and C++ source codes have been opened with Remote C/C++ editor You can tell it by the icon For COMP. jcl, overtyping might be easier Update the job card too!! 71
Workshop – Editing a File with System z LPEX editor Click BIND. jcl tab Update job card Put the cursor at the bottom of the edit view Enter “/<HLQ> and press enter key It will high light the first occurrence of “<HLQ>” in the file 72
Workshop – Editing a File with System z LPEX editor Click “Edit” menu and select “Find/Replace…” menu You will see “Find” and “Replace” input fields showing up at the bottom of the editor view Enter Your HLQ in the “Replace” field Enter your HLQ!!! Click Replace All You will see <HLQ> is replaced with your HLQ and “ 5 replacements” at the bottom 73
Workshop – Editing a File with System z LPEX editor Repeat the same process to replace <HLQ> in GO. jcl to your HLQ Update the job card!! Enter your HLQ!!! Save the change by pressing “Save All” icon 74
Workshop – Final Touch on Property Group for C++ development Switch to Cpp. Prop. Grp Click “>>” icon right at the end of editor tabs In our case, it would at the right of the GO. jcl tab Click C/C++ tab at the bottom of the Cpp. Prop. Grp Open up ELAXFCPP procedure name and choose CPP step Scroll down a little bit to see the C/C++ compile options 75
Workshop – Final Touch on Property Group for C++ development Please update C/C++ compiler option Don’t forget to save the change!! This information will be used for various RDz features JCL generation Open Declaration /Definition 76
Workshop – JCL Generation RDz have a feature to generate JCL for C/C++ development Right click on LOTTERY member under <HLQ>. CPPLAB. CPP and select “For Compile” menu under “Generate JCL” context menu Enter Job name, JCL data set name to save and Member name Click OK Click Open You can see and examine the generated JCL for compilation 77
Workshop – Compile C/C++ sources in RDz (Not using the generated) Switch to COMP. jcl Right click on “>>” at the end of the editor views Select “COMP. jcl” Right click anywhere on COMP. jcl and select “Submit” context menu Click “Locate Job” button of the Job Submission Confirmation dialog box 78
Workshop – Compile C/C++ source code in RDz Cursor should be located to a job output under “JES” in the “Remote Systems” view Double click the job output You should see RC 00 If not, please correct the error and resubmit the job Close the job spool by clicking red X of the tab 79
Workshop – Compile C/C++ source code in RDz Go back to COMP. jcl Replace all of the MEGALOTT to LOTTERY Use the same technic that we just learned Then submit the job by right click and selecting “Submit” context menu Make sure you get RC 00 If not, please correct error Please repeat the compile job to LOTTERYF MAIN 80
Workshop – Purge Job Spool in RDz You should be able to see all four objects under <HLQ>. CPPLAB. OBJ under “Enterprise Projects” view LOTTERY. obj LOTTERYF. obj MAIN. obj MEGALOTT. obj Select (multiple selection either using Shift+mouse or Ctrl+mouse) all the job outputs under “JES” under “Remote Systems” view Right click on anywhere in the multiply selected job outputs and select “Purge” context menu 81
Workshop – Purge Job Spool in RDz You will see change in icon (with light bulb on the bottom right) Right click on “Retrieved Jobs” and select “Refresh” context menu You should now see nothing under “Retrieved Jobs” 82
Workshop – Bind Objects in RDz Switch to BIND. jcl Right click on BIND. jcl and select “Submit” context menu Make sure that you get RC 00 If not, please correct error Now you should be able to see LOTTERY. exe under “<HLQ>. CPPLAB. LOAD data set 83
Workshop – Execute LOTTERY in RDz Switch to GO. jcl Submit the job Open up the job output Make sure you get RC 00 Scroll down to the bottom where you can see the lottery ticket number 84
Workshop – Clean up Please purge all the job outpus Please close all the files for editing Click “>>” at the end of the tabs and select “Close All” context menu It will ask whether to save or not for files being modified Click OK to save the changes 85
Workshop – Hovering feature Open up MAIN. cpp Bring up Preferences by clicking Window menu and selecting Preferences sub menu Click “C/C++” on the left column Check “Follow unindexed header files when producing the outline view” This is not checked by default 86
Workshop – Hovering feature Click “Hover” under System z under Editor under C/C++ Make sure “Display source hover” is checked This should be checked by default Click “Hover” under Editor under C/C++ Make sure “Source” is checked Notice that key modifier is “Shift” (for Local C/C++ editor) 87
Workshop – Hovering feature Click “Annotations” under “Editors” under “General” Uncheck “Veritcal ruler” and Overview ruler” under “C/C++ Occurrances” This checked by default Click Apply Click OK 88
Workshop – Hovering feature Hover the cursor over Lottery. Factory You will see source of Lottery. Factory class Hover the cursor over factory You will see definition of factory variable 89
Workshop – Open Declaration/Open Definition Double click “Lottory. Factory” Right click and select “Open Declaration” context menu It will open up LOTTERYF. h and highlight Lottery. Factory class 90
Workshop – Line numbers in C/C++ editor Open up Preferences Check “Show line numbers” under Text Editors under General You will see line numbers in the editor 91
Workshop – HOD If you really miss 3270 green screen, RDz comes with HOD You can right click on the host connection under Remote Systems view and select Host Connection Emulator A 3270 screen view will show up It’s a plain 3270 green screen However, you might want to touch 3270 key mappings 92
Workshop – HOD (3270 Keys) Bring up Preferences (Window -> Prefereces) Click Keys under General Check the key mapping and modify it to meet your need FYI, PA keys and reset key are not mapped 93
Workshop – Outline View Outline view for faster navigation Switch to LOTTERYF. cpp In Outline view, click a method, such as Lottery. Factory: : get. Instance() In the C/C++ editor, it will take you to the method definition 94
Workshop – Code Assist Switch to MAIN. cpp Insert a line after the second cout and type “factory->” Press Ctrl+Space You will see factory: * shows up as a local code assist Press Ctrl+Space You will see more suggestion for a remote code assist Click “get. Lottery(enum State) Lottery * You will see the code is filled with your choice Please save the change by pressing 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: Double-click, or Right click over the left-hand border, next to the line you want the Bookmark on (From inside an edit session) - 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 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 97
Workshop – Bookmarks and Tasks Switch to MEGALOTT. cpp Click Windows menu and select Bookmarks under “Show View” Highlight line 15 Right click on the highlighted area and select “Add Bookmark…” Enter “Remote. Mega. Lottery initializer” in the Bookmark name field Click OK In the Bookmarks view, Remote. Mega. Lottery initializer entry is added Similarly, you can use Tasks view to maintain the TODO lists If you click the entry in Bookmarks, it will take you the place where we just bookmarked 98
Workshop – Compare Multiple select 2 files under z. OSCpp. Lab project LOTTERY. cpp and LOTTERYF. cpp Right click on the one of the selected files and select “Each Other” under “Compare With” context menu If it shows up “Compare” dialog box Click Yes RDz will show “C Compare Viewer” It is easy to tell the differences Close “C Compare Viewer” 99
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 100
Workshop – Replace Click MAIN. cpp under z. OSCpp. Lab project Right click on the MAIN. cpp and select “Local History…” under “Replace With” context menu In the Replace from Local History dialog Check how many revisions today Click one Check the differences between current version and previous version Click Replace You will see MAIN. cpp has been revert back to the original version 101
Local History 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… 102
Local History Preferences You can specify how long RDz maintains Local History files From Window > Preferences Expand General Expand Workspace Select Local History Click OK to save 103
Workshop – Local history Switch to MAIN. cpp Right click on any place in MAIN. cpp editing area and select “Show Local History” under “Team” context menu Click History tab Double click the entry right below an entry with bold letters It will bring up the revision Notice the differences in icon and the content Close previous MAIN. cpp 104
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 Forward 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 (F 3) 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 105
Workshop – Navigation RDz remembers your position in a source file during an edit session You can use RDz navigation feature to move back and forth 106
Workshop – Remote Search Hightlight “Lottery. Factory” right under main() in MAIN. cpp Click “Search” menu and select “Remote…” Click Remote z/OS Search Enter “*” in the With name field Verify rest of the information to see if it meets your search criteria There is also a radio box for “Data set member”, “Sequential data set” or “Partitioned data set” Click Search 107
Workshop – Remote Search Check the Remote view to see the search result You can double click any entry to go to the location of the search string in the file 108
Workshop – RDz CDT Software Analyzer (Code Review) Right click on the any source code and select “Software Analyzer Configurations…” under Software Analyzer Click “New launch configuration” icon Enter “My. Cpp. Code. Review” in the Name field 109
Workshop – RDz CDT Software Analyzer (Code Review) Click Rules tab Check C/C++ Code Review Click Analyze Review Software Analyzer Results Create a report button to save the code review result into either HTML or PDF 110
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 111
RDz Interfacing with Debug Tool TCP/IP Debug Tool Engine Your Application Load Module z/OS Data Source The RDz remote debugger Client software that is installed with RDz on your workstation Communicates with the Debug Tool engine on the mainframe Note that Debug Tool must be installed on z/OS in order for you to do the labs in this unit 112
Workshop – Disconnect Right click on the host connection entry and select “Disconnect” context menu You will see z/OS (Enterprise) project closing down 113
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) 114
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" 115
The Product Help – Tips & Techniques From: Help > Welcome – access recorded scripts for learning specific technical topics 116
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 https: //www. ibm. com/developerworks/mydeveloperworks/groups/service/html/communityview? community. Uuid=22 eac 60 d-8 bab-44 e 2 -a 5 b 8 -a 4 fe 1 c 1 aecad Topics include: New release updates Tips & Techniques Meeting themes: SOA Business Rules Integration points Advanced analysis Etc Q&A with IBM 117
Internet-based Learning – The IBM Education Assistant RDz Version-specific Links Complementing the RDz Distance Learning, you might want to check out the IBM Education Assistant: http: //publib. boulder. ibm. com/infocenter/ieduasst/rtnv 1 r 0/index. jsp From this site you will find annotated learning modules on specific product features 118
- Slides: 118