You are on page 1of 136

®

IBM Software Group

Application Development Foundation for z/OS


(ADFz)

File Manager – Browsing, Analyzing, Editing and Manipulating


VSAM/QSAM Files and DB2 Tables

DevOps © 2020 IBM Corporation

Updated April 2021 © 2019


IBM Trademarks and Copyrights
© Copyright IBM Corporation 2008 through 2021.

All rights reserved – including the right to use these materials for IDz instruction.

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
The IDz Workbench Curriculum
▪ Module 1 – IDz Terms, Concepts and Navigation
▪ Module 2 – Editing Your COBOL Programs
▪ Module 3 – Analyzing COBOL Programs
▪ Module 4 – Remote Systems – Connect, Navigate and Search
▪ Module 5 – Remote Systems – Dataset Access and Organization
▪ Module 6 – Remote Systems – ISPF 3.x, Batch Jobs and Batch Job Management
▪ Module 7 – MVS Subprojects – Organizing PDS Members and SCM Checkout
▪ Module 8 - The Data Tools – SQL Code/Test and DB2 Table Access
▪ Module 9 - Debugging z/OS COBOL Applications

Optional Modules
▪ IDz/Endevor Integration Through CARMA
▪ zUnit – z Open Unit Test
▪ Code Coverage – Measure the quality &coverage of your testing
▪ Code Review – Application quality feature
▪ Menu Manager – Integrate ISPF REXX Execs and CLISTs into IDz/Eclipse
▪ Git for ISPF Developers
▪ File Manager/Fault Analyzer
▪ z Open Development
3
Course Assumptions
1. You know ISPF and have used it for at least two years, doing
production work on z/OS with COBOL, PL/I or Assembler
Note that all of the workshops in this course are in COBOL – although
files exist that are Assembler and other languages for you to experiment
with – as time permits

2. You have:
No experience with Eclipse or IDz
Some experience with PC tools
▪ You have used MS-Windows applications for at least one year
IDz installed and running on your workstation at version 8.0 or later

▪ Note that all ISPF discussion/examples and screen captures


assume IBM-installed ISPF product defaults – not any 3rd party
or custom Dialog Manager applications you may have installed
on your mainframe

4
Course Contributing Authors
▪ Thanks to the following individuals, for assisting
with this course:
Jeremy Hamilton/IBM
Russ Courtney/IBM

5
Course Overview
▪ Audience
 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.

6
Course Topics
▪ Course Name: Rational Developer for System z (IDz) 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 IDz - and the course materials, and using Eclipse
▪ The IDz 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
7
UNIT
The IDz Workbench
Topics:
▪ Editing Files in Unformatted Mode
▪ Editing Files in Formatted Mode
▪ Using Templates
▪ Editing DB2 Tables and Views with File Manager
▪ Appendices

8
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.
9
What is File Manager?
A z/OS toolset for working with z/OS, DB2, IMS, CICS & MQ 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

Edit
Copy QSAM
Update
Delete VSAM
Compare DL/I
Print
etc. DB2
CICS
10
IDz/File Manager Integration
File Manager runs standalone on z/OS as an ISPF option under TSO
It also integrates into IDz through a series of eclipse views which provide an
interface for managing remote test files.
The File Manager facilities allow you to (from within IDz):
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 Note that the IDz/File Manager
v12 additionally supports
– KSDS
11 editing DB2 tables, views, etc.
Steps in Using File Manager – Basic Options
Assuming the File Manager plug-in has been added to
your IDz 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

12
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
13
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


14
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
15
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/Select Formatted Editor

From Editor Options


▪ Select Edit to edit the file
▪ Select View to browse the file

▪ The file opens 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
16
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: Page Up/Down amount is set in Window > Preferences


17
Editing Window (record cache) and Paging Preferences
Window >
Preferences >
File Manager >
Formatted Editor

Set Editor record cache


size –
and other editing
defaults

Note: Page Up/Down size == “Editor cache size(records)”

18
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/off

COMP-3 and COMP field values

19
Find/Replace
Search from an entry on the
Context menu
(Find/Replace)

Can only search within a


column range (unless using
a template or copybook)

Many standard/advanced
search options – similar to
ISPF search

To un-highlight
fields press
Reset

20
Find/Replace Dialog (Optional Column Limit)

Enter the string that


you are searching for Narrow the
search to
a range of
▪ Search and/or Replace bytes by
▪ Search range clicking
“Column”
Column level search-only, for
Unformatted Edit
▪ Navigations options
▪ Search/Replace string options
Case sensitive
Choose the search scope, string
Hex options, and match options
ISPF Picture strings
▪ Matching options
▪ Search scope

