Presentation is loading. Please wait.

Presentation is loading. Please wait.

RDz Workbench – Integration with File Manager v12.1

Similar presentations


Presentation on theme: "RDz Workbench – Integration with File Manager v12.1"— Presentation transcript:

1 RDz Workbench – Integration with File Manager v12.1
Jon Sayles, Rational System z Products - Updated August 16th, 2012

2 IBM Trademarks and Copyrights
© Copyright IBM Corporation 2007,2008, 2009, 2010, 2011, 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 Course Contributing Authors
Thanks to the following individuals, for assisting with this course: Jeremy Hamilton/IBM Russ Courtney/IBM Doug Stout/IBM

4 Course Overview Audience Prerequisites
This course is designed for application developers who have learned or programmed in COBOL, and who need to do z/OS Traditional Development and Maintenance as well as build leading-edge applications using COBOL and Rational Developer for System z. Prerequisites This course assumes that the student has a basic understanding and knowledge of software computing technologies, and general data processing terms, concepts and vocabulary, as well as a working knowledge of COBOL and z/OS. Knowledge of SQL (Structured Query Language) is assumed for database access is assumed as well. Basic PC and mouse-driven development skills, terms and concepts are also assumed.

5 Course Topics Course Name: Rational Developer for System z (RDz) Foundation Training 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 applications using z/OS is expected. A working knowledge of SQL is also recommended. Course Length: ~5days – or if done in self-paced mode at your own pace Topics (Agenda) Getting Started - installing and configuring RDz - and the course materials, and using Eclipse The RDz Workbench Code analysis tools Editing Compiling programs Debugging local COBOL programs 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 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

6 The RDz Workbench UNIT Topics: Editing Files in Unformatted Mode
Editing Files in Formatted Mode Using Templates Editing DB2 Tables and Views with File Manager Appendices

7 Topic Considerations After completing this unit, you should be able to: Describe the key features functions of IBM's File Manager Describe how to work with copybooks as templates for complex data structures Describe how to display/read/delete/update data from complex QSAM and VSAM files  Note: In this topic you will learn how to use IBM File Manager to work with z/OS files. The screen captures all describe connecting to a public z/OS machine that IBM makes available – during classes. If you are taking this course through standard IBM services delivery you should be able to use the properties (I/P address, port#s, etc.), logon IDs and passwords that your instructor provides you with. But you may also be taking this course standalone – and in that case, you will need to speak to your company's Systems Programming staff to learn how to connect and logon. It goes without saying that the actual file names in the screen captures of mainframe libraries and datasets will vary. So you should focus on the process and steps and "how to" – and don't be perplexed at differences in screen captures.

8 What is File Manager? QSAM VSAM DL/I DB2 CICS See Notes
A z/OS toolset for working with z/OS®, DB2®, IMS™, and CICS® data. Display, edit, update, create, copy, compare, print and erase your data files with this member of the IBM Problem Determination Tools suite. Includes the familiar browse, edit, copy and print utilities found in ISPF—enhanced to meet the needs of your application developers Manipulates data using COBOL and PL/I record layouts interactively or in batch Runs functions from your CICS environment Provides access to CICS resources with a familiar, user-friendly ISPF look-alike interface Provides customization of which fields to display, copy or print Integration with Rational Developer for System z enables developers to access files and databases without changing user interface QSAM VSAM DL/I DB2 CICS See: for File Manager product installation and documentation Edit Copy Update Delete Compare Print etc. See Notes

9 RDz/File Manager Integration
Connecting to a z/OS host from the workbench RDz/File Manager Integration File Manager runs standalone on z/OS as an ISPF option under TSO It also integrates into RDz through a series of eclipse views which provide an interface for managing remote test files. The File Manager facilities allow you to (from within RDz): Define and connect to remote z/OS files Assign datasets to templates for editing and record-level test data generation Allocate data sets Subset datasets through templates Create or delete members Display and edit the following dataset formats: PDS Members Sequential (QSAM) Data Sets Fixed length Variable length CICS online datasets WebSphere MQ datasets Unix files VSAM Data Sets: ESDS KSDS Note that the RDz/File Manager v12 additionally supports editing DB2 tables, views, etc. Module 4 - Development of Local COBOL Programs

10 Steps in Using File Manager – Basic Options
Connecting to a z/OS host from the workbench Steps in Using File Manager – Basic Options Assuming the File Manager plug-in has been added to your RDz client software Add a Connection to the File Manager Systems Information view Login to the connection Use File Manager – unformatted editing Open a file Navigate throughout the file Edit in Hex edit Search within the file (column search) Exclude certain records from view Use standard record-based Insert/Copy/Paste/Delete editing functions Organize file lists through Queries View file Properties Module 4 - Development of Local COBOL Programs

11 Open File Manager (System) view
From Window > Show View > Other… Type: Sys Select Systems Information and click: OK This will add the File Manager Systems Information view to your perspective

12 Add a new PD Tools Connection
Inside the Systems Information view Right-click and select Add System Fill in: Host name File manager host port Click Save and Connect  Note: Multiple host systems can be added

13 Login to the PD Tools Connection
Inside the Signon view: From  Create New Credentials: Fill in: Credential Name: User ID: Password or Passphrase: Click OK

