Вы находитесь на странице: 1из 43

Mainframe Hands On Exercises 4 IBMers

(Part One: Breaking the Ice)

No Experience Needed!

© Copyright IBM Corporation, 2007


This document is intended for IBM internal use only.
Mainframe Hands On Exercises 4 IBMers- Part One June, 2007

This page intentionally left blank

© Copyright IBM Corporation, 2007 Page 1 of 43


Mainframe Hands On Exercises 4 IBMers- Part One June, 2007

TABLE OF CONTENTS

INTRODUCTION .................................................................................................................3

(1.) GETTING A DEMOMVS


DEMOMVS ID...........................................................................................4
ID

(2.) CONFIGURE
CONFIGURE TERMINAL EMULATOR SOFTWARE.......................................................5
SOFTWARE

2.1 CONFIGURE AN EMULATOR SESSION TO CONNECT TO THE DEMO SYSTEM VIA WINDOWS ....5
2.2 CUSTOMIZE THE TERMINAL EMULATOR SESSION ...............................................................8
2.3 CONFIGURE AN EMULATOR SESSION TO CONNECT TO THE DEMO SYSTEM VIA LINUX .........10

(3) LOGON TO THE DEMO


DEMO SYSTEM
SYSTEM USING YOUR ID....................................................13
ID

(4.) CUSTOMIZE YOUR DEMOMVS ENVIRONMENT .....................................................16

(5.) USE ISPF FACILITIES


FACILITIES TO LOCATE THE DATA
DATA SETS CREATED FOR YOUR
YOUR ID ...........22

(6.) ALLOCATE A PARTITIONED


PARTITIONED DATA SET EXTENDED
EXTENDED (PDSE) USING ISPF
ISPF PANELS ....26

(7.) POPULATE YOUR NEW


NEW PDSE WITH A MEMBER
MEMBER ......................................................28

(8.) ENTER THREE LINES


LINES OF TEXT INTO YOUR NEW DATA SET MEMBER ....................29

(9.) USE THE ISPF EDITOR


EDITOR TO MANIPULATE THE
THE TEXT..................................................31
TEXT

(10.) RUN AN EXECUTABLE


EXECUTABLE AGAINST YOUR NEW DATA SET MEMBER .......................36

© Copyright IBM Corporation, 2007 Page 2 of 43


Mainframe Hands On Exercises 4 IBMers- Part One June, 2007

INTRODUCTION

The Mainframe Hands On Exercises for IBMers is just what it says! It is a three-part series of
hands on practice exercises designed to get you started on navigating the z/OS environment and
also designed to test your new skills:

 Part 1- Breaking the Ice


 Part 2- Practical Experience
 Part 3- Real World Challenge

With the current generation of mainframe programmers reaching retirement age, there is a
huge demand for mainframe skills. The purpose of these exercises is to stimulate interest in the
mainframe platform and to develop the next generation of mainframe programmers.

You don’t need to have any mainframe experience to perform the exercises so come with us on
this journey as we break the ice!

Mainframe Hands On Exercises: Breaking the Ice (Part 1)

Approximate time to completion: 2 – 3 days (if you are new to the mainframe plan to spend
more time to understand the material)

The objective of this part of the exercise is to get you acquainted with the mainframe interface
as well as with some basic user commands. The instructions below will lead you through
exactly what you need to do to successfully complete Part 1 of the exercise. Good luck!
:

© Copyright IBM Corporation, 2007 Page 3 of 43


Mainframe Hands On Exercises 4 IBMers- Part One June, 2007

(1.) Getting a DEMOMVS ID

Before starting this practice exercise, you will need to request a DEMOMVS user ID before you
can access the Demo system. Go to the link below to request a User ID on the System z Demo
System (DEMOMVS):

__1. Go to the DEMOMVS demo system page at


http://w3.demopkg.ibm.com/LPage/DNDEMOMVSACCESS . Click the How to request
request a
user ID button near the top of the page.

__2. On the DEMOcentral Registration & Log In page, if you have not registered before, click
the New Customer button.