21
Exclude Records
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…
Records that
match the pattern Reset Find
are excluded
within the editor

22
Find/Replace Dialog (Non Modal Dialog)
Find/Replace is not modal - meaning that you can work drag the View off the to
the side of the Workbench and continue with other File Manager tasks in the
same file

23
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

24
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)

25
Delete Records
▪ 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
26
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

27
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
At anytime during the edit the dataset. And click Cancel to return to the editor.
session you can save the
dataset by right clicking
and selecting “Save
Records”.

You can also press


Ctrl+S to save records
28
Organize Lists of Datasets
Very similar to IDz "Filters" you can use File Manager Queries to
create subsets of DSNs - in order to limit navigation & 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

29
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 IDz 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

30
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

31
Action History – Recent Actions – View/Edit Resource
▪ 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

32
Effective Use of the GUI Environment
▪ All of the standard (Eclipse) 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 IDz Data Perspective or File


Manager's DB2 table editor, you could
open a concurrent edit/browse session on
33
DB2 tables alongside QSAM/VSAM files
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.

34
 Workshops
1. Follow the steps in this section to get connected and logged
into the File Manager Systems Information view
2. 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
35
 Workshops - continued
3. Add/delete/copy/paste a few records within a file, and save
your changes
▪ Modify a few of the values in the file
4. 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)
5. Add a Query that creates a subset of your DSNs
6. Filter the DSN list in the Systems
Information view
▪ Remove the filter (delete the qualifiers)

7. From Action History:


▪ Re-execute one or more actions
▪ Delete an action from the list
8. Select a QSAM file and from Properties note its DCB/stats.
▪ Repeat workshop 8 with a VSAM file
36
 Optional Workshops
1. 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

2. Combine Find/Replace with Excluded records


▪ Start by Excluding some records
▪ Find/Replace values in the Excluded (or not excluded) records

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

38
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

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

40
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:
▪ http://publib.boulder.ibm.com/infocenter/ieduasst/rtnv1r0/index.jsp

41
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

42
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


2. Use the “Lookup” button to identify the copybook or
template to be used.
3. Note that you can select a recent Copybook or
Template DSN from the Combo-Box

3. Double click a member to


return to the editor options
dialog. Where you press
4. Once you've specified a Copybook/Template Data Edit or View
set name you can open the combo-box to select it
43
Formatted Dataset Editing
Field names
Total number of
records in the dataset

▪ Many additional
editing features

▪ Behavior of
standard editing Applied template. Note that you can
select a different Template at any time.
functionality Current
(Cut/Copy/Paste) Or, if your editing in Unformatted mode
Record
you can specify a copybook here.
also enhanced Layout

Single Mode Editor


View. Provides
"Record-at-a-Time"
edit/browse

44
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…)

See Slide Notes


45
on Assembler Compile Options
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

46
Handling COPY/REPLACING – with Copybooks
▪ If your copybooks specify the REPLACING option, follow these steps:
From Preferences ➔ File Manager

47
Hover function – to View a Field's Declaration
Packed Decimal
5 Bytes in length
Starts @ byte: 23

Hovering over a field name will


display the field attributes

Find Edit Apply Copybook/Template


48
Locate a column
RT
Click

2. Select a field
name from the list

1. Select “Locate Column”


to find a field

49
Sort Records click

1. Click a field name to


open the sort dialog

2. Select Sort order


and available field

Note: Upon Save, the Sort action sorts the


entire file, not just the records in cache

3. Click OK and use


the sorted file records
50
Formatted editing table, and single record editing
The formatted editor
displays in the editor view

Select a record to display in the


single mode (a selected record is
Click completely highlighted)

Additional tabbed views ➔

Field descriptions ➔

A selected record populates


51
the Single Mode view
Move to the next record
 “Next Record/Previous Record buttons

 “Next Record”/Previous Record buttons

52
Changing the Single Mode Editor – to EBCDIC Dump view

Dump Mode is the dump format of


a record in hexadecimal value and
its EBCDIC translation.

If you happen to close the Single Mode Editor View –


you can reopen it from: Window > Show View > Other

53
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

54
Delete/Cut/Copy Record(s) step 1

right-click

ctrl +
click

ctrl + ctrl +
click click

Select the records that are to be


deleted. Select one record by
“clicking” or multiple by holding
down the Ctrl key and clicking

55
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 ➔

56
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)

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.
57
Find/Replace – in Formatted Edit Mode
Can search through records in a file using fields in a record
layout

58
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

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

Must continue to hold-down Ctrl or Shift key to select


