|
1
|
- Jon Sayles, IBM Software Group, Rational EcoSystems Team
|
|
2
|
- © Copyright IBM Corporation 2007,2008.
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
|
- Thanks to the following individuals, for assisting with this course:
- David Bean/IBM
- Russ Courtney/IBM
|
|
4
|
- Course Name: COBOL Foundation
Training - with RDz
- Course Description: Learn the
COBOL language, RDz and learn z/OS terms, concepts and development
skills in this course.
- Pre-requisites: Some experience in a 3rd or 4th Generation Language is
expected. SQL is also
recommended.
- Course Length: 10 days
- Topics (Agenda)
- Getting Started - installing and configuring RDz - and the course materials, and using Eclipse to edit
COBOL
- COBOL General Language Rules
- Basic COBOL Statements
- Data records and table handling
- Debugging Programs - Note: Deep dive on using RDz for common COBOL
programming errors (001, 0C4, 0C7, infinite loops, fall-thru, etc.)
- Input/Output and Report Writing Patterns
- Sequential File Match/Merge Patterns
- COBOL Subprograms and the Linkage Section
- Structured Programming Concepts and Coding Patterns
- Advanced Character Manipulation, COBOL Intrinsic Functions, Date and
Time coding patterns, and Language Environment calls
- OS/390 Concepts and JCL
- Compile/Link & Run Procs on the mainframe
- Indexed file Coding Patterns
- Sort/Merge and Master File Update Coding Patterns
- Accessing DB2 Data and Stored Procedures
- COBOL in the Real World:
- CICS - lecture only
- IMS (DL/I and TM) - ditto
- Batch processing - ditto
- Java calling COBOL
- COBOL and XML Statements
- SOA and COBOL - creating and calling Web Services
- Web 2.0 using Rich UI
|
|
5
|
- Audience
- This course is designed for application developers who have learned or
programmed in a 3rd or 4th generation language –
and who need to 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.
- 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
|
|
|
7
|
|
|
8
|
- 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
|
|
9
|
- File Manager runs standalone on z/OS as an ISPF option under TSO
- But it also integrates into RDz through a series of eclipse views which
provide an interface for managing remote test files.
- There is no one-single File Manager view. Instead it's facilities are integrated
into a number of RDz functions
- 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 Data Sets
- Fixed length
- Variable length
- VSAM Data Sets:
|
|
10
|
- File Manager uses two z/OS File System Mappings:
- 1 .tdat file - used to identify
the file as containing program data (instead of program source)
- If the .tdat file is a PDS, then all members are marked with the
extension
- Default editor is the Formatted Data Editor
- 2 .tmpl file - used to identify
a PDS member as an IBM File Manager Template
- Templates are created using IBM File Manager and are based upon a
COBOL copybook or PL/1 include file
- What's up with this z/OS File Mapping System?
|
|
11
|
- RDz provides a property file for you to assign a mapping criterion
(name/type/transfer, etc.) to a z/OS file category:
- COBOL
- JCL
- COPY
- Assembler
- Load
- Etc.
- Using File Mapping you can:
- Customize the behavior of RDz to match your shop's
file
naming standards
- Define how RDz interacts with a given type of file
- We've used the File Mapping System's defaults for all
our file
types and datasets to-date (esp. for source files)
- But data files rarely adhere to a universal a naming standard.
So you will have to define custom file mappings for your data files in
order for RDz to understand how to treat them
|
|
12
|
- 0. Be sure your copybooks are available for use as edit masks
- 1. Create .tmpl (template) files for test dataset views
- 2. Set up z/OS File Mappings for "test data" datasets
- 3. Assign datasets to copybooks or template files
- 4. Edit files
- *** Note that we use the time "Basic" because there is a lot
of advanced File Manager dataset functionality beyond the scope of this
unit.
- Consult the File Manager documentation or RDz Help for assistance
learning.
|
|
13
|
- There are a number of editing modes that File Manager supports, but one
of the most useful – especially for large or complex datasets is editing
through a copybook or template (.tmpl) file
- The file is presented one-record-at-a-time, and the copybook/template
breaks the record's individual fields out on separate lines
- This makes is it easy to visualize the file structure and change data
values
- In order to enable editing through copybook masks you will need
copybooks:
- That match the file structure and size (including FILLER out to the end
of the LRECL) and that compile clean
|
|
14
|
- What is a .tmpl (template) file?
- A template file is a file-editing mask, built from the structure of a
copybook that allows you to:
- Browse and edit data through masks (previous screen)
- Create test data subsets of a file
- Handle variable length data files conditionally - with different 01
group definitions assigned to the different logical views of each
physical record
|
|
15
|
- How to create a template file:
- Select the copybook file from RSE you wish to turn into a template
- Right-click and select Template Editor
- Specify template properties
|
|
16
|
- The Build Criteria Expression dialog allows you to:
- Select a field within the record
- Select a comparison operator
- Specify a literal value
- Create complex AND/OR and parenthesized expressions – for carving out
specific record subsets within large files
- Your expressions become a conditional test each dataset record must pass
in order to be viewed through the named template
|
|
17
|
- Another alternative, is to combine the File Manager mainframe (ISPF)
panel functionality with RDz workstation facilities
|
|
18
|
- As mentioned previously, your test datasets will most likely require
custom z/OS File Mapping, in order for RDz to understand how to interact
with the file (i.e. how to download, how to edit etc.).
- It's easy to setup a new, custom Data Set Mapping:
- 1. From the z/OS File System Map view
- Right-Click
- Select Add Data Set Mapping
- 2. Specify the mapping characteristics è
- Mapping Criterion:
- Each asterisk (*) is a wildcard for a file name level – or suffix
- So **CUS* - means <anyHLQ>.<any2ndLevelQ>.CUS … any suffix
- Workstation file extension (as a file type label)
- The file transfer protocol:
- Text – for ASCII source files
- Binary – for test data datasets
|
|
19
|
- In this example, we have created a Mapping for all datasets
named:
- <anyHLQ>.
- <any2ndLevelQ>.
- FILES
- Ex. DDS0001.TEST.FILES
- And if the file is a PDS?
- The members inherit the mapping
- Note that after you successfully add a new z/OS File Mapping for dataset, the default
icon associated with file will change
|
|
20
|
|
|
21
|
|
|
22
|
|
|
23
|
|
|
24
|
|
|
25
|
|
|
26
|
|
|
27
|
|
|
28
|
- File Manager provides functionality to:
- Allocate a new dataset modeled after an existing DSN
- Copy a dataset and its’ contents to a new DSN
- In the current LPAR
- Through a different connection to a different LPAR
- Delete a dataset
- Rename a dataset
- Browse a dataset
- Open a dataset with various editors
- Defaults to the Formatted Data
Editor
- Assign different dataset templates through Properties
|
|
29
|
- 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
|