__3. On the Create Customer Record page, enter the requested information and click the
Validate button.

Your BluePage information will be used to create your initial customer record in the
DEMOcentral database.

__4. Once you have registered with DEMOcentral, return to the DEMOMVS demo system page
at http://w3.demopkg.ibm.com/LPage/DNDEMOMVSACCESS. Click the How to request a
user ID button near the top of the page. Log in with your IBM Internet e-mail address and
IBM Intranet password.

© Copyright IBM Corporation, 2007 Page 4 of 43


Mainframe Hands On Exercises 4 IBMers- Part One June, 2007

__5. Request a User ID for System z Demo System (DEMOMVS


DEMOMVS).
DEMOMVS
After you submit your request, you will get a confirmation email that your request has been
received. Within 24 hours, the help desk should email your user ID, password, and access
instructions.
Since you are going to spend some time doing these exercises within the DEMOMVS system,
you will need to get a second DEMOMVS user ID. This will come in handy if for some reason
you get locked out of the DEMOMVS system and you need access to get back in. This will be
discussed in more detail in Section 4.

__6. To get the second ID, go to the DEMOMVS demo system page at
http://w3.demopkg.ibm.com/LPage/DNDEMOMVSACCESS .

__7. Click the ‘How


How to request a user ID’
ID’ button near the top of the page.' On the DEMOcentral
Registration & Log In page, since you are already registered, enter your intranet email
address and password to login. Click the ‘View User IDs’ button located on the top right
hand corner of the page. Click the ‘Request User ID’ menu button. Then click the ‘Request’
button under your first DEMOMVS user ID to submit your request.

As was the case with the first user ID, you will get a confirmation email that your request has
been received. Within 24 hours, the Help Desk should email your user ID, password and access
instructions.

(2.) Configure Terminal Emulator Software

A terminal emulator program is a PC application that provides an interface to a mainframe


system that is similar to a 3270 terminal. This section will show you how to configure the IBM
Personal Communications (PCOMM) terminal emulator for windows or configure an emulator
session to connect to the DEMOMVS system via Linux.

If you are using Windows go to section 2.1 and


and 2.2 to configure your emulator session. For
Linux, skip to section 2.3.

2.1 Configure an Emulator Session to Connect to the DEMO system via Windows
PCOMM should already be installed on your system if you have the IBM Client for e-business
image. If you do not have PCOMM, you can install it from the IBM Standard Software Installer

© Copyright IBM Corporation, 2007 Page 5 of 43


Mainframe Hands On Exercises 4 IBMers- Part One June, 2007