and also hold down to Right-Click
60
File Manager Edit – from within IDz Remote Systems Explorer – 1 of 2
You can access File Manager edit directly from within IDz’s
Remote Systems Explorer

61
File Manager Edit – from within IDz Remote Systems Explorer – 2 of 2
From any JCL file, the Context Menu provides a “Navigate to Data Set” option
– which will select the Dataset in Remote Systems

And you can then


follow steps on
the previous
slide to open
the file using
File Manager

62
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

63
 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
64
 Optional Workshops
1. 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

2. Combine Find/Replace with Excluded records


▪ Start by Excluding some records
▪ Find/Replace values in the Excluded (or not excluded) records

65
 Optional Workshops - Continued
3. 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

66
 Optional Workshops – Redefines
To Select a specific
REDEFINE for a
field:

Select the option to


show redefines from
Preferences:
Windows >
Preferences >
File Manager >
Formatted Editor

67
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.

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

69
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

70
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
71
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:
1. Select the copybook and select: Template Editor
2. Select: Create Template Wizard
1.
From within a formatted edit session on a file:
3. Click the Edit button, next to the Template
specification 2.

3.

The Template creation tools you'll use are the same – regardless of which route
you take to get to them
72
The template editor - Layout

Record Layout selector


(use with files edited through multiple record layouts)

Record identification and


selection criteria

Field information – Record layout


fields and attributes, as well as
Template feature/function selection
area (Hold, Sequence, etc.)
73
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


Modify criteria
Duplicate criteria
Delete criteria
Move criteria

74
Build Record selection
criteria – 2 of 5

Click “Add new criteria” ➔

- Then click on the Field name, and specify:


• Operator
• Value
• (when you're creating multiple selection criteria)
Connector

See Slide Notes for


75 explanation of Operators
Multiple selection criteria – 3 of 5

An additional selection criteria has been added.

Close the template editor, or


save the template
You will need to "Save as…"

76
Save criteria – 4 of 5
Close the template editor, or
save the template

You will need to "Save as…"

You will need to "Save as…"

77
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

78
Modify the Template 1.
Steps:
1. Click Edit
2. Click Build Selection criteria
3. Click Modify the selected criteria – or add
additional criteria, or delete existing criteria 2.
4. Change: Connector, Operator, or Value.
Click OK – and return to the file editor
5. Click Apply

3.

4.

5.

79
Templates Results

80
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

click

Click in the
“Selected”
area to select
displayed
fields
81
Template editor – Select fields
Only selected fields, are
shown, and ordered as
indicated in the template

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 82
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
userid.ADLAB.FILES(CUST2)
– Use a master copybook that copies the other
Customer Record 1
copybooks
Product owned by Cust 1
Provide criteria to "Identify" records
Product owned by Cust 1
for each layout
Customer Record 2
▪ If every layout has a different length, then
identification is automatic based on record Product owned by Cust 2
length Product owned by Cust 2
▪ Otherwise, specify "record identification Product owned by Cust 2
criteria" in the template for each layout Customer Record 3


83 •
Viewing a copybook with multiple record layouts

This copybook has two 01 Note that you could also


levels, each of which will serve use File Manager to edit
copybooks
as a record type – or Layout

84
Open the dataset using the multiple layout copybook

DBL
Select the dataset to open, click
and enter the copybook
name that is to be applied

85
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

Click “Edit” to identify


the record types

click
86
Use the template editor to provide identification criteria
Steps
1. Select the record Indicates the record layout to be identified
layout and click
Build ID criteria

2. Specify the
Identification
criteria for the 1. Click to build Identification criteria
first record in the
copybook Note that you can also type
Identification criteria.
3. Save your This is out of scope for the
specifications and course, but documented in
return to the the File Manager User's
Layout tab Guide and Reference

4. Repeat steps
1➔3 for each
record layout to
be mapped on
top of the file in
the Template
87
2. Add identification criteria for the 1st record

Click to add the record


identification criteria

click

Specify the Record


selection criteria
88
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

Click to build the Identification criteria for


the next record type in the copybook

89
Use the template editor to provide identification criteria

click

Type in, or click


“Build Criteria” to
add identification
criteria
Select the Field name and
specify the selection criteria

90
Identification criteria are defined for this record type

Save the template and


apply to the dataset
The record identification
criteria has been added

91
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).

Change the displayed


record type using the Specify the template and
“Layout” drop down menu Apply it to the dataset

92
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

Click Rebuild and the record layouts will be


posted inside of the Layout drop-down box ➔
93
 Workshops with Templates – 1 of 2
Follow the steps in this section to get try out the 3 major file
editing techniques documented:
1. 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

94
 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
95
 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

