43
Mainframe Hands On Exercises 4 IBMers Mainframe Hands On Exercises 4 IBMers Mainframe Hands On Exercises 4 IBMers Mainframe Hands On Exercises 4 IBMers (Part One: Breaking the Ice) (Part One: Breaking the Ice) (Part One: Breaking the Ice) (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 for IBMers Part One

Embed Size (px)

Citation preview

Page 1: Mainframe Hands-On Exercises for IBMers Part One

Mainframe Hands On Exercises 4 IBMersMainframe Hands On Exercises 4 IBMersMainframe Hands On Exercises 4 IBMersMainframe Hands On Exercises 4 IBMers

(Part One: Breaking the Ice)(Part One: Breaking the Ice)(Part One: Breaking the Ice)(Part One: Breaking the Ice)

No Experience Needed!

© Copyright IBM Corporation, 2007

This document is intended for IBM internal use only.

Page 2: Mainframe Hands-On Exercises for IBMers Part One

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

© Copyright IBM Corporation, 2007 Page 1 of 43

This page intentionally left blankThis page intentionally left blankThis page intentionally left blankThis page intentionally left blank

Page 3: Mainframe Hands-On Exercises for IBMers Part One

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

© Copyright IBM Corporation, 2007 Page 2 of 43

TABLE OF CONTENTSTABLE OF CONTENTSTABLE OF CONTENTSTABLE OF CONTENTS

INTRODUCTIONINTRODUCTIONINTRODUCTIONINTRODUCTION .................................................................................................................3

(1.) GETTING A DEMOM(1.) GETTING A DEMOM(1.) GETTING A DEMOM(1.) GETTING A DEMOMVS IDVS IDVS IDVS ID ...........................................................................................4

(2.) CONFIGUR(2.) CONFIGUR(2.) CONFIGUR(2.) CONFIGURE TERMINAL EMULATOR E TERMINAL EMULATOR E TERMINAL EMULATOR E TERMINAL EMULATOR SOFTWARESOFTWARESOFTWARESOFTWARE.......................................................5

2.12.12.12.1 CCCCONFIGURE AN ONFIGURE AN ONFIGURE AN ONFIGURE AN EEEEMULATOR MULATOR MULATOR MULATOR SSSSESSION TO ESSION TO ESSION TO ESSION TO CCCCONNECT TO THE ONNECT TO THE ONNECT TO THE ONNECT TO THE DEMODEMODEMODEMO SYSTEM VIA SYSTEM VIA SYSTEM VIA SYSTEM VIA WWWWINDOWSINDOWSINDOWSINDOWS ....5

2.22.22.22.2 CCCCUSTOMIZE THE USTOMIZE THE USTOMIZE THE USTOMIZE THE TTTTERMINAL ERMINAL ERMINAL ERMINAL EEEEMULATOR MULATOR MULATOR MULATOR SSSSESSIONESSIONESSIONESSION ...............................................................8

2.32.32.32.3 CCCCONFIGURE AN ONFIGURE AN ONFIGURE AN ONFIGURE AN EEEEMULATOR MULATOR MULATOR MULATOR SSSSESSION TO ESSION TO ESSION TO ESSION TO CCCCONNECT TO THE ONNECT TO THE ONNECT TO THE ONNECT TO THE DEMODEMODEMODEMO SYSTEM VIA SYSTEM VIA SYSTEM VIA SYSTEM VIA LLLLINUXINUXINUXINUX .........10

(3) LOGON TO THE DEM(3) LOGON TO THE DEM(3) LOGON TO THE DEM(3) LOGON TO THE DEMO SYO SYO SYO SYSTEM USING YOUR IDSTEM USING YOUR IDSTEM USING YOUR IDSTEM USING YOUR ID....................................................13

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

(5.) USE ISPF FACILI(5.) USE ISPF FACILI(5.) USE ISPF FACILI(5.) USE ISPF FACILITIES TO LOCATE THE DTIES TO LOCATE THE DTIES TO LOCATE THE DTIES TO LOCATE THE DATA SETS CREATED FORATA SETS CREATED FORATA SETS CREATED FORATA SETS CREATED FOR YO YO YO YOUR IDUR IDUR IDUR ID ...........22

(6.) ALLOCATE A PART(6.) ALLOCATE A PART(6.) ALLOCATE A PART(6.) ALLOCATE A PARTITIONED DATA SET EXTITIONED DATA SET EXTITIONED DATA SET EXTITIONED DATA SET EXTENDED (PDSE) USING IENDED (PDSE) USING IENDED (PDSE) USING IENDED (PDSE) USING ISPF PANELSSPF PANELSSPF PANELSSPF PANELS ....26

(7.) POPULATE YOUR N(7.) POPULATE YOUR N(7.) POPULATE YOUR N(7.) POPULATE YOUR NEW PDSE WITH A MEMBEEW PDSE WITH A MEMBEEW PDSE WITH A MEMBEEW PDSE WITH A MEMBERRRR ......................................................28

(8.) ENTER THREE LIN(8.) ENTER THREE LIN(8.) ENTER THREE LIN(8.) ENTER THREE LINES OF TEXT INTO YOURES OF TEXT INTO YOURES OF TEXT INTO YOURES OF TEXT INTO YOUR NEW DATA SET MEMBER NEW DATA SET MEMBER NEW DATA SET MEMBER NEW DATA SET MEMBER ....................29

(9.) USE THE ISPF ED(9.) USE THE ISPF ED(9.) USE THE ISPF ED(9.) USE THE ISPF EDITOR TO MANIPULATE TITOR TO MANIPULATE TITOR TO MANIPULATE TITOR TO MANIPULATE THE TEXTHE TEXTHE TEXTHE TEXT..................................................31

(10.) RUN AN EXECUTA(10.) RUN AN EXECUTA(10.) RUN AN EXECUTA(10.) RUN AN EXECUTABLE AGAINST YOUR NEWBLE AGAINST YOUR NEWBLE AGAINST YOUR NEWBLE AGAINST YOUR NEW DATA SET MEMBER DATA SET MEMBER DATA SET MEMBER DATA SET MEMBER .......................36

Page 4: Mainframe Hands-On Exercises for IBMers Part One

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

© Copyright IBM Corporation, 2007 Page 3 of 43

INTRODUCTIONINTRODUCTIONINTRODUCTIONINTRODUCTION

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)