(http://w3-1.ibm.com/download/standardsoftware/).
__1. Start IBM Personal Communications by clicking:
Start  All Programs  IBM Personal Communications  Start or Configure Sessions.
Sessions.

__2. In the Session Manager window, click the New Session button.

__3. In the Customize Communication window, click Link Parameters.


Parameters

__4. Enter the Primary Host Name: demomvs.demopkg.ibm.com.


demomvs.demopkg.ibm.com Leave the Port Number default
of 23. Click OK.
OK

__5. You can customize the Terminal Emulator Session screen size to display more lines of text
on the screen. The default is 24 lines, but it may be helpful to increase this to 32 lines.
Click the Session Parameters button.

© Copyright IBM Corporation, 2007 Page 6 of 43


Mainframe Hands On Exercises 4 IBMers- Part One June, 2007

__6. In the Session Parameters window, select Screen Size: 32x80.


32x80 Click OK.
OK Click OK again.

__7. The PCOMM session should connect to DEMOMVS and look like the screen below:

© Copyright IBM Corporation, 2007 Page 7 of 43


Mainframe Hands On Exercises 4 IBMers- Part One June, 2007

__8. If the Terminal Emulator Session does not connect to DEMOMVS as shown above, you
might have a network or firewall problem preventing you from connecting to the Demo
system. Test your network connection by pinging the Demo system. In a Windows
environment, open a "MS-DOS Prompt" window. Start > Run > cmd > OK.
OK

You should see successful replies to the ping command if you can connect to the Demo system
via the network.

__9. Type: ping demomvs.demopkg.ibm.com

2.2 Customize the Terminal Emulator Session


You can customize the Terminal Emulator Session to make it easier to use. One issue that you
may encounter is that the Enter key does not work as you might expect. Pressing the Enter key
only sends a new line character to the Demo system. The Ctrl key on the right is configured by
default to send the Enter command to the Demo system. If you type a command and press the
Enter key, nothing happens. You must press the right Ctrl key to submit your command to the
Demo system.

You can configure the Enter key to submit your command to the Demo system by customizing
the Keyboard Setup.

__1. In the PCOMM session, select Edit > Preferences > Keyboard.
Keyboard On the Keyboard Setup
screen, click the Customize button. Click to select the Enter key shown as (<
<-‘) on the
keyboard map. In the Function list, scroll down and select Enter.
Enter Click the -> button to
change the current base action for the selected key from [newline] to [enter].
[enter]

© Copyright IBM Corporation, 2007 Page 8 of 43


Mainframe Hands On Exercises 4 IBMers- Part One June, 2007

__2. Select File > Save to save your custom keyboard. Then close the Customize Keyboard
window.

__3. In the Keyboard Setup window, select Current Keyboard: User Defined and browse to the
custom keyboard file you just saved. Click OK.
OK

You can customize the Terminal Emulator Session to display the Demo system name in the title
bar. It will be helpful to display the system name if you have multiple sessions configured to
different systems.

© Copyright IBM Corporation, 2007 Page 9 of 43


Mainframe Hands On Exercises 4 IBMers- Part One June, 2007

__4. Select Edit > Preferences > Appearance > Window Setup.
Setup

__5. Under Window Title, deselect the first checkbox Long Session-
Session-ID, Session A..
A Select the
Session Name checkbox, and fill in the Session Name: DEMOMVS.
DEMOMVS Click OK.
OK

__6. Save the customized Terminal Emulator Session for future use. Select File > Save and give
the profile a name, such as DEMOMVS.ws. The next time you go to Start or Configure
Sessions,
Sessions there will be an icon for DEMOMVS.

You are now ready to continue with the instructions in Section 3!

2.3 Configure an Emulator Session to Connect to the DEMO system via Linux
This section will show you how to configure ERICOM Terminal Power Terminal Interconnect.
ERICOM should already be installed on your system if you have the IBM Linux image.

__1. You can Start ERICOM Power Terminal Interconnect by clicking:


Applications  Open Client  ERICOM Power Terminal Interconnect

© Copyright IBM Corporation, 2007 Page 10 of 43


Mainframe Hands On Exercises 4 IBMers- Part One June, 2007

__2. In the Connect window, choose Terminal Type 3270 Display.


Display

__3. Enter the Host Name: demomvs.demopkg.ibm.com.


demomvs.demopkg.ibm.com Leave the Port Number default of 23.
23
__4. Click the Save As… button

© Copyright IBM Corporation, 2007 Page 11 of 43


Mainframe Hands On Exercises 4 IBMers- Part One June, 2007

__5. In the Save Session Window, enter the Session Name DEMOMVS . Click OK . Click the
Connect button

The ERICOM session should connect to DEMOMVS and look like the screen below:

© Copyright IBM Corporation, 2007 Page 12 of 43


Mainframe Hands On Exercises 4 IBMers- Part One June, 2007

If the Terminal Emulator Session does not connect to DEMOMVS as shown above, you might
have a network or firewall problem preventing you from connecting to the Demo system. Test
your network connection by pinging the Demo system. You should see successful replies to the
ping command if you can connect to the Demo system via the network.

__6. Type: ping demomvs.demopkg.ibm.com

You are now ready to continue with the instructions in Section 3!


3!

(3) Logon to the Demo System using your ID

A quick note about z/OS: z/OS is the operating system for the mainframe and it is an upgrade of
what was previously called the OS/390. Both of these operating systems are an evolution of
MVS (Multiple Virtual Storage). There are still many references to MVS and OS/390 in
mainframe literature.

To gain access to the mainframe with your user ID, you need to login to TSO (Time Sharing
Option).

Here's where things will be a little different than what you are probably used to.

__1. To get to the TSO prompt, type: TSO on the welcome screen (most z/OS functions are not

© Copyright IBM Corporation, 2007 Page 13 of 43


Mainframe Hands On Exercises 4 IBMers- Part One June, 2007

CaSe SeNsItIvE), and then hit the right Ctrl key which is your enter key:
key

Remember that on the mainframe, the right Ctrl key enters commands, and the Enter key, along
with the arrows and tab key, is used for navigating the cursor, unless you have changed it as
explained on 2.2 Section “Customize the Terminal Emulator Session”.

__2. At the ENTER USERID prompt, put in your DEMOMVS ID and hit the right Ctrl key (enter
key). You will be taken to this screen on the next page:

__3. After you type in DEMOMVS ID and the temporary password, hit Ctrl. You will be

© Copyright IBM Corporation, 2007 Page 14 of 43


Mainframe Hands On Exercises 4 IBMers- Part One June, 2007

prompted to create a new password. Ensure that your new password meets the password
requirements stated in the guideline for requesting DEMOMVS IDs.

__4. Create your new password and enter it again for verification. You will be taken to the IBM
Dallas Demonstration Center DEMOMVS welcome screen.

__5. Notice at the bottom of the text, you see this: ***. The three asterisks mean that the system
is waiting for your input to continue. Press Ctrl to continue and you're on your way!

__6. The screen in front of you now is the starting point for much of what is done on the
mainframe, the ISPF Primary Option Menu (Interactive System Productivity Facility). Hit
Ctrl to clear the Copyright popup window:

© Copyright IBM Corporation, 2007 Page 15 of 43


Mainframe Hands On Exercises 4 IBMers- Part One June, 2007

ISPF is where the magic happens. You are officially logged into the z/OS mainframe via the
DEMOMVS system. You've completed the first three steps of Part 1 of this exercise.

Congratulations!

Welcome to the Big Iron!!!

(4.) Customize your DEMOMVS Environment

The default setting in ISPF is for the command line to be at the bottom of the screen. Most
systems programmers, though, prefer to have the command line at the top of the screen. Let's
change this to ensure consistency for this exercise.

© Copyright IBM Corporation, 2007 Page 16 of 43


Mainframe Hands On Exercises 4 IBMers- Part One June, 2007

__1. On the command line, press Ctrl key (enter key). This takes you to the ISPF Settings menu.

__2. On this screen, practice navigating through the menu by pressing the Tab key repeatedly.
The cursor will stop at every field on the screen. Now try pressing the Enter key
repeatedly. The cursor only stops at the leftmost field on any given line.

__3. Navigate to the field beside "Command line at bottom." Delete the "/" using the delete key
(the backspace key will bring you back a space but will not delete characters). Press Ctrl.
The command line jumps to the top of the screen:

© Copyright IBM Corporation, 2007 Page 17 of 43


Mainframe Hands On Exercises 4 IBMers- Part One June, 2007

Now your screen is set up like an experienced systems programmer.

__4. To get back to the ISPF Primary Option Menu, press F3. F3 almost always takes you to the
previous screen.

In z/OS, the F (function) keys are customizable by the user or the application. F3 is a very
important key to remember. If you accidentally hit F3 twice, you'll be taken all the way back to
the TSO READY prompt - to get back to the ISPF Primary Option Menu from here, enter ISPF
and press Ctrl.

IMPORTANT NOTE ON LOGGING OFF (and logging back on):


If you don't intend to log off before completing "Breaking the Ice: Part 1," you should skip to
Section #5 after reading this sentence: Be sure to come back and read this section before
attempting to end your session so that you don't get locked out of your account.

__1. When you need to log off of z/OS, press F3 until you arrive at the TSO READY prompt.
Type LOGOFF and press Ctrl:

© Copyright IBM Corporation, 2007 Page 18 of 43


Mainframe Hands On Exercises 4 IBMers- Part One June, 2007

__2. You can now safely close the emulator window by pressing the Ctrl key. However, if you
have done more extensive work during your session, you will see this screen when you
attempt to F3 past the ISPF Primary Option Menu:

__3. If you encounter this screen (as you will after completing some of the later steps), select
option 2: "Delete data set without printing," and press Ctrl. You will then be taken to the
TSO READY prompt, where you can type LOGOFF to end your session.

Should you not follow this logoff procedure, you will get an error message when you try to log
back in: as seen below on the screen shot.

© Copyright IBM Corporation, 2007 Page 19 of 43


Mainframe Hands On Exercises 4 IBMers- Part One June, 2007

You will also get this error message if you lose your wireless internet connectivity while you are
still logged on to the DEMOMVS system.

__4. If any of these happen, to reconnect using your first ID that has been locked out, open
another PCOMM session and log into the DEMOMVS system using your second
DEMOMVS user ID.

__5. Enter 13.14 from the z/OS Primary Menu to access SDSF. Enter the command, OWNER
DNETXXX , where DNETxxx is your locked ID, to view only DNETXXX jobs.

© Copyright IBM Corporation, 2007 Page 20 of 43


Mainframe Hands On Exercises 4 IBMers- Part One June, 2007

__6. To view the status of the DNETxxx jobs enter ST on the command input.

__7. Next, end the DNETxxx TSO session by executing a ‘purge’ command on it as shown
below and press the ctrl key:

__8. Enter 1, in the confirm action pop up and press enter:

© Copyright IBM Corporation, 2007 Page 21 of 43


Mainframe Hands On Exercises 4 IBMers- Part One June, 2007

This should end the session for your locked out ID DNETxxx. You should now be able to log
back into the DEMOMVS system TSO session with your first ID. Notice that the TSO session will
always have a status of 'EXECUTION' and the JOBID will always begin with TSU.

(5.) Use ISPF facilities to locate the data sets created for your ID
e ISPF facilities to locate the data sets created for your ID
__1. From the ISPF main screen:

© Copyright IBM Corporation, 2007 Page 22 of 43


Mainframe Hands On Exercises 4 IBMers- Part One June, 2007

__2. Select option 3 (Utilities), and press Ctrl.

On the next screen:

__3. Select option 4 (Dslist - short for data set list) and press Ctrl.

Let's take a look at some of the data sets that have already been created:

__4. On the line Dsname Level, type the data set name VITALITY and press Ctrl. You'll be
presented with a list of all of the system-generated data sets that are available in the data

© Copyright IBM Corporation, 2007 Page 23 of 43


Mainframe Hands On Exercises 4 IBMers- Part One June, 2007

set VITALITY..

A partitioned data set (PDS) is the mainframe equivalent of a folder or a directory. It contains
members, which you are probably used to calling "files." Let's have a look at the members within
the data set called VITALITY.CICSDB2.JCL.
VITALITY.CICSDB2.JCL

__5. Tab down until your cursor is beside it, type a b (for browse), and press Ctrl.

You'll see a list of members:

© Copyright IBM Corporation, 2007 Page 24 of 43


Mainframe Hands On Exercises 4 IBMers- Part One June, 2007

__6. You can also browse members by entering a b on the field next to them.

__7. To edit a member enter e.

At this stage you should be comfortable navigating through the data sets and members. Next we
will create some new ones.

explore Quick and dirty overview of mainframe file systems:


Background to explore:
As you will shortly find out, the simple action of creating a file is more of a process on a
mainframe than on a PC. It's not an "old technology," there are good reasons for the differences.
On a PC or Mac, all the operating systems (Windows, Linux, Mac OS, etc.) use what are called
bitwise file systems. The majority of z/OS uses what is called a record-oriented file system. The
difference is, in a bitwise file system, files are just a collection of sequential streams of bits.
There is a special character to tell the computer where a line (or "record" in mainframe-speak)
ends and the next one starts. In a record-oriented file system, instead of having a stream of bits,
files are organized on the disk into separate records. Because of this property, you define the
sizes and attributes of your records so there is no need for a special end line character, which
helps to conserve system resources. (Mainframes can also support special bitwise file systems
called HFSes and ZFSes.)

What else makes z/OS different? z/OS has very rich support for controlling resources, and this
spills over into its file system. When you make a new data set, you have to define how big it can
grow, as well as how its records are set up. z/OS needs to track each file because the disk access

© Copyright IBM Corporation, 2007 Page 25 of 43


Mainframe Hands On Exercises 4 IBMers- Part One June, 2007

speeds on the mainframe are amazing. Suppose you have a rogue program that has some flaw,
and it just keeps writing out to disk. If we left this unchecked on a mainframe, you could find
terabytes of data written out, filling up your disks. Before you realized what was happening it
would be too late. Not a big deal if that happens while you're downloading music on your PC,
but if this happened to a bank or an airline while processing millions of transactions, it could be
crippling. That's why the mainframe works the way it does. It's an important consideration in
large systems thinking!

(6.) Allocate a partitioned data set extended (PDSE) using ISPF panels
(6.) Allocate a partitioned data set extended (PDSE) using ISPF panels

The mainframe is designed to maximize resources. As a result, something as simple as creating


a new partitioned data set (folder) is a very customizable task. With thousands of users
accessing one machine, and millions of transactions per second, it's important to do things this
way.

__1. Press F3 until you are back at the ISPF Primary Option Menu. Select 3 (utilities). On the
next screen, select 2 (Data Set). You'll be taken to this screen:

Here, you need to supply the name of your new data set. Data sets are named with 1-8
character identifiers separated by periods, like this: VITALITY.DNET###.PARTONE. The system
automatically assumes that you want the first identifier to be your user ID unless you put single

© Copyright IBM Corporation, 2007 Page 26 of 43


Mainframe Hands On Exercises 4 IBMers- Part One June, 2007

quotes around the name. In this case, in the Data Set Name field, enter
‘VITALITY.DNET###.PARTONE’ (where DNET### is your DEMOMVS ID).

__2. On the option line, type A for Allocate new data set. Press Ctrl to continue.

This next screen is the one you use to customize your new data set. See how it says More: + in
the top right-hand corner? That means that the page is too large to fit on one screen.

__3. Use F7 and F8 to page up and down.

Specify the following attributes for your PDSE:


PDSE
The PDSE should be allocated in tracks, with a primary quantity (allocation) of 1, and a
secondary quantity of 2. It should have 10 directory blocks. Record format should be FB (fixed
block). Record length should be 80. Block size should be 32000. Data set name type should be
LIBRARY (this tells the system that you are creating a PDSE).

__4. Set these values appropriately on this screen. Any field that is not explicitly mentioned in
italics above can be left blank or left with whatever default the system provided. Hit Ctrl
to continue.

On the next screen, notice the message in the top right corner: Data set allocated. Whenever
you see a message appear in the top right hand corner, you can hit the F1 key (Help key) for
additional information.

© Copyright IBM Corporation, 2007 Page 27 of 43


Mainframe Hands On Exercises 4 IBMers- Part One June, 2007

You've successfully created a new data set on the mainframe. Now let's create some data sets!

More background to explore: So what types of datasets can I make, anyway?


You've just made a PDSE, Partitioned Data Set Extended, and as the extended implies, the PDS
was its predecessor. PDSEs are very similar to PDSs, with a few internal improvements. There is
another type of data set called a sequential data set. A sequential data set is like a flat file; it
behaves the same way as a member of a PDS would. You can edit a sequential data set directly,
and it doesn't hold any members.

(7.) Populate your new PDSE with a member


(7.) Populate your new PDSE with a member
Right now, your data set is just an empty container. We need to store some data in it. A member
can be anything you'd like it to be - flat text, executables, program output - just like the files on
your home computer.

Let's create a simple flat text member.

__1. F3 all the way back to the ISPF Primary Option Menu. Select option 2 (Edit). Let's name the
new member after your name.

__2. To create a member, input your data set name with the new member name (up to the first
eight letters of your first name- in this example we have used OGE as the new member
name) in parentheses directly afterwards, like in the screen shot below:

© Copyright IBM Corporation, 2007 Page 28 of 43


Mainframe Hands On Exercises 4 IBMers- Part One June, 2007

__3. Press Ctrl and the system will create a new member named your_name in the data set
VITALITY.DNETXXX.PARTONE and automatically open it in an editor session.

(8.) Enter three lines of text into your new data set member
of text into your new data set member
You are now in the ISPF editor, looking at a blank member:

__4. Move your cursor to the first line of blank space (two lines under the first "-" in "-

© Copyright IBM Corporation, 2007 Page 29 of 43


Mainframe Hands On Exercises 4 IBMers- Part One June, 2007

Warning-"):

__5. Now type in three lines worth of whatever you like.


It is highly recommended that you write a Haiku poem about the mainframe - five syllables on
the first line, seven on the second line, then five again on the third line. But it can be whatever
you want - the important thing is that you type three lines of text (the quality of the haiku is not
graded).

__6. When you are finished entering the text, press Ctrl. (If at any point you make a mistake
and would like a clean slate, enter CAN (short for cancel) on the command line. Your
work will not be saved, and you will return to the previous screen. Press Ctrl on that
screen, and you will have a fresh data set member again. You can also enter HELP at any
time on the command line for more information about the ISPF editor.)

The screen should now look something like this:

© Copyright IBM Corporation, 2007 Page 30 of 43


Mainframe Hands On Exercises 4 IBMers- Part One June, 2007

The ISPF editor is very careful to preserve system resources. It has made the member exactly
three lines long, and chopped off the excess blank lines.

__7. To save your work, type SAVE on the command line and press Ctrl.

(9.) Use the ISPF editor to manipulate the text

Now let's practice some simple ISPF editor commands - the basic tools for editing and modifying
members.

__1. To insert more blank lines, use the I command (for insert). Editor commands go in the
numbered field beside the lines of text, right on top of the existing line numbers.
__2. Let's insert two lines by putting the I2 command on the third line (go ahead and type right
over the line numbers that are there):

© Copyright IBM Corporation, 2007 Page 31 of 43


Mainframe Hands On Exercises 4 IBMers- Part One June, 2007

__3. Now press Ctrl. Two blank lines have been created:

Let's now copy your brilliant text fifty times over.

__4. To do this, put a CC on the first line you want to copy, and a CC on the last line you want
to copy (the first and third lines of your text, respectively). To tell the editor to paste the
copied section fifty times, go to the last line, and put an A50 in the command field (the
letter A stands for "paste After this line." The letter B would paste it Before the line.)

Your screen should look something like this:

© Copyright IBM Corporation, 2007 Page 32 of 43


Mainframe Hands On Exercises 4 IBMers- Part One June, 2007

__5. Now press Ctrl. Your haiku (or whatever you typed) has now repeated fifty times, off the
bottom of the screen:

__6. Notice that one blank line ― ISPF doesn't like wasted resources. Paging up and down
using F7 and F8 will automatically delete blank lines. You can also delete the blank line by
putting a D to the left of it and pressing enter, if you prefer. Delete the line now:

© Copyright IBM Corporation, 2007 Page 33 of 43


Mainframe Hands On Exercises 4 IBMers- Part One June, 2007

The line should now be gone:

You can use DD the same way you used CC to delete sections of text, as well.

Now let's repeat the first line of text 10 times.

__7. To do this, use the R (repeat) command. Type R10 on the first line:

© Copyright IBM Corporation, 2007 Page 34 of 43


Mainframe Hands On Exercises 4 IBMers- Part One June, 2007

__8. Now press Ctrl, and your first line repeats ten times, with new line numbers to match:

__9. On the command line, enter the command BOTTOM.


BOTTOM This takes you to the bottom of the
member. Tab down and use the I command to insert one more line after the last line of the
member. On the new line, enter your favorite color. Now type SAVE on the command line
and press Ctrl to save your work.

© Copyright IBM Corporation, 2007 Page 35 of 43


Mainframe Hands On Exercises 4 IBMers- Part One June, 2007

You've now learned how to log into a mainframe, to browse and create data sets, and to create
and edit your own data set member. Not too shabby. Now let's run an executable program
against the member you created.

More background to explore: Why do I have to keep pressing page up and page down?
Probably the most unfamiliar part of the ISPF editor is the fact that it doesn't just automatically
scroll up and down like most PC editors do. There is a good reason for this! It's for efficiency's
sake. In the non-mainframe world, when you are using an editor that scrolls in real-time, going
through the network to a server, you are always sending data back and forth to the server (for
just about every keystroke). With mainframes (and the emulator you're using), data is only sent
to the mainframe when you hit the Ctrl key or a function (F#) key. This saves a lot of traffic.
When you have upwards of 10,000 or more folks working at the same time, those few bytes on
the network can mean a big savings, especially if it's over an expensive wide area network
(WAN) link!

(10.) Run an executable against your new data set member

__1. F3 out of your data set member - it will save automatically (if you ever want to quit
without saving, QQUIT on the command line will do the trick. The extra Q lets the editor
know that you're serious about deleting your work.)

© Copyright IBM Corporation, 2007 Page 36 of 43


Mainframe Hands On Exercises 4 IBMers- Part One June, 2007

__2. From the ISPF Primary Option screen, select option 6: Command.

This screen lets you enter TSO commands from ISPF. We need to execute a REXX program
(REXX is a powerful, user-friendly programming language used on the mainframe) that is
stored in the member VITALITY.ZOS.CONTEST.REXX(COUNT) against the member you created.

"EX
EX"
EX is the TSO command for "EXECUTE
EXECUTE."
EXECUTE

__3. To execute the REXX program, enter on the command line: EX


'VITALITY.
'VITALITY.ZOS.CONTEST.REXX(COUNT)'
ZOS.CONTEST.REXX(COUNT)' 'OGE
'OGE'
OGE' (where OGE is whatever you named the
member you created):

© Copyright IBM Corporation, 2007 Page 37 of 43


Mainframe Hands On Exercises 4 IBMers- Part One June, 2007

The program will begin, giving you the following message:

Remember, the *** means that the system is waiting for your input.

__4. Press Ctrl to continue and execute the program.

__5. Press Ctrl again to clear the system output.

© Copyright IBM Corporation, 2007 Page 38 of 43


Mainframe Hands On Exercises 4 IBMers- Part One June, 2007

The program has now executed. Let's go and see what it did.

__6. Instead of using F3 to back out to the ISPF Primary Option Menu, let's use a shortcut. On
the command line, enter "=3.4"
=3.4":
=3.4"

__7. This is the same as choosing option 3 from the Primary Option Menu, then choosing 4 on
the next screen. You should recognize the screen you are now looking at:

© Copyright IBM Corporation, 2007 Page 39 of 43


Mainframe Hands On Exercises 4 IBMers- Part One June, 2007

__8. Make sure that the High Level Qualifier VITALITY is specified on the Dsname Level field,
and press Ctrl.
__9. On the next screen, put an E for edit beside the data VITALITY.DNET##. PARTONE:
PARTONE

__10. Press Ctrl. There is a new member in your data set now, named like your user ID.
ID Put an
E beside it and press Ctrl to have a look.

© Copyright IBM Corporation, 2007 Page 40 of 43


Mainframe Hands On Exercises 4 IBMers- Part One June, 2007

The REXX exec counted each occurrence of the lines of your haiku (plus your favorite color),
and generated output to this new member accordingly.

IMPORTANT: Type SAVE on the command line and press Ctrl to save your work!

After you save the member, you can verify that it was saved correctly by the message in the
upper right-hand corner, "Member DNET### saved”
saved”

__11. F3 back one screen. The prompt informs you that the member was edited:

© Copyright IBM Corporation, 2007 Page 41 of 43


Mainframe Hands On Exercises 4 IBMers- Part One June, 2007

© Copyright IBM Corporation, 2007 Page 42 of 43

Вам также может понравиться