96
Export Data to Excel - QSAM/VSAM/IMS/DB2/MQ
File Manager provides tools to export standard MVS files to
Excel
File Manager/DB2 provides a direct export to CSV format.
For IMS, MQ, Sequential or VSAM files follow these (high-level) steps:
1. Create a template or copybook with a comma between each field and let File Manager perform
the mapping based on field name from source copybook to target copybook.
2. Using the Export wizard supply a copybook on the second pane

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

98
Working with DB2 Tables
▪ You have seen that IDz 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 3.1.1 integration with IDz

▪ What IDz 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
99
Steps – to work with File Manager DB2
1. Add a Query – to filter the DB2 schemas and
objects, and to provide quick access to the
Table/View you wish to work with
2. Edit the table – through a File Manager generated
default template (which displays all rows and
columns – just like IDz's data tools)
3. Create a custom DB2 File Manager Template –
used to subset table/view data
4. Apply the template – and edit just the DB2 table
rows and columns needed

100
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) ➔

101
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

102
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

103
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

104
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

105
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

106
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 107
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

108
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

109
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

A description of the error is shown. Click


Click the REDIT option to edit the
related table

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

Click

111
Resolving DB2 Errors – 3 of 3

If you click Lookup instead of REDIT File Manager


DB2 will open the IDz Lookup view
Click

112
DB2 SQL Console
1. From the Context Menu select: DB2 SQL Console

2. If you haven’t connected to a subsystem you’ll be prompted

3. Type in your SQL statement (SPUFI


format). End it with a semi-colon and
press Enter
113
DB2 Command Console
1. From the Context Menu select: DB2 Command Console

2. If you haven’t connected to a subsystem you’ll be prompted

3. Type in your DB2 DBA Command and press Enter

114
Review – File Manager
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
115
UNIT
The IDz Workbench
Topics:
▪ Editing Files in Unformatted Mode
▪ Editing Files in Formatted Mode
▪ Using Templates
▪ Editing DB2 Tables and Views with File Manager
▪ Editing IMS Database Segments with File Manager
▪ Appendices – Additional Help on File Manager

Note that the values specified in the screen captures relate to a specific IBM LPAR

You will need to work with your Systems Programmer or DBA to determine values
for your DL/I Database access

116
IMS (DL/I) Database Access Steps – DEMOMVS**
▪ There are some set up steps outside of the product that you'll need to do so that you have an IMS DB to work demo. In your 'userid.ADLAB.INSTALL'
dataset you'll find an exec named IMSSETUP. run it from the TSO prompt to allocate your IMS datasets. Once it runs you'll have
'userid.ADLAB.USRSCN' and 'userid.ADLAB.USRSCNI'.

Now you need to customize IMSA on DemoMVS.

Note that this set of steps is


specific to IBMs DEMOMVS LPAR

117
Setup – 1 of 13

Note that you may be able to reuse existing File Manager Database Templates
118
3 – of 13

119
4 – of 13

120
5 – of 13

121
6 – of 13

122
7 – of 13

123
8 – of 13

124
9 – of 13

125
10 – of 13

Create a File Manager template and associate it


The PDS Member name must match the Database Name
with the Database segment

Note that all of the Segment layouts have been deconstructed from the DBD

126
11 – of 13

You may be prompted with the Database Data Set Names display. If you
are, fill in the names of the datasets for USRSCN and USRSCNI using the
example below. Substitute your userid for DNET047. Click OK to advance.

127
12 – of 13
▪ This will get you to the Database Positioning dialogue. In the CUSTADDR segment specify the Key Value shown. This will position you at
this specific key in that segment. Click OK to advance.

128
13 – of 13

129
UNIT
The IDz Workbench
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

130
Using View Load Module Utility
▪ You can use the View Load Module utility function to print a
list of the symbols (CSECTs, common sections, entry points,
and ZAPs) in a load module. You also could compare load
modules, using the Compare wizard.
▪ This page details the mapping of fields to batch parameters
and miscellaneous notes. For the full description of each
parameter, refer to the IBM File Manager Users Guide and
Reference.

131
Compare Load
Modules Utility

2.

3.
1.

From Remote Systems

132
Export to Desktop
1 of 2
From Remote Systems

1.

2.
• Map Copybook or Template
• Choose Output File
• And Format

133
Export to Desktop
2 of 2
• Raw Data …or…
• Insert a Chart ➔

3.

134
Reference Materials
▪ File Manager manuals are available on the web
http://www.ibm.com/software/awdtools/filemanager/library
▪ Recommended Redbook: "Introduction to the IBM Application Development
Tools on z/OS and OS/390"
 http://www.redbooks.ibm.com/
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

135
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

136

You might also like