14 Open a File (Unformatted Edit Mode)
Once you're connected you will see a list of datasets conforming to the TSO User ID that you're connecting through To open a file: Double-click or right-click and select Formatted Editor From Editor Options Select Edit to edit the file Select View to browse the file This opens the file in Unformatted Mode Note that we will cover Formatted (template/copybook) Editing and other File Manager options later in this course QSAM/VSAM files treated the same way by File Manager basic editing

15 Navigating Within a File
File Manager displays a subset of the dataset. The Current position is the selected record Total is the total number of records in the dataset. Use: Navigation box TOP BOT UP DOWN nn Type a # Toolbar icons Page Up Page Down Scroll bars Right/Left Up/Down Context Menu (not shown) Note that the Page Up/Down amount is set in Window > Preferences

16 Editing Window (record cache) and Paging Preferences
File Manager > Formatted Editor Set Editor record cache size – and other editing defaults

17 Hex On/Off (View or Edit in Hex)
Often you will need to view and edit binary (Hexadecimal EBCDIC) data values From the Context Menu toggle Hex editing on and off COMP-3 and COMP field values

18 To un-highlight fields press Reset
Find/Replace Search from an entry on the Context menu (Find/Replace) Can only search within a column range (without a template/copybook) Many standard/advanced search options – similar to ISPF search To un-highlight fields press Reset Found values highlighted 

19 Find/Replace Dialog (Optional Column Limit)
Enter the string that you are searching for Narrow the search to a range of bytes by clicking “Column” Search and/or Replace Search range Column level search-only, for Unformatted Edit Navigations options Search/Replace string options Case sensitive Hex ISPF Picture strings Matching options Search scope Choose the search scope, string options, and match options

20 To un-exclude records use
Similar to ISPF exclude (XXXX) but based on search patterns and options, you can exclude records from view, thus filtering your file and supporting advanced find/replace functionality To un-exclude records use Reset Excludes …followed by… Reset Find Records that match the pattern are excluded within the editor

21 Record Editing – in un-Formatted Edit
Standard GUI (and ISPF-style) editing options for data records: Insert (new records) Copy records Cut records Paste copied/cut records Delete records

22 Insert New Records (Unformatted Edit)
Insert 1  n new records Inline Inserts above your current cursor position At top-of-file All new records set to blanks (HEX '40') Inserts through copybooks (Formatted Edit) will honor data-typing of record layout)

23 Delete Records Notes: Ctrl+z does not un-do delete operation
Two modes of selection (for delete) Select record numbers Drag (mouse) down through unformatted records Formatted Edit has "discontiguous" record selection available Notes: Ctrl+z does not un-do delete operation Can elect to not-save, upon close file File/Record delete does not take effect until either you press Ctrl+S or you Close + Save

24 Cut/Copy/Paste Records
Used to "clone" and move records within a file Steps: Select records Using record numbers or drag down through file Right-click and select Copy or Cut Cut will delete records – immediately - but not permanently Record changes written to disk upon file save (and Ctrl+S) Position your cursor in the file where you wish to paste the records Right-click and select Paste Specify paste options Record numbers updated with *new* for pasted records

25 Close and save 1 click 2 1. Click the X next to the Dataset name on the tab to close your edit session 2. Click Yes to save the changes and close the dataset. Click No to discard the changes and close the dataset. And click Cancel to return to the editor. Clicking the “X” to close the editor will save any changes that have been made. Before saving File Manager will confirm that you would like to save your changes. Clicking Yes will close the editor and save the changes, clicking no will close the editor and discard the changes. At anytime during the edit session you can save the dataset by right clicking and selecting “Save Records”. You can also press Ctrl+S to save records

26 Organize Lists of Datasets
Very similar to "Filters" you can use File Manager Queries to create lists of DSNs in order to limit navigation and scrolling From anywhere in the File Manager Systems Information view: Right-Click and select Add Query Enter a DSN name pattern (Query) Uncheck  All Data Set Types  Check just the data set type you wish to organize Click OK Scroll down to find your Query list Work from the filtered list to access your files

27 Filtering File Names Within the View
If you don't need a persistent collapsible list (Queries) you can filter the DSN list Just type in your qualifiers and RDz will filter out any DSN showing through any of the options – that does not match what you've typed Similar to 3.4 Dynamic (just type) Applies to Queries

28 View File Properties Just like Remote Systems Explorer, when you select a data set from within the File Manager System Information view the Properties view will show data set statistics However, unlike Remote Systems Explorer, there are additional Properties for both VSAM and QSAM files

29 "Play it again, Sam" (Action History)
Every File Manager editing invocation gets stored in an Action History area of the view The complete editing activity, including options chosen, start keys used to open the file with, etc. Execute will access the file Modify opens the Editor Options Rename allows you to give the action a user-friendly name Remove is used to scrub the list, and delete unneeded entries This feature provides a useful shortcut to working with files – especially if you're doing repeated tasks

30 Effective Use of the GUI Environment
All of the standard (Windows) graphical editing hot-keys work in File Manger You can use this to copy/paste values between multiple concurrently open QSAM/VSAM files Using the RDz Data Perspective or File Manager DB2 table editor, you could also open in a concurrent edit/browse session on DB2 tables alongside QSAM/VSAM files

