48
IBM Student Mainframe Challenge Part One Time to complete – about an hour The goal of Part One is to learn how to use an IBM System z mainframe without having used one before. Welcome to the Mainframe Challenge! You'll be joining our team of mainframe programmers to learn some skills then prove yourself above the other contestants! Good luck! Hi, my name's Gemma. Welcome to the team! I've been here for a few months already, so I'll be able to offer some help and advice about using the mainframe, and about what the contest requires. I'll set some tasks and questions throughout the contest to see how you're getting on. There will also be prizes for the fastest contestants in each part (if you answer correctly, of course!) Psst! The boss told me earlier what there will be prizes for each part, but you will have to check with your contest organisers for more information on this....!!

Mainframe Contest 1 Part 1

Embed Size (px)

Citation preview

Page 1: Mainframe Contest 1 Part 1

IBM Student Mainframe Challenge

Part OneTime to complete – about an hour

The goal of Part One is to learn how to use an IBM System z mainframe without having used one before.

Welcome to the Mainframe Challenge!You'll be joining our team of mainframe

programmers to learn some skillsthen prove yourself above the other

contestants! Good luck!

Hi, my name's Gemma. Welcome to the team!I've been here for a few months already, so

I'll be able to offer some help and adviceabout using the mainframe,

and about what the contest requires.

I'll set some tasks and questions throughout thecontest to see how you're getting on. There willalso be prizes for the fastest contestants in each

part (if you answer correctly, of course!)

Psst! The boss told me earlier what therewill be prizes for each part, but you will

have to check with your contest organisers for more information on this....!!

Page 2: Mainframe Contest 1 Part 1

So, you want to learn the mainframe? Become a whiz with z/OS? Make millions touting your

desperately sought-after skills all over the world?

First things first, let's teach you how to log on to the mainframe. (Everyone has to start somewhere.)

The software

In order to access the mainframe you'll need some software that will allow you to connect to it, and will

be able to display the z/OS interface. We call it a 3270 terminal emulator (snappy, huh?) - they are

available for multiple platforms.

Note: If you're planning to double-check your progress by following the screenshots in

these instructions, be aware that they were all taken on a Windows machine. If you're

running a different operating system things may look slightly different, but not much.

If you're using Windows...Go to http://www.tombrennansoftware.com/download.html and download the Vista V1.27.exe

file. Install it by running the .exe file and following the installation instructions.

If you're using a Mac...Go to http://brown.edu/cis/tn3270/ and install the latest available version.