ApproximateApproximateApproximateApproximate timetimetimetime totototo completion:completion:completion:completion: 2222 –––– 3333 daysdaysdaysdays (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!

:

Page 5: Mainframe Hands-On Exercises for IBMers Part One

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

© Copyright IBM Corporation, 2007 Page 4 of 43

(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 requHow to requHow to requHow to request a est a est a est a

user ID user ID user ID 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 New Customer New Customer New Customer button.

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

ValidateValidateValidateValidate 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 How to request a How to request a How to request a

user ID user ID user ID user ID button near the top of the page. Log in with your IBM Internet e-mail address and

IBM Intranet password.

Page 6: Mainframe Hands-On Exercises for IBMers Part One

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

© Copyright IBM Corporation, 2007 Page 5 of 43

__5. Request a User ID for System z Demo System (DEMOMVSDEMOMVSDEMOMVSDEMOMVS).

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 to request a user IDHow to request a user IDHow to request a user IDHow to request a user 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 aIf you are using Windows go to section 2.1 aIf you are using Windows go to section 2.1 aIf you are using Windows go to section 2.1 and 2.2 to configure your emulator session. For nd 2.2 to configure your emulator session. For nd 2.2 to configure your emulator session. For nd 2.2 to configure your emulator session. For

Linux, skip to section 2.3.Linux, skip to section 2.3.Linux, skip to section 2.3.Linux, skip to section 2.3.

2.1 Configure an Emulator Session to Connect to the DEMO system2.1 Configure an Emulator Session to Connect to the DEMO system2.1 Configure an Emulator Session to Connect to the DEMO system2.1 Configure an Emulator Session to Connect to the DEMO system via Windows via Windows via Windows 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

Page 7: Mainframe Hands-On Exercises for IBMers Part One

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

© Copyright IBM Corporation, 2007 Page 6 of 43

(http://w3-1.ibm.com/download/standardsoftware/).

__1.__1.__1.__1. Start IBM Personal Communications by clicking:

Start Start Start Start ���� All Programs All Programs All Programs All Programs ���� IBM Personal Communications IBM Personal Communications IBM Personal Communications IBM Personal Communications ���� Start or Configure Sessions Start or Configure Sessions Start or Configure Sessions Start or Configure Sessions....

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

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

__4. Enter the Primary Host Name: demomvs.demopkg.ibm.comdemomvs.demopkg.ibm.comdemomvs.demopkg.ibm.comdemomvs.demopkg.ibm.com. Leave the Port Number default

of 23. Click OKOKOKOK.

__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 Session Parameters Session Parameters Session Parameters button.

Page 8: Mainframe Hands-On Exercises for IBMers Part One

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

© Copyright IBM Corporation, 2007 Page 7 of 43

__6. In the Session Parameters window, select Screen Size: 32x8032x8032x8032x80. Click OKOKOKOK. Click OK OK OK OK again.

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

Page 9: Mainframe Hands-On Exercises for IBMers Part One

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

© Copyright IBM Corporation, 2007 Page 8 of 43

__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 > OKStart > Run > cmd > OKStart > Run > cmd > OKStart > Run > cmd > 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.comping demomvs.demopkg.ibm.comping demomvs.demopkg.ibm.comping demomvs.demopkg.ibm.com

2.2 Customize the Terminal Emulator Session2.2 Customize the Terminal Emulator Session2.2 Customize the Terminal Emulator Session2.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 Ctrl Ctrl 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 > KeyboardEdit > Preferences > KeyboardEdit > Preferences > KeyboardEdit > Preferences > Keyboard. On the Keyboard Setup

screen, click the Customize Customize Customize Customize button. Click to select the Enter Enter Enter Enter key shown as (<<<<----‘‘‘‘)))) on the