31 Workshops – File Manager Basics
These workshops will take between 20 and 45 minutes, depending on how many File Manager options you choose to experiment with You will need RACF/ACF-2/Top Secret access authorization against the files you work with If you don't "own" test files that are good candidates for editing with File Manager, start the workshop at step 3 – by adding a Query that provides you with a list of Datasets owned by others, your project team, division, etc.

32  Workshops Follow the steps in this section to get connected and logged into the File Manager Systems Information view From the list of files you own (files that have an <HLQ> with your TSO ID) open a QSAM (sequential) or VSAM file with File Manager – and: Navigate to the bottom of file, top of file, and to a specific record in the file using the Navigation input box, and toolbar icons Toggle Hex on and Off Find several values within the file, utilizing: Colum find Different Match options Reset the Find (turn off the selection color) Exclude records within the file Use a few different exclude patterns and exclude options Reset the Excluded records, then return to the Find function and Reset the Find text

33  Workshops - continued
Add/delete/copy/paste a few records within a file, and save your changes Modify a few of the values in the file Add a Query that creates a list of DSNs owned by someone else (or your project, group, department, etc.) Utilize some of the File type options (in the check boxes) Add a Query that creates a subset of your DSNs Filter the DSN list in the Systems Information view Remove the filter (delete the qualifiers) From Action History: Re-execute one or more actions Delete an action from the list Select a QSAM file and from Properties note its DCB/stats. Repeat workshop 8 with a VSAM file

34  Optional Workshops Open a file with the Start position type and Record limit functionality For QSAM use RECORD_NUMBER For VSAM files try both RECORD_NUMBER and Key as the Type for Start position Note that Start position is where you specify a key value that will be where File Manager positions your records in the window Between Start position file editing, Refresh your connection Combine Find/Replace with Excluded records Start by Excluding some records Find/Replace values in the Excluded (or not excluded) records

35  Optional Workshops - Continued
Open two or more files. Go Full-Screen (double-click one of the tabs). And try copying/pasting values by selecting, pressing: Ctrl+C – then Ctrl+V

36 Review – File Manager – Basic Options
Connecting to a z/OS host from the workbench Review – File Manager – Basic Options Having completed this section you should be able to: Add a Connection to the File Manager Systems Information view Login to the connection Use File Manager Open a file Navigate throughout the file Edit in Hex edit Search within the file (column search) Exclude certain records from view Use standard record-based Insert/Copy/Paste/Delete editing functions Organize file lists through Queries View file Properties Module 4 - Development of Local COBOL Programs

37 The RDz Workbench UNIT Topics: Editing Files in Unformatted Mode
Editing Files in Formatted Mode Using Templates Editing DB2 Tables and Views with File Manager Appendices

38 File Manager in Formatted Mode (Editing through Copybooks)
Connecting to a z/OS host from the workbench File Manager in Formatted Mode (Editing through Copybooks) 0. Be sure your copybooks are available for use 1. Assign datasets to copybooks when opening datasets 2. Edit files through record layouts *** Note that there is a lot of advanced File Manager dataset functionality beyond the scope of this unit. Consult the File Manager documentation, or obtain education from the PD tools group. You can also view some of the features through Viewlets in the IBM Education Assistant: The Formatted Data Editor provides similar functionality to that of the IBM® File Manager ISPF data set editor, however Developer for System z™ File Manager’s editor takes advantage of the GUI environment to provide a more user friendly experience. It provides the ability to display and edit PDS members, Sequential data sets, and VSAM data sets in a formatted view based on record layouts for the data derived from data structures stored within a COBOL copybook, PL/I include, or an IBM File Manager template. The editor offers the same three modes to view data in as IBM File Manager (single, character, and table), and given the same data set and template, will format the data in the same way as the IBM File Manager editor. However, there are some limitations on Developer for System z File Manager’s functionality that keep it from doing so in all cases. For more on this, see the Limitations section. For more information about IBM File Manager’s ISPF data set editor, see the IBM File Manager User’s Guide. Module 4 - Development of Local COBOL Programs

39 Use a copybook to format the display
A copybook will be used in these examples A COBOL or PL/I copybook, or an assembler DSECT can be used to format the editor display File Manager can use COBOL or PL/I copybooks or assembler DSECTs as record layouts. By using a copybook or a DSECT, records shown in the editor or viewer can be broken out into their individual fields.

40 Select a Copybook for your Dataset
 After double-clicking the Dataset name in the Systems View… 1. Type in a fully-qualified copybook name, or Use the “Lookup” button to identify the copybook or template to be used. Select the dataset that is to be opened and double click. 3. Double click a member to return to the editor options dialog. Where you press Edit or View 4. Once you've specified a Copybook/Template Data set name you can open the combo-box to select it

41 Formatted Dataset Editing
Field names Total number of records in the dataset Many additional editing features Behavior of standard editing functionality (Cut/Copy/Paste) also enhanced Applied template. Note that you can select a different Template at any time. Or, if your editing in Unformatted mode you can specify a copybook here. Current Record Layout Records are displayed, showing the fields defined by the copybook. Notice that the field names are shown, total number of records in the dataset, record type or layout, and the applied template. Single "Record-at-a-Time" edit view