If you're using Linux...You'll need to install the following package: x3270 -port1023 (available from

http://x3270.bgp.nu/)

After installation

Everyone got their emulator installed? Then let's begin...

The next step is to start it running. (Predictable, I know.) The default location after a Windows

installation is Start Programs Vista tn3270 Vista Standard session. → → →

You might see this error:

Don't worry about it, just continue. Now we can set up your emulator and connect to the mainframe.

Page 3: Mainframe Contest 1 Part 1

Configuration

➔ Configure your emulator as shown below.(Windows users: from the menu bar in Vista Session A, select File Reconnect Ask.)→

The Host IP Name is 129.35.161.134 and the IP Port is 23. These values point towards the z/OS

system you'll be accessing.

➔ Fill in these two values, and click Connect. If all is well, you should see this:

Congratulations, you have connected to the mainframe! Don't rest on your laurels yet, there's more to come.

Page 4: Mainframe Contest 1 Part 1

A z/OS primer

Now's a good time to give you some background information about z/OS, before you dive

into it.

z/OS is an upgrade of what used to be called OS/390. Both of these operating systems are an evolution of MVS (which stands for Multiple Virtual Storage). General mainframe

literature still contains many references to these terms. When you're connected to the mainframe, you will find that things are a bit different to what you are used to...

A world where Ctrl == Enter

A number of keys on your keyboard don't have the same function as they would in your

usual operating system. For example, the biggest one to remember is that to enter a

command, you need to press Ctrl, not Enter! (That's the right Ctrl only, not the left

one.)

In the z/OS world, the Enter key is a navigation control, and will move the cursor down to

the next form field on the screen.

Many z/OS emulators allow you to use the Enter key to enter a command, so it won't

matter if you forget – but the warning's there if you need it.

I've summarised the common differences below:

Action Key on mainframe

Key on other O/Ss

Notes

Enter a command Ctrl Enter

Scroll up one page F7 Page Up

Scroll down one page F8 Page Down

Exit current screen F3 Esc Esc is the closest equivalent, and not always used

Scroll left one screen F10(none)

Isn't that great? This is extra functionality only available on z/OS!Scroll right one screen F11

Change to Insert mode Insert Insert You get this one for free

Move cursor to next field Tab Tab This one too

Move cursor to first field on next line

Enter (none) This is what will happen when you forget about Ctrl!

However, ultimately it depends on the emulator you're using. These are the common settings, you should be able to find out the mapping that your emulator uses if it's different.

Now that you know all that, let's put it into action by logging on...

Page 5: Mainframe Contest 1 Part 1

Logging on

Remember where you were? The mainframe welcome screen?

You should have a cursor (looking like this: _ ) after a prompt (looking like this: ==> ) saying

SELECTION (looking like this: SELECTION ).

➔ Type TSO at the prompt and enter.

You will see a big black screen with a red message saying: IKJ56700A ENTER USERID. Much like this,

in fact:

➔ Enter the user id that you have been allocated.

For the UK contest it will be 7 characters long, and start with UK. From now on whenever I say

UKxxxxx, substitute your own user id. Now press Enter. (You know I mean Ctrl, right?)

You will be taken to this screen so that you can enter your password (which is the same as your user id

the first time you log on):

➔ At the password prompt ( ==> ) type in your user id and hit Ctrl. You will be

prompted to choose a new password.

Page 6: Mainframe Contest 1 Part 1

➔ Enter your new password twice (followed by Ctrl each time).

At the bottom of the logon screen, there is a note to say you can press PF1 or PF13 for

help. PF or “program function” is the old name for F or “function” keys. So, when there is

an instruction to press (for example) PF3, the key you want is F3 on your keyboard.

Passwords in z/OS have a maximumof 8 characters, but apart from

that you can go nuts.

Page 7: Mainframe Contest 1 Part 1

You will be taken to the ZEUS welcome screen:

(I know what you're thinking. Could be more welcoming, right?)

Notice at the bottom of the text you see this: *** The three asterisks mean that the system is

waiting for your input to continue on its way, so press Ctrl to continue.

Page 8: Mainframe Contest 1 Part 1

Ahh! This is what we've been waiting for!

This is ISPF. This is where the magic happens. This is your point of control.

(While we're on the subject of control, hit Ctrl to clear the copyright message out of the way.)

You are officially logged into a z/OS mainframe,and you've successfully completed the

first three steps of Part One.

Congratulations!

Page 9: Mainframe Contest 1 Part 1

Customise your environment

In ISPF you can edit settings to make the environment your own. Let's try it out by moving the

command line from the bottom of the screen to the top of the screen (this is what all the pro's do).

So, you've got your cursor on the command line. Enter 0 – this will take you through to the ISPF

settings menu:

On this screen, practise navigating through the

menu by pressing the Tab key repeatedly. You'll see

the cursor moving through every field on the

screen.

Tab Tab

Tab Tab

Tab Tab

Tab

Tab

Tab Tab

Now try pressing the Enter key repeatedly. (Yes, I

actually mean Enter this time!) You can see the

cursor going to a new line each time, seeking out

the first field on each line. (Don't worry if your

emulator is set up differently.)

Enter

Enter

Enter

Navigate to the field (that looks like this: / ) beside 'Command line at bottom'. Delete the '/' using

the delete key and press enter (yeah, yeah, I mean Ctrl).

See the command line jump to the top of the screen!

Page 10: Mainframe Contest 1 Part 1

Oh F3, we sing of thee

The F3 key is another useful navigation command because it exits the screen you're in and goes to the

previous screen, sort of like the Back button in an Internet browser. If you hit it twice from here...

...WAIT! Don't do that!

...you'll find yourself at the TSO READY prompt. (If this happens, just enter ISPF again.)

Logging off

In fact, this is what you want to do when you want to log off; F3 back to the TSO READY prompt and

then type logoff.

You should never just close the connectionwindow without logging off properly, else

you may find yourself locked outof your account!

Page 11: Mainframe Contest 1 Part 1

When you want to log off, if you have done any extensive work during your session, you may be

presented with a further screen (much like the one below):

If you come across this screen, select Option 2 (“Delete data set without printing”) and press

enter. Then you can log off as described above.

If you get locked out of your user id,maybe because your session was cut off

unexpectedly, wait 10 minutes for the system to drop the user id, and then try again.

If you are still having problems, contactone of the organising team members.

Page 12: Mainframe Contest 1 Part 1

Use ISPF to locate the data sets created for your ID

Start at the ISPF primary menu, and go for option 3:

Option 4 on the next screen is called Dslist and is short for “Data set list”.

➔ Type 4 and press Ctrl.

Page 13: Mainframe Contest 1 Part 1

Now we can get to examining the data sets that have been created for your id – on the next screen

there is a field called Dsname Level.

➔ Navigate to this field and type in your user id UKxxxxx and press Ctrl.

You'll be presented with a list of all the data sets owned by your id.

Page 14: Mainframe Contest 1 Part 1

Browsing the members

New worlds. Strange terms. “PDS”. That stands for Partitioned Data Set, and it's like a folder or

directory on other operating systems.

A PDS contains “members” (so I guess a PDS is like a club?). Members are like files on distributed

operating systems.

Let's look at the members inside the data set called UKxxxxx.EXAMPLE.PDS.

➔ Tab your way down until the cursor is next to it and type b (for browse) and press

Ctrl.

You'll then see (hey presto) a list of members!

So remember, a partitioned data set (folder) contains members (files). Easy.

Page 15: Mainframe Contest 1 Part 1

All of the members contain some text data, one contains JCL, another REXX code... we'll come across

those languages again later on so you don't need to understand what the code does right now.

You can browse (look at) members in the same way that you browsed the PDS – by

Tabbing down until your cursor is next to the one you want to look at, and then typing b

and pressing Ctrl.

Why don't you try it?

➔ Browse a couple of the members. Oh, go on.

Page 16: Mainframe Contest 1 Part 1

Creating new files

You can probably tell that creating a file on the mainframe is a more involved process than

on Windows or Unix. Those operating systems use what's called a bitwise filesystem,

whereas z/OS typically uses a record-oriented filesystem.

In a bitwise filesystem, like on Windows or Unix, a file is just a sequential collection of bits,

and there is a special character to tell the computer where a line ends and the next one

starts. Often this special character is \n.

In a record-oriented system, instead of having a stream of bits and a special end-of-line

character, each line in a file is 1 distinct record and files are organised on the disk into

contiguous records (stored consecutively on the disk). Because of this property, you define

the sizes and attributes of the records so there isn't any need for a special end of line

character. This helps to conserve system resources, which is a recurring theme in z/OS!

Mainframes can also support special bitwise filesystems called HFSs and ZFSs.

What else is different about z/OS? It has very rich support for controlling resources, and this

spills over into the filesystem. What this means for you is that when you create a new

dataset, you have to tell z/OS how big it can grow, as well as how its records are set up on

the disk.

You might think that this seems, well, cumbersome compared to desktop operating systems.

After all, you don't need to define parameters for every file or folder on your PC! But the

reason that z/OS needs to track every file is to keep the amazing disk access speeds of the

mainframe. Suppose you had a rogue program with some bug that makes it keep 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 realised what was happening, it would be too late. Not

such a big deal if you're downloading music on your computer, 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!

All this also means that something as simple as creating a new PDS is a very customisable

task. It's important to do this this way when you have thousands of users accessing a single

machine, and millions of transactions per second!

Page 17: Mainframe Contest 1 Part 1

Allocate a partitioned dataset extended (PDSE) using ISPF panels

➔ Now, press F3 until you are back at the ISPF primary option.

➔ Select 3 (utilities), and then 2 (data set) on the next screen.

You'll be taken to the following screen:

➔ On the option line (at the top), type A (for Allocate a new data set).

Here you also need to give the name of your new dataset. Datasets are named with identifiers 1-8

characters long, and separated by dots, like this: UKxxxxx.ZOS.PARTONE

The system will automatically assume that you want the first identifier to be your user id.

➔ In the field which says Data Set Name, type ZOS.PARTONE and press Ctrl.

Page 18: Mainframe Contest 1 Part 1

The next screen is the one you use to customise your new dataset.

(See how it says More: + in the top right hand corner? That means that the page is too large to fit on

one screen. Use F7 and F8 to Page Up and Down the page.)

Typing 'UKxxxxx.ZOS.PARTONE' wouldresult in the same thing as ZOS.PARTONEbecause without quotes, the system will

automatically add your user id to the start.With quotes, it won't, so you have to

type it yourself.

Page 19: Mainframe Contest 1 Part 1

➔ Specify the following attributes for your PDSE:

It should be allocated in tracks (TRKS)

It should have a primary quantity of 1, and a secondary quantity of 1.

The record format should be FB (fixed block), and the record length should be 80. The

block size should be 32000. The data set name type should be LIBRARY (this tells the

system that you are creating a PDSE).

➔ Set these values appropriately on the screen.

(Any fields not mentioned above can be left blank or with the default that was already there.)

See the next screenshot for how it should look:

➔ Hit Ctrl!

Notice the message in the top right hand corner: Data set allocated. Success! You've successfully

created a data set on the mainframe!

Page 20: Mainframe Contest 1 Part 1

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 the PDSs, with a few internal

improvements.

There is another type of dataset called a sequential dataset. A sequential dataset is like a

flat file; it behaves the same way as a a member of a PDS would. You can edit a sequential

dataset directly, and it doesn't hold any members.

Whenever you see a message in the top righthand corner like that, you can always hit F1

for help about the message.

Page 21: Mainframe Contest 1 Part 1
Page 22: Mainframe Contest 1 Part 1

Populate your new PDSE with a member

A member could be anything – program code, program output, binary data, or flat text.

➔ F3 all the way back to the ISPF Primary Option Menu.

➔ Select option 3 (Utilities)

➔ Select option 3 (Move/Copy)

The dataset from which we'll copy the product data is called ZOS.CONTEST1.PART1.PRODUCT.LIST.

It's a sequential dataset, which means that the data is in the dataset itself, not in a member in the

dataset.

You've made a dataset, but at the momentthere isn't anything inside it! Let's copy ina member with some information about the

products we sell at our company.

Page 23: Mainframe Contest 1 Part 1

➔ At the top of the panel, put C for copy in the Option field

➔ Put the name of the dataset to copy the member from in the Name field under the

section labelled From Other Partitioned or Sequential Data Set

Because you're referring to the full name of the dataset, you must put single quotes around it.

Press Ctrl to go to the next panel, where you'll say where you want the contents of the data set to go.

Under the section labelled To Other Partitioned or Sequential Data Set put the name of the

data set you created in the previous section into the Name field.

At the moment there aren't any members in your data set. If you specify a member name that doesn't

exist, z/OS will create a new member and copy the data into it. We'll call the new member PRODLIST.

Put the name of the member you want to copy the data into in brackets after the data set name. Like

this: ZOS.PARTONE(PRODLIST)

Page 24: Mainframe Contest 1 Part 1

Press Ctrl! If everything was filled in properly, there should be a message in the top right of the

screen saying Data set copied.

➔ F3 back to the Utility Selection Menu

➔ Select option 4 (Dslist)

Remember what I said earlier about puttinga data set name in quotes? Because you'recopying the data into one of your own datasets that begins with your userid, you could

type either'UKxxxxx.ZOS.PARTONE(PRODLIST)'

orZOS.PARTONE(PRODLIST)

Page 25: Mainframe Contest 1 Part 1

Because you have used this panel before, it should already have your userid in the Dsname Level field.

Press Ctrl to see all the data sets you own.

As before, Tab to the new dataset you created (Ukxxxxx.ZOS.PARTONE) and enter b for browse in the

space to the left of it.

Page 26: Mainframe Contest 1 Part 1

Inside the UKxxxxx.ZOS.PARTONE dataset, you'll see the new member PRODLIST that you created as a

copy of the sequential dataset ZOS.CONTEST1.PART1.PRODUCT.LIST. Tab down to it, and in the

space to the left of it enter e for edit.

While browsing a dataset:

Put E in the left-hand column next to a member and press Ctrl to edit it in the ISPF text

editor.

Put B in the left-hand column or just put the cursor next to a member and press Ctrl to

browse it.

Also in this space you can enter b to browsethe member as read-only, or d to delete themember. You can do this if you mess up thefollowing instructions, then start again with

a fresh copy of the employee list!

Page 27: Mainframe Contest 1 Part 1

Use the ISPF editor to manipulate the text

Now you're in the ISPF text editor, looking at the data in the PRODLIST member:

Some commands can be typed on the Command line at the top of the screen. The ISPF editor shows a

warning stating that the UNDO command is not available until you change your edit

profile using the command RECOVERY ON. To get rid of this message you can either type

RECOVERY ON or RESET into the Command line at the top of the screen and press Ctrl.

Now let's practice some simpleISPF editor commands; they'll be your basic tools for editing all the

different members you'll comeacross during the contest!

Page 28: Mainframe Contest 1 Part 1

This is where you put editor commands – just type them over the top of the line numbers in the

command column:

i – insert lines after current line.

Can be followed with the number of lines to insert (e.g. i2)

➔ Insert a line by putting i in the command column on the first line, as shown in the

screenshot.

➔ Now press Ctrl.

Page 29: Mainframe Contest 1 Part 1

A blank line has been created under the Sally's Sports heading.

Sally's Sports are stocking a new product! It's a book called How to Play Tennis, and the product code

is BK145.

The format of each record (line) in the member looks like this:Product ID Product name Buy price Sale price Stock count

Prices are represented in pence.

Sally's Sports buy in the book at £4.00 and sell it for £8.99. They've ordered 25.

Notice that instead of line numbers next tothese new lines, there are dots instead.This means they're temporary lines whichwill be removed if you don't put anything

into them before hitting Ctrl again.

Page 30: Mainframe Contest 1 Part 1

➔ Type the new product details into the blank line you just inserted.

➔ Now press Ctrl.

To stop more lines being inserted, press Ctrl again without typing anything in the blank line.

There have been a few changes among ourretailers recently, please update this list to

reflect the new product lines.

Page 31: Mainframe Contest 1 Part 1

Instead of inserting new lines and typing in the different golf club products, simply repeat the record

containing the Golf Clubs product (GF156) and change the relevant details.

r – repeat the current line immediately below. Can be followed with the number of lines to

repeat (e.g. r5)

rr – repeat a block of lines. Must be put on two separate lines, and these will be included

in the block of lines to repeat.

➔ Type r2 on the line containing GF156 Golf Clubs and press Ctrl.

That book isn't the only new thing Sally'sSports is stocking! They're expanding their

range of golf equipment.

Page 32: Mainframe Contest 1 Part 1

Two new lines will appear underneath it, repeated copies of the Golf Clubs record. Overwrite the

product ids and prices of the new products as follows:

GF157 Golf Clubs 20000 52999 10

GF158 Golf Clubs Deluxe 20000 79999 10

When you're finished the list should look like this:

How's it going? If you get things wrong,type CAN or CANCEL on the command

line and press Ctrl to go back to the listof members in your dataset without saving.

Page 33: Mainframe Contest 1 Part 1

Copy the lines containing the golf products that Sally's Sports doesn't already stock from the section

headed Discount Dave into the section headed Sally's Sports.

c – mark lines for copying. Can be followed with the number of lines to copy (e.g. c2)

cc – mark a block of lines for copying. Must be put on two separate lines, and these will be

included in the block of lines to copy.

a – insert marked line(s) after the current line. Can be followed with the number of times

to repeat the marked line(s)

b - insert marked line(s) before the current line. Can be followed with the number of times

to repeat the marked line(s)

Sally's Sports is now stocking the same golfequipment as Discount Dave, and is

selling them at the same price.

Page 34: Mainframe Contest 1 Part 1

As shown in the above screenshot,

➔ Press F8 to scroll down the page and see the rest of Discount Dave's product list.

➔ Put cc on the lines containing GF255 Golf Bag and GF912 Golf Shoes to copy them and

the lines between them as well.

Then...

➔ Press F7 to scroll back up the page to the Sally's Sports list

In the top right corner of the screen will be the message MOVE/COPY is pending because you haven't

yet said where you want the copied lines to go.

➔ Put a on the line containing GF158 Golf Clubs Deluxe to paste the text after this line, but

before the Discount Dave heading.

➔ Press Ctrl to execute these commands!

The member should look something like this:

Did it work?When copying lines, you have to specify both

where they're coming from (c or cc) and where they're going to (a or b)

before you press Ctrl, otherwise it'll say:MOVE/COPY is pending

Page 35: Mainframe Contest 1 Part 1

Because of the competition, Discount Dave is no longer stocking golf equipment. Those products need

to be deleted.

d – delete current line. Can be followed with the number of lines to delete (e.g. d999 to

delete pretty much everything)

dd – delete a block of lines. Must be put on two separate lines, and these will be included

in the block of lines to delete.

➔ Put d6 on the line containing GF034 Golf Balls under Discount Dave (you will need to

scroll down to see it) to delete that line and the next five.

➔ Press Ctrl to execute the command!

As with the copy command earlier, there is a choice between putting the number of lines to delete as a

number after the d character, or by putting dd around a block of lines to delete all of them.

Page 36: Mainframe Contest 1 Part 1

Instead of copying and deleting the lines, this time we'll simply move them.

m – mark lines for moving. Can be followed with the number of lines to move (e.g. m2)

mm – mark a block of lines for moving. Must be put on two separate lines, and these will be

included in the block of lines to move.

a – insert marked line(s) after the current line. Can be followed with the number of times

to repeat the marked line(s)

b - insert marked line(s) before the current line. Can be followed with the number of times

to repeat the marked line(s)

There's another quick turn of events, DiscountDave is now selling rackets at a low price to

undercut Sally's Sports, and Sally's Sports havepulled them off the shelves.

Page 37: Mainframe Contest 1 Part 1

As shown in this screenshot,

➔ Put m3 on the line containing SE123 Tennis Racket to move it and the badminton and

squash rackets too.

➔ Put a on the line containing the Discount Dave header to move the text to the top of

Discount Dave's product list.

➔ Press Ctrl to execute these commands!

The member should look like this:

Nearly done!

Our advertising department has done somesterling work and attracted two new retailers

to offer products on our website – Mark's Storesand Brian's Books

Page 38: Mainframe Contest 1 Part 1

Copy the contents of the data set ZOS.CONTEST1.PART1.PRODUCT.LIST2 into your member.

➔ Type COPY 'ZOS.CONTEST1.PART1.PRODUCT.LIST2' on the command line

➔ Put a on the last line of the member to insert the data after the Colin's Camping list.

➔ Press Ctrl

So far we've been using line commands.There are other commands that can be

executed from the “Command” lineat the top of the screen.

Page 39: Mainframe Contest 1 Part 1

When the contents of the other data set are copied in, the member should now look like this:

Why doesn't it scroll automatically?

One of the unfamiliar things about the ISPF editor is that it doesn't automatically scroll as you type, like most PC editors do. There's a reason for this: efficiency!

The terminal on your screen hardly does any processing, just displays what it receives from

the mainframe (which is doing all the work). 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 key stroke). With mainframes (and the emulator you're using), data is only sent to the mainframe when you

hit enter or an 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 big savings.

Page 40: Mainframe Contest 1 Part 1

FIND 'search string' – Scroll to the next occurrence of the search string in the data set

or member. Also highlights all occurrences of the search string. If there are no spaces in

the string, the single quotes aren't needed.

CHANGE 'search string' 'replacement' all – Change all occurrences of the search

string in the data set or member to the replacement string. If there are no spaces in the

strings, the single quotes aren't needed. The all keyword is optional, leaving it out will

only change the next occurrence.

➔ Type CHANGE 'Ball' 'Sphere' all on the command line and press Ctrl

The member should look like this

The list is getting quite long! You can usethe FIND command on the command line toscroll to and highlight occurrences of words.

The CHANGE command is like find and replace!

Our Political Correctness department hasdecided that the word “ball” is too

offensive. Please change it to “sphere”.

Page 41: Mainframe Contest 1 Part 1

You'll see a confirmation message in the top right to say that the product names have been changed.

➔ Press F3 to exit the editor; the file will automatically be saved.

If you ever want to quit without saving, typing CAN or CANCEL on the command line will do the trick.

Well done!

You've learned how to log into a mainframe,how to browse and create datasets, andhow to make and edit your own dataset.

Next we'll run an executable program withyour dataset as the input.

Page 42: Mainframe Contest 1 Part 1

Run an executable against your new dataset member

➔ From the ISPF Primary Options screen, choose option 6 – Command.

This screen lets you enter TSO commands from ISPF.

The REXX exec code is stored in a dataset called ZOS.CONTEST1.PART1.REXX(FORECAST) – FORECAST

is the name of the member containing an executable program. We'll run it and use the member you

just created as the input.

➔ Enter EX 'ZOS.CONTEST1.PART1.REXX(FORECAST)' 'UKxxxxx.ZOS.PARTONE(PRODLIST)'

(where UKxxxxx is your username).

EX is the TSO command to execute a program.

The program will begin, and output some messages:

The program we're about to run is writtenin a language called REXX. REXX originated

on the mainframe, but has been ported to abunch of other platforms too. I like using

REXX, it's simple and readable but still powerful.

Page 43: Mainframe Contest 1 Part 1

➔ Press Ctrl again to clear the output and return to the ISPF command shell where you ran the

program from.

The program has finished executing, so we can go and see what it did.

Remember that *** means themainframe is waiting for you to

press Ctrl. It'll continue runningthe program when you do.

The ISPF command shell keepsa list of commands you've enteredrecently. Put the cursor on one ofthese commands and press Ctrl

to save time!

Page 44: Mainframe Contest 1 Part 1

Here's a cool trick to bypass the ISPF Primary Option menu...

➔ Enter =3.4 on the command line instead of pressing F3

This is the same as choosing 3 from the Primary Option Menu, then choosing 4 on the next screen.

Shortcut! On any command line, enter = then a menu option, with further options separated

by . to jump straight there! For example, in the last few sections you've been to: =2, =3.4

and =6.

➔ Enter your user id on the Dsname Level field to look at your datasets.

Remember how I told you that if you don't usequote marks when specifying the data set name,the system will automatically add your user id to

the start? Well, the data set list utility 3.4 isthe only panel in the utilities menu (3) that

doesn't do that.So, you'll always have to type the full data setname here, including your user id at the start.

Page 45: Mainframe Contest 1 Part 1

You should find one or two new sequential datasets which were generated by the FORECAST program,

depending on whether you submitted your results.

➔ Put a b beside them and press Ctrl to have a look.

The REXX exec forecasts the profit of each of the retailers, by calculating the profit gained by

selling each product, then multiplying it by the number of that product the retailer has in stock.

Then it writes the results to this new dataset, or appends them to the end if it already exists.

If you didn't follow the instructions above, then the forecast profit you see will be different to

that shown below. In that case, use the contents of the UKxxxxx.PARTONE.LOG dataset to see

where you may have gone wrong, or start again with a new copy of the product list dataset!

In this dataset is the output of the FORECAST program that you just ran.

I think it's fairly self-explanatory!

Page 46: Mainframe Contest 1 Part 1

If you submitted your results, this programwill have informed our finance team about

your results, and they'll be able to tell me whomanaged to finish in the most timely fashion.

That is, if your forecast is in line with ourprojections. If so...

Page 47: Mainframe Contest 1 Part 1

...Congratulations! You've finished all the stepsfor Part One! If you're one of the first 250successful winners, I'll send you a t-shirt

in due course.

You've accomplished a lot so far; not only can you create datasets and members on the

mainframe, you can also run programs and generate output etc.

It might be worth putting some of this onyour CV – hands-on mainframe experience

certainly sets you apart from other job seekers!

There are lots of companies like ours who usea mainframe for large-scale data operations. The

current generation of mainframe programmersare reaching retirement age, so large employers

will be seeking mainframe skills.

Page 48: Mainframe Contest 1 Part 1

For more background and current information on mainframes and how widely they're used in business,

check out these sites!

IBM System Z homepage

http://www.ibm.com/systems/uk/z/

IBM Academic Initiative for System Z

http://www.ibm.com/developerworks/university/systemz/index.html

• “All of the top 25 world banks run their businesses of mainframes.

• 23 of the top 25 global retailers run their mission-critical applications on a mainframe and rely

heavily on enterprise systems-skilled employees.

• 9 out of the top 10 global life/health insurance providers process their high-volume

transactions on a mainframe.”

In Part Two we're going to be doing somemore challenging tasks, including codingand running programs, and using some of

IBM's biggest and best applications!See you there!