keyboard map. In the Function list, scroll down and select EnterEnterEnterEnter. Click the ----> > > > button to

change the current base action for the selected key from [newline] to [enter][enter][enter][enter].

Page 10: Mainframe Hands-On Exercises for IBMers Part One

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

© Copyright IBM Corporation, 2007 Page 9 of 43

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

window.

__3. In the Keyboard Setup window, select Current Keyboard: User Defined User Defined User Defined User Defined and browse to the

custom keyboard file you just saved. Click OKOKOKOK.

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.

Page 11: Mainframe Hands-On Exercises for IBMers Part One

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

© Copyright IBM Corporation, 2007 Page 10 of 43

__4. Select EEEEdit > Preferences > Appearance > Window Setupdit > Preferences > Appearance > Window Setupdit > Preferences > Appearance > Window Setupdit > Preferences > Appearance > Window Setup.

__5. Under Window Title, deselect the first checkbox Long SessionLong SessionLong SessionLong Session----ID, Session AID, Session AID, Session AID, Session A.. Select the

Session NameSession NameSession NameSession Name checkbox, and fill in the Session Name: DEMOMVSDEMOMVSDEMOMVSDEMOMVS. Click OKOKOKOK.

__6. Save the customized Terminal Emulator Session for future use. Select File > Save File > Save File > Save File > Save and give

the profile a name, such as DEMOMVS.ws. The next time you go to Start or Configure Start or Configure Start or Configure Start or Configure

SessionsSessionsSessionsSessions, there will be an icon for DEMOMVS.

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

2.3 2.3 2.3 2.3 Configure Configure Configure Configure an Emulator Session to Connect to the DEMO system via Linuxan Emulator Session to Connect to the DEMO system via Linuxan Emulator Session to Connect to the DEMO system via Linuxan 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.__1.__1.__1. You can Start ERICOM Power Terminal Interconnect by clicking:

Applications Applications Applications Applications ���� Open Client Open Client Open Client Open Client ���� ERICOM Power Terminal Interconnect ERICOM Power Terminal Interconnect ERICOM Power Terminal Interconnect ERICOM Power Terminal Interconnect

Page 12: Mainframe Hands-On Exercises for IBMers Part One

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

© Copyright IBM Corporation, 2007 Page 11 of 43

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

__3. Enter the Host Name: demomvs.demopkg.ibm.comdemomvs.demopkg.ibm.comdemomvs.demopkg.ibm.comdemomvs.demopkg.ibm.com. Leave the Port Number default of 23232323.

__4. Click the Save As…Save As…Save As…Save As… button

Page 13: Mainframe Hands-On Exercises for IBMers Part One

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