42 Using an Assembler DSECT for Formatted Edit – 1 of 2
If you code in Assembler, you have the option of editing files through a DSECT Steps: 1. From Window > Preferences > File Manager > Compiler Options Select HLASM – as the Default compiler Set any other Compiler options Click OK 2. From the File Manager Systems Information view - Close Connections - Open the file using the Assembler DSECT (next slide…) IF you have bits fields in your assembler copybook, make sure you have NOALIGN option set in your Assembler compiler option. You can do this in the preference page (Compiler Options) shown on the slide See Slide Notes on Assembler Compile Options

43 Using an Assembler DSECT for Formatted Edit – 2 of 2
Similar Formatted Editing look & feel as when using COBOL copybooks However, COBOL will show implied decimal places in numeric data, and different view of binary data IF you have bits fields in your assembler copybook, make sure you have NOALIGN option set in your Assembler compiler option. You can do this in the preference page (Compiler Options) shown on the slide

44 Hover function – to View a Field's Declaration
Packed Decimal 5 Bytes in length byte: 23 Hovering over a field name will display the field attributes Placing the curser over a field name will display the field definition, this is called the hover funtion. Find Edit Apply Copybook/Template

45 Locate a column RT Click 2. Select a field name from the list
1. Select “Locate Column” to find a field Locate a field by using the context menu item “locate column”. Right click in the editor and select “locate column”

46 Sort Records 1. Click a field name to open the sort dialog
2. Select Sort order and available field Click on a field name to access the sort function dialog. 3. Click OK and use the sorted file records

47 Formatted editing table, and single record editing
The formatted editor displays in the editor view Click Select a record to display in the single mode (a selected record is completely highlighted) Additional tabbed views  Since a layout was given, records are displayed broken out into fields. The top potion of the view shows the file displayed in table format. The data is displayed in rows and columns, where rows are records, and columns are fields. Fields are shown from left to right across the top. If a record is selected, the bottom portion of the view in the properties view will show the selected record in single format. Field descriptions  A selected record populates the Single Mode view

48 Move to the next record  “Next Record/Previous Record buttons

49 Changing the single record view mode – to EBCDIC Dump view
Dump Mode is the dump format of a record in hexadecimal value and its EBCDIC translation.

50 Record Edit/Update – in a Formatted Edit Session
Working in Formatted mode provides a few different options and a completely different look & feel for : Same functionality Insert (new records) Enhanced functionality Copy/Copy/Paste records Delete records Update record values – best done through: Single record mode Switching Editor Mode

51 Delete/Cut/Copy Record(s) step 1
right-click ctrl + click Selected multiple records by clicking, and then holding the control key while clicking additional records. ctrl + click ctrl + click Select the records that are to be deleted. Select one record by “clicking” or multiple by holding down the Ctrl key and clicking

52 Cut/Copy Record(s) step 2
Right click at the location where you would like to paste the record(s) and select “Paste Records”  If you would like to repeat the records enter the number of times to repeat and click “OK” New records inserted below where you Right-clicked  The paste records dialog appears, if the record is to be repeated, indicate the number of times to repeat the record and click ok

53 Switching Editor Mode You can switch back to Unformatted Edit Mode using the Context menu And back to Formatted Edit Mode (using the Context Menu) Selected multiple records by clicking, and then holding the control key while clicking additional records. Note: It can be easier to make certain kinds of edit changes in unformatted mode. Especially where you are updating individual record values, splitting/joining records, etc.

54 Find/Replace – in Formatted Edit Mode
Can search through records in a file using fields in a record layout

55 Find/Replace Dialog (Field Selection)
Enter the string that you are searching for Additional search options for Field selection Choose the search scope, string options, and match options

56 Exclude Records – in Formatted Edit Mode
Similar to Find/Replace – in Formatted Edit mode you can exclude records based on field selection

57 Workshops These workshops will take between 20 and 45 minutes, depending on how many File Manager options you choose to experiment with Affect of Formatted Mode on File Manager Options: Some of the other functionality you used in the first section of the course is enhanced through using Formatted Edit Most of these enhancements are cosmetic, but you will see them during the workshops

58  Workshops From the list of files you own (files that have an <HLQ> with your TSO ID) open a QSAM (sequential) or VSAM file with File Manager – and: Select a copybook Use either a COBOL copybook or Assembler DSECT (copybook) Return to the slides in this section and do the file editing techniques shown: Hover over the column – to see the field's Datatype Locate a column in the file Sort the records – by some numeric data, descending Switch Editor mode – to Unformatted editing then back In Single Record edit mode: Modify a few values Change the view to Dump – then back to Single Mode Find – or Find/Replace based on Field selection Reset the Find Exclude records – based on Field selection Reset the excluded records

59  Optional Workshops Open a file with the Start position type and Record limit functionality For QSAM use RECORD_NUMBER For VSAM files try both RECORD_NUMBER and Key as the Type for Start position Note that Start position is where you specify a key value that will be where File Manager positions your records in the window Between Start position file editing, Refresh your connection Combine Find/Replace with Excluded records Start by Excluding some records Find/Replace values in the Excluded (or not excluded) records