© Copyright IBM Corporation, 2007 Page 12 of 43

__5. In the Save Session Window, enter the Session Name DEMOMVSDEMOMVSDEMOMVSDEMOMVS . Click OKOKOKOK . Click the

ConnectConnectConnectConnect button

The ERICOMERICOMERICOMERICOM session should connect to DEMOMVSDEMOMVSDEMOMVSDEMOMVS and look like the screen below:

Page 14: Mainframe Hands-On Exercises for IBMers Part One

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

© Copyright IBM Corporation, 2007 Page 13 of 43

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.__6.__6.__6. Type: ping demomvs.demopkg.ibm.comping demomvs.demopkg.ibm.comping demomvs.demopkg.ibm.comping demomvs.demopkg.ibm.com

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

(3) Logon to the Demo System using your ID

A quick note about z/OS:A quick note about z/OS:A quick note about z/OS: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 TSO TSO TSO on the welcome screen (most z/OS functions are not

Page 15: Mainframe Hands-On Exercises for IBMers Part One

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

© Copyright IBM Corporation, 2007 Page 14 of 43

CaSe SeNsItIvE), and then hit the right Ctrl keyright Ctrl keyright Ctrl keyright Ctrl key which is your enter key which is your enter key which is your enter key which is your enter 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

Page 16: Mainframe Hands-On Exercises for IBMers Part One

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

© Copyright IBM Corporation, 2007 Page 15 of 43

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:

Page 17: Mainframe Hands-On Exercises for IBMers Part One

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

© Copyright IBM Corporation, 2007 Page 16 of 43

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 Welcome to Welcome to Welcome to the Big Iron!!!the Big Iron!!!the Big Iron!!!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.

Page 18: Mainframe Hands-On Exercises for IBMers Part One

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

© Copyright IBM Corporation, 2007 Page 17 of 43

__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:

Page 19: Mainframe Hands-On Exercises for IBMers Part One

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

© Copyright IBM Corporation, 2007 Page 18 of 43

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.

IMPORTANTIMPORTANTIMPORTANTIMPORTANT NOTE ON LOGGING OFF (and logging back on): NOTE ON LOGGING OFF (and logging back on): NOTE ON LOGGING OFF (and logging back on): 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:

Page 20: Mainframe Hands-On Exercises for IBMers Part One

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

© Copyright IBM Corporation, 2007 Page 19 of 43

__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 LOGOFF LOGOFF 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.

Page 21: Mainframe Hands-On Exercises for IBMers Part One

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

© Copyright IBM Corporation, 2007 Page 20 of 43

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 secondsecondsecondsecond

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.

Page 22: Mainframe Hands-On Exercises for IBMers Part One

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

© Copyright IBM Corporation, 2007 Page 21 of 43

__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:

Page 23: Mainframe Hands-On Exercises for IBMers Part One

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

© Copyright IBM Corporation, 2007 Page 22 of 43

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:

Page 24: Mainframe Hands-On Exercises for IBMers Part One

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

© Copyright IBM Corporation, 2007 Page 23 of 43

__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

Page 25: Mainframe Hands-On Exercises for IBMers Part One

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

© Copyright IBM Corporation, 2007 Page 24 of 43

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.JCLVITALITY.CICSDB2.JCLVITALITY.CICSDB2.JCLVITALITY.CICSDB2.JCL.

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

You'll see a list of members:

Page 26: Mainframe Hands-On Exercises for IBMers Part One

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

© Copyright IBM Corporation, 2007 Page 25 of 43

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

__7. To edit a member enter eeee.

At this stage you should be comfortable navigating through the data sets and members. Next we

will create some new ones.

Background to exploreBackground to exploreBackground to exploreBackground to explore: Quick and dirty overview of mainframe file systems:Quick and dirty overview of mainframe file systems:Quick and dirty overview of mainframe file systems:Quick and dirty overview of mainframe file systems:

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

Page 27: Mainframe Hands-On Exercises for IBMers Part One

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

© Copyright IBM Corporation, 2007 Page 26 of 43

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

Page 28: Mainframe Hands-On Exercises for IBMers Part One

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

© Copyright IBM Corporation, 2007 Page 27 of 43

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: +More: +More: +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 PDSESpecify the following attributes for your PDSESpecify the following attributes for your PDSESpecify the following attributes for your 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.

Page 29: Mainframe Hands-On Exercises for IBMers Part One

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

© Copyright IBM Corporation, 2007 Page 28 of 43

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

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

You've just made a PDSE, PPPPartitioned DDDData SSSSet EEEExtended, 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:

Page 30: Mainframe Hands-On Exercises for IBMers Part One

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

© Copyright IBM Corporation, 2007 Page 29 of 43

__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 "-

Page 31: Mainframe Hands-On Exercises for IBMers Part One

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

© Copyright IBM Corporation, 2007 Page 30 of 43

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 CANCANCANCAN (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 HELPHELPHELPHELP at any

time on the command line for more information about the ISPF editor.)

The screen should now look something like this:

Page 32: Mainframe Hands-On Exercises for IBMers Part One

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

© Copyright IBM Corporation, 2007 Page 31 of 43

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 SAVESAVESAVESAVE 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 IIII 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 I2I2I2I2 command on the third line (go ahead and type right

over the line numbers that are there):

Page 33: Mainframe Hands-On Exercises for IBMers Part One

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

© Copyright IBM Corporation, 2007 Page 32 of 43

__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 CCCCCCCC on the first line you want to copy, and a CCCCCCCC 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 A50A50A50A50 in the command field (the

letter AAAA stands for "paste AAAAfter this line." The letter BBBB would paste it BBBBefore the line.)

Your screen should look something like this:

Page 34: Mainframe Hands-On Exercises for IBMers Part One

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

© Copyright IBM Corporation, 2007 Page 33 of 43

__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:

Page 35: Mainframe Hands-On Exercises for IBMers Part One

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

© Copyright IBM Corporation, 2007 Page 34 of 43

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 R10R10R10R10 on the first line:

Page 36: Mainframe Hands-On Exercises for IBMers Part One

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

© Copyright IBM Corporation, 2007 Page 35 of 43

__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 BOTTOMBOTTOMBOTTOMBOTTOM. This takes you to the bottom of the

member. Tab down and use the IIII 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.

Page 37: Mainframe Hands-On Exercises for IBMers Part One

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

© Copyright IBM Corporation, 2007 Page 36 of 43

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: More background to explore: More background to explore: More background to explore: Why do I have to keep pressing page up and page down?Why do I have to keep pressing page up and page down?Why do I have to keep pressing page up and page down?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, QQUITQQUITQQUITQQUIT on the command line will do the trick. The extra QQQQ lets the editor

know that you're serious about deleting your work.)

Page 38: Mainframe Hands-On Exercises for IBMers Part One

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

© Copyright IBM Corporation, 2007 Page 37 of 43

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

"EXEXEXEX" is the TSO command for "EXECUTEEXECUTEEXECUTEEXECUTE."

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

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

member you created):

Page 39: Mainframe Hands-On Exercises for IBMers Part One

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

© Copyright IBM Corporation, 2007 Page 38 of 43

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.

Page 40: Mainframe Hands-On Exercises for IBMers Part One

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

© Copyright IBM Corporation, 2007 Page 39 of 43

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"=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:

Page 41: Mainframe Hands-On Exercises for IBMers Part One

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

© Copyright IBM Corporation, 2007 Page 40 of 43

__8. Make sure that the High Level Qualifier VITALITYVITALITYVITALITYVITALITY is specified on the Dsname Level field,

and press Ctrl.

__9. On the next screen, put an EEEE for edit beside the data VITALITY.DNET##. PARTONEVITALITY.DNET##. PARTONEVITALITY.DNET##. PARTONEVITALITY.DNET##. PARTONE:

__10. Press Ctrl. There is a new member in your data set now, named like your user IDuser IDuser IDuser ID. Put an

EEEE beside it and press Ctrl to have a look.

Page 42: Mainframe Hands-On Exercises for IBMers Part One

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

© Copyright IBM Corporation, 2007 Page 41 of 43

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:IMPORTANT:IMPORTANT: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###"Member DNET###"Member DNET###"Member DNET### save save save saved”d”d”d”

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

Page 43: Mainframe Hands-On Exercises for IBMers Part One

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

© Copyright IBM Corporation, 2007 Page 42 of 43