60  Optional Workshops - Continued
Open two or more files. Go Full-Screen (double-click one of the tabs). And try copying/pasting values by selecting, pressing Ctrl+C – then Ctrl+V

61 Review – File Manager – Formatted Edit
Connecting to a z/OS host from the workbench Review – File Manager – Formatted Edit Having completed this section you should be able to: Edit through a COBOL copybook, or through an Assembler DSECT Locate fields within a file Show a field's declaration by hovering over the editor column name Find and Exclude records in a file based on field selection Select dis-contiguous records within a file for copy or delete Switch from Formatted to un-formatted editing mode. The Formatted Data Editor provides similar functionality to that of the IBM® File Manager ISPF data set editor, however Developer for System z™ File Manager’s editor takes advantage of the GUI environment to provide a more user friendly experience. It provides the ability to display and edit PDS members, Sequential data sets, and VSAM data sets in a formatted view based on record layouts for the data derived from data structures stored within a COBOL copybook, PL/I include, or an IBM File Manager template. The editor offers the same three modes to view data in as IBM File Manager (single, character, and table), and given the same data set and template, will format the data in the same way as the IBM File Manager editor. However, there are some limitations on Developer for System z File Manager’s functionality that keep it from doing so in all cases. For more on this, see the Limitations section. For more information about IBM File Manager’s ISPF data set editor, see the IBM File Manager User’s Guide. Module 4 - Development of Local COBOL Programs

62 The RDz Workbench UNIT Topics: Editing Files in Unformatted Mode
Editing Files in Formatted Mode Using Templates Editing DB2 Tables and Views with File Manager Appendices

63 What are File Manager Templates?
Compiled record layouts used to do advanced file editing: Subset file records by multiple and/or complex filtering criteria Edit a file that requires multiple record layouts Lock a column, and provide scrolling across the rest of the record Other advanced options: File Compare Copying files and creating test data subsets See the PD Tools documentation (URLs available at the end of this deck) for additional Template functionality

64 Setting up for Template Use (Preferences)
Before using a template, be sure to  check these Formatted Editor options from: Window > Preferences > File Manager > Formatted editor Click OK to save your preferences to your workspace

65 Creating a Template – from an Existing Copybook
There are three routes you can follow to create a File Manager Template out of a copybook Directly off of the Context Menu: Select the copybook and select: Template Editor Select: Create Template Wizard From within a formatted edit session on a file: Click the Edit button, next to the Template specification The Template creation tools you'll use are the same – regardless of which route you take to get to them 1. 2. A copybook can be specified to lay the records out into fields. If you specify a copybook, it will be compiled and a template will be created. To edit the resulting template click “Edit” in the dataset view near the template name. 3.

66 The template editor - Layout
Record Layout selector (use with files edited through multiple record layouts) Record identification and selection criteria And now the template dialog is displayed, this is where the layout information, record identification criteria, and field information for the template can be modified. Field information – Record layout fields and attributes, as well as Template feature/function selection area (Hold, Sequence, etc.)

67 Build Record selection criteria – 1 of 5
To add identification or selection criteria click on either “Build Criteria” or “Write Criteria”. This example shows “Build Criteria” Add new criteria To add record selection criteria click “build criteria” on the record selection field. Modify criteria Duplicate criteria Delete criteria Move criteria

68 Build Record selection criteria – 2 of 5
Click “Add new criteria”  Operators - used to create record selection and identification expressions: =, EQ True if the terms are equal (numerically or when padded) \=, ¬=, /=, NE - True if the terms are not equal (inverse of =) >, GT Greater than <, LT Less than ><, <> Greater than or less than (same as not equal) >=, GE - Greater than or equal to \<, ¬< Not less than <=, LE Less than or equal to \>, ¬> Not greater than == True if terms are strictly equal (identical) \==, ¬==, /== True if the terms are NOT strictly equal (inverse of ==) >> Strictly greater than << Strictly less than >>= Strictly greater than or equal to \<<, ¬<< Strictly NOT less than <<= Strictly less than or equal to ACO Contains all of the values specified. Matching case sensitive. The negative form is XCO. ACU Contains all of the values specified. Matching not case sensitive. The negative form is XCU. CO Contains one of the values specified. The negative form is ¬CO. CU Contains one of the values specified. Matching not case sensitive. NC Numeric contains - a number is one of the values. The negative form is ¬NC. NN (Same as ¬NU.) Field does not contain a valid numeric for the field type. The positive form is NU. NR Not in range - field < value1 or field > value2. The positive form is RG. NU Field contains a valid numeric for the field type: Field type Test for being valid numeric BI, FE, FP, PD, and ZD Checked against the field definition Other Recognized as numeric if the display value or character value the field contains is a valid number. The valid number can contain anything that is valid for a floating-point external or decimal number. For example: E+10 The negative form is ¬NU. RG Range - value1 >= field <= value2. The negative form is NR. XCO Does not contain all of the values. Matching case sensitive. The positive form is ACO. XCU Does not contain all of the values specified. Matching case sensitive. The positive form is ACU. ¬CO Does not contain one of the values specified. The positive form is CO. ¬CU Does not contain any of the values specified. Matching not case sensitive. The positive form is CU. ¬NC Does not contain the specified number(s). The positive form is NC. ¬NU (Same as NN.) Field does not contain a valid numeric for the field type. The positive form is NU. VER Verify this field is composed only of characters specified in the Value column. - Then click on the Field name, and specify: Operator Value (when you're creating multiple selection criteria) Connector See Slide Notes for explanation of Operators

69 Multiple selection criteria – 3 of 5
An additional selection criteria has been added. Now the Record Selection Criteria is added to the record selection criteria. In this example, next to the ACCT-BALANCE field, a greater than sign is entered in the operator column and 1000. Close the template editor, or save the template You will need to "Save as…"

70 Save criteria – 4 of 5 Close the template editor, or save the template
You will need to "Save as…" Now the Record Selection Criteria is added to the record selection criteria. In this example, next to the ACCT-BALANCE field, a greater than sign is entered in the operator column and 1000. You will need to "Save as…"

71 Lookup/Apply the criteria – 5 of 5
In the File Manager editor view: - Type in or use lookup to identify the new template - Or press Lookup, find the Template, and click OK Records that did not meet the selection criteria are now shown as shadowed lines Now the view session is displayed, and it is using the new template. Notice only the selected records, based on the selection criteria, are shown.

72 Modify the Template 1. Steps: 2. 3. 4. 5. Click Edit
Click Build Selection criteria Click Modify the selected criteria – or add additional criteria, or delete existing criteria Change: Connector, Operator, or Value Click OK – and return to the file editor Click Apply 2. 3. Now the view session is displayed, and it is using the new template. Notice only the selected records, based on the selection criteria, are shown. 4. 5.

73 Templates Results Add additional criteria to the template by clicking Edit

74 Template editor – Select, Hold and Sequence Fields
Click in the “Sequence” field, to add order to the field in the editor display Click in the “Hold” field to “hold” or lock or more fields while scrolling right and through the remaining fields in the file In the template editor, the field information section displays the fields contained in the copybook. By default, all elementary fields in the template will be displayed. That is, in Edit or View will list all of the fields. Clicking the Selected field produces an S indicating that field will be displayed. click Click in the “Selected” area to select displayed fields

75 Template editor – Select fields
Only selected fields, are shown, and ordered as indicated in the template In the template editor, the field information section displays the fields contained in the copybook. By default, all elementary fields in the template will be displayed. That is, in Edit or View will list all of the fields. Clicking the Selected field produces an S indicating that field will be displayed. Save and Apply the template to see the results Held field is separated from the rest of the data, and will remain static while scrolling right

76 Create a template to work with multiple record types
To automatically map multiple record types: Provide a layout for each record type: Use one copybook that contains multiple layouts, or Use multiple copybooks Use Advanced Copybook Selection, or Use a master copybook that copies the other copybooks Provide criteria to "Identify" records for each layout If every layout has a different length, then identification is automatic based on record length Otherwise, specify "record identification criteria" in the template for each layout userid.ADLAB.FILES(CUST2) Customer Record 1 Product owned by Cust 1 Product owned by Cust 1 Customer Record 2 In File Manager you can set up your template so that different record layouts are automatically mapped with the correct fields. There are two things you have to do. First, provide a layout for each record type, and there are a couple of ways you can do that. You can use one copybook that contains multiple layouts, or you can use multiple copybooks, and each copybook can have a different layout. Secondly, there has to be a way for File Manager to be able to identify which records should be mapped to each layout. If all of the various record layouts have different record lengths, and the layouts are coded correctly and match the lengths of the actual records, then you do not have to code identification criteria. All of the record mapping is automatic because File Manager can automatically map the right layout for the right record based on the length. However, if different record layouts have the same length, then you code identification criteria to specify which layout to use with which record. Coding identification criteria is similar to coding record selection criteria. Product owned by Cust 2 Product owned by Cust 2 Product owned by Cust 2 Customer Record 3

77 Viewing a copybook with multiple record layouts
The copybook is displayed, notice that this copybook has two 01 levels, each of those will be used as a data type. This copybook has two 01 levels, each of which will serve as a record type – or Layout Note that you could also use File Manager to edit copybooks

78 Open the dataset using the multiple layout copybook
DBL click Select the dataset to open, and enter the copybook name that is to be applied The copybook is displayed, notice that this copybook has two 01 levels, each of those will be used as a data type.

79 The different record types are not yet specified
Different types of records are not correctly mapped to the different layouts yet The different record types are not yet specified Without a way to identify records, all records are mapped to the first layout in the copybook, often resulting in (what looks like) invalid numerics and other data problems Opening the dataset, and applying the CUST2 copybook will apply formatting to the records. At this point File Manager does not know which records to apply to the different data types Click “Edit” to identify the record types click

80 Use the template editor to provide identification criteria
Steps Select the record layout and click Build ID criteria Specify the Identification criteria for the first record in the copybook Save your specifications and return to the Layout tab Repeat steps 13 for each record layout to be mapped on top of the file in the Template Indicates the record layout to be identified 1. Click to build Identification criteria Note that you can also type Identification criteria. This is out of scope for the course, but documented in the File Manager User's Guide and Reference File Manager compiled the copybook and created a new template from it. And now the editor is displayed. At this point, File Manager does not have any way to know the difference between customer records and product records. Just so you know, in this file, if there is a C in the RECORD-TYPE field, it is a customer record, and if there is a P in RECORD-TYPE, then it is a product record. But File Manager does not know that yet. It displayed the field headings based on the first layout that it came to in the copybook, so right now it is displaying all of the records with the CUSTOMER-RECORD layout. Which, of course, is incorrect. Next, the template will be edited and File Manager will be taught how to tell the difference between the customer and product records. Click on “Build criteria” to indicate the record identification criteria for the selected layout.

81 2. Add identification criteria for the 1st record
Click to add the record identification criteria click Selecting “record type, and indicating the value of C for this field will apply the record identification criteria, click ok Specify the Record selection criteria

82 Return and repeat the process for additional record layouts
3. Return to the Layout tab. 4. Change the record type by using the drop down layout menu and repeat the steps for the next record layout used in editing this file. click The criteria has been added. Click the layout drop down to select the second record type. Click to build the Identification criteria for the next record type in the copybook

83 Use the template editor to provide identification criteria
click Type in, or click “Build Criteria” to add identification criteria The second data type editor is shown. Click build criteria Select the Field name and specify the selection criteria

84 Identification criteria are defined for this record type
Save the template and apply to the dataset The record identification criteria has been added And you are back to the Field Selection/Edit panel. No other changes are needed for this record layout, save the template.

85 Different record types are formatted based on their layouts
By default, only one record type is displayed. All other records are "suppressed" (grouped and not displayed). Apply the template to the dataset, now the display looks different. Notice that one type of record, customer records, are being displayed. The other type of records, product records, are hidden as suppressed shadow lines. "Suppressed" simply means that the record type is not being displayed, because the records do not match the headings. Change the displayed record type using the “Layout” drop down menu Specify the template and Apply it to the dataset

86 What if the different record layouts exist in different copybooks?
Use the Copybooks (Library and Member information) tab to specify where the different copybooks are located Apply the template to the dataset, now the display looks different. Notice that one type of record, customer records, are being displayed. The other type of records, product records, are hidden as suppressed shadow lines. "Suppressed" simply means that the record type is not being displayed, because the records do not match the headings. Click Rebuild and the record layouts will be posted inside of the Layout drop-down box 

87  Workshops with Templates – 1 of 2
Follow the steps in this section to get try out the 3 major file editing techniques documented: Create a template from a copybook: First, modify your File Manager preferences so that the Templates will group and suppress records correctly Open one of your files in formatted edit mode (using a copybook) Edit the selected template (in this case, your copybook) Build one or more Selection criteria Save your Selection criteria and Apply the template to the file Note that you will have to save the template "as" – to either a different member or dataset Note the effect of the template on the file editing Return to Edit your template – and utilize one or more different Operators Save/Apply your Template work – and note the effect on the file display

88  Workshops with Templates – 2 of 2
For the remaining techniques you can create new templates, or simply reuse the same template: 2. Select, Hold and re-sequence the fields within a file Using the Layout tab, specify Hold for a field within your file (an identifier or key field, name, etc. is often a good choice) Save the template Apply the saved template to your file, and note the new editing UI Repeat these steps for: Selection Select only a subset of the fields within the file Sequence Alter the sequence of fields within the file After each technique save and apply your template

89  Optional Workshop with Templates
If you have a file that should be edited using multiple record layouts – return to the steps in this section and: Create a template from a copybook: Open the files in formatted edit mode (using the copybook that contains multiple layouts) Note that, there will be display problems with any records that require additional layouts to render correctly in the editor Note also that if the multiple layouts exist in different copybooks use the Copybooks tab (as shown in the slides) Edit the selected template (in this case, your copybook) Build multiple Identification criteria – one for every Record Layout you will need to correctly superimpose on the different record types within the file Save/Apply your Template work – and note the effect on the file Switch Layouts within the editor – and note the effect on the file record display

90 The RDz Workbench UNIT Topics: Editing Files in Unformatted Mode
Editing Files in Formatted Mode Using Templates Editing DB2 Tables and Views with File Manager Appendices

91 Working with DB2 Tables You have seen that RDz has its own set of DB2 tools for: Working with relational data: Tables/Views/Synonyms Stored Procedures Packages and other objects Understanding your data model: Individual DB2 object definitions – returned from the system catalog tables Ability to view Entities and Relationships (Overview Diagram) Code and test SQL Interactively Graphical SQL development tools Visual Explain – enabled by OPTIM Data Studio integration with RDz What RDz does not have is the capability to subset DB2 table data. This is necessary when you're editing row/column values in large test tables Along with other features, File Manager DB2 provides row/column subsetting

92 Steps – to work with File Manager DB2
Add a Query – to filter the DB2 schemas and objects, and to provide quick access to the Table/View you wish to work with Edit the table – through a File Manager generated default template (which displays all rows and columns – just like RDz's data tools) Create a custom DB2 File Manager Template – used to subset table/view data Apply the template – and edit just the DB2 table rows and columns needed

93 1. Add a Query Expand the DB2 icon
Right-click over the Subsystem Identifier (SSID) for the DB2 system you wish to access Select + Add Query Enter: Owner (Schema) Name – typically with Wildcards % or * Zero or any number of characters C% EMP* _ Exactly one character at this position CU__01* … note that without a wildcard pattern your query will return all tables and views Click OK Expand the Query (filter) 

94 2. Edit the Table – 1 of 2  Double-click the table and open it.
(For the moment) Remove any Template Data set name entry If you wish to start at a physical row in the database > 1 enter a number in the Start position If you want to physically limit the number of rows

95 2. Edit the Table – 2 of 2 Same editing interface as File Manager for VSAM/QSAM Navigation – page up/down through table rows Editing individual fields Because of the System Catalog there is no Unformatted Edit. You'll always see the column names and datatypes Copy/Cut/Insert/Delete Records (rows) Find/Replace – much easier SQL statements for set level update/delete operations Locate Column Sort Records Exclude Records

96 3. Create a File Manager DB2 template
Right click on the table that will be used to create the template and select “Template Editor” RT click Click Specify a PDS member name and click Edit

97 File Manager DB2 template editor – 1 of 2
 Row Subsetting via WHERE clause Column Subsetting Click S to select a column The table column definitions are copied in from the table definition. Add selection criteria as needed

98 File Manager DB2 template editor – 2 of 2
To add Row Subsetting, 1. Click: Build Selection criteria  3. And specify row selection criteria 2. Click the Add new criteria button

99 4. Edit the table through the Template
After saving your template criteria… Double-click the table-name, this brings up the DB2 Editor Options The Data set name will be filled in from the previous edit session Click Edit Row/Column Subsetting

100 4. Edit the table through the Template – Save changes
Make your table changes: Modify existing row values Add new rows Delete rows Save your changes by: Using the Context menu  Pressing the Save icon Pressing Ctrl+S

101 Error messages – upon Save
File Manager DB2 will prevent you from making many common errors Datatype errors Column max sizes …but not all… The error message indicates that any changes that passed validation were committed, however one error is pending

102 Resolving DB2 Errors – 1 of 3
A red “X” indicates the location of the errors. Right click the error and select View SQL Error RT click Click Click A description of the error is shown. Click the REDIT option to edit the related table

103 Resolving DB2 Errors – 2 of 3
The related table populates the Editor Options panel. Click

104 Resolving DB2 Errors – 3 of 3
If you click Lookup instead of REDIT File Manager DB2 will open the RDz Lookup view Click

105 Review – File Manager Connecting to a z/OS host from the workbench
Having completed this module you should be able to: Add a Connection to the File Manager Systems Information view Login to the connection Use File Manager: Open a file in formatted or unformatted mode Navigate throughout the file Edit in Hex edit Search within the file (column search) Exclude certain records from view Use standard record-based Insert/Copy/Paste/Delete editing functions Organize file lists through Queries View file Properties Specify copybooks for formatted editing Sort files (through copybook fields) Select (filter) records through copybook fields Edit DB2 tables Create and utilize templates to: Create sophisticated selection and filtering criteria Edit files that require multiple record layouts Subset large DB2 test tables Resolve SQL errors The Formatted Data Editor provides similar functionality to that of the IBM® File Manager ISPF data set editor, however Developer for System z™ File Manager’s editor takes advantage of the GUI environment to provide a more user friendly experience. It provides the ability to display and edit PDS members, Sequential data sets, and VSAM data sets in a formatted view based on record layouts for the data derived from data structures stored within a COBOL copybook, PL/I include, or an IBM File Manager template. The editor offers the same three modes to view data in as IBM File Manager (single, character, and table), and given the same data set and template, will format the data in the same way as the IBM File Manager editor. However, there are some limitations on Developer for System z File Manager’s functionality that keep it from doing so in all cases. For more on this, see the Limitations section. For more information about IBM File Manager’s ISPF data set editor, see the IBM File Manager User’s Guide. Module 4 - Development of Local COBOL Programs

106 The RDz Workbench UNIT Topics: Editing Files in Unformatted Mode
Editing Files in Formatted Mode Using Templates Editing DB2 Tables and Views with File Manager Appendices – Additional Help on File Manager

107 Reference Materials File Manager manuals are available on the web Recommended Redbook: "Introduction to the IBM Application Development Tools on z/OS and OS/390" and search for “PD Tools” Describes the IBM Application Development Tools for z/OS and OS/390 and includes scenarios that show how to use the tools to recognize, locate, and fix errors in application programs using: IBM Fault Analyzer IBM File Manager IBM Debug Tool IBM Application Performance Analyzer IBM Workload Simulator No script for this slide

108 Where can I learn more about File Manager?
From the IBM Education Assistant: From this site you can learn about a number of specific RDz features and capabilities through recordings See next slide

109 Example of an IBM Education Assistant Viewlet
Self-paced, remote learning modules - annotated screen captures. You can view at any speed, rewind, etc.

110 Connecting to a z/OS host from the workbench
Summary Having completed this unit, you should now be able to: Describe how to locate files on the host Describe how to work with copybooks and templates Describe how to allocate VSAM files modeled after other VSAM file structures Describe how to display/read/delete/update data from: QSAM fixed length files QSAM variable length files VSAM files KSDS ESDS Module 4 - Development of Local COBOL Programs


Download ppt "RDz Workbench – Integration with File Manager v12.1"

Similar presentations


Ads by Google