CSCI 388 - Introduction to Large Scale Computing

Total Page:16

File Type:pdf, Size:1020Kb

CSCI 388 - Introduction to Large Scale Computing

Large Scale Computing Lab - Widener University 1 Lab 1

CSCI 388 – INTRODUCTION TO LARGE SCALE COMPUTING, LAB 1 CONNECTION TO MARIST COLLEGE SYSTEM Z9 PREPARED BY: NOAH PASCARELL | [email protected]

LAB 1B

Content based on IBM’s ‘Master the Mainframe Contest’.

Large Scale Computing Lab – Widener University 2006-2007 1 Large Scale Computing Lab - Widener University 2 Lab 1

Overview In this lab you will familiarize yourself with the IBM z9 mainframe and some of the basic commands and functions within it. The different sections will utilize screenshots for the majority of the steps involved. Lab 1 includes the following sections:

Lab 1A (1.) Download and install a 3270 emulator (2.) Use the emulator to connect to the mainframe (3.) Logon to z/OS using your ID (4.) Customize your environment

Lab 1B (5a.) Use ISPF facilities to locate data sets (5b.) Allocate a data set (6.) Populate your data set with a member (7.) Enter three lines of text into your new data set member (8.) Use the ISPF editor to manipulate text

Lab 1C (9.) Create and run a COBOL program

This document covers Lab 1B

Large Scale Computing Lab – Widener University 2006-2007 2 Large Scale Computing Lab - Widener University 3 Lab 1

CSCI 388 - Lab 1b

(5a.) Use ISPF facilities to locate data sets

From the ISPF main screen:

Select option 3 (Utilities), and press Ctrl.

On the next screen:

Large Scale Computing Lab – Widener University 2006-2007 3 Large Scale Computing Lab - Widener University 4 Lab 1

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

Several data sets have already been created for your z/OS user ID. Let's go take a look at them. On the line Dsname Level, type your user ID:

Large Scale Computing Lab – Widener University 2006-2007 4 Large Scale Computing Lab - Widener University 5 Lab 1

And press Ctrl. You'll be presented with a list of all of the system-generated data sets that have been created for you:

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. Right now, all of the data sets here come standard with your account. Now that you've found your data sets, we need to put some new members in there!

First, let's have a look at the members within the data set called KC03H##.ISPF.ISPPROF, which contains your personal ISPF profile. Tab down until your cursor is beside KC03H##.ISPF.ISPPROF, then type a B (for browse):

Large Scale Computing Lab – Widener University 2006-2007 5 Large Scale Computing Lab - Widener University 6 Lab 1

And press Ctrl. You'll see a list of all of the members in the data set. You can also browse members by entering a B on the field next to them. Try this on one of the members (if you were going to Edit a member, you'd enter it using E instead — but we're not doing that just yet):

Large Scale Computing Lab – Widener University 2006-2007 6 Large Scale Computing Lab - Widener University 7 Lab 1

Your profile information probably just looks like a bunch of gibberish. There's not much to look at here now, but you've just learned how to navigate into data sets and members. This is very important stuff!

Now press F3 until you're back at the ISPF Primary Option menu. Let's create your own data set that you will use for this lab assignment.

Background to explore: Quick and dirty overview of mainframe file systems: 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. What's the difference? Well, in a bitwise file system, files are just a collection of sequential streams of bits, and 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. You might think this seems cumbersome. "I don't need to define every file on my PC," you might be thinking. But the reason that z/OS needs to track each file is because the disk access 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!

(5b.) Allocate a data set

All the work that you will do for this lab will be stored in the data set that you will now create. To start make sure you are back at the main ISPF screen, from there chose option 3 (utilities) and at the following screen choose option 2 (Data Set). You should now be at this screen:

Large Scale Computing Lab – Widener University 2006-2007 7 Large Scale Computing Lab - Widener University 8 Lab 1

You should note that your screen does not have values in the Project, Group, and Type fields. Type your USERID (KC03###), “ISPF”, and “ISPPROF” in the Project, Group, and Type fields respectively.

Leave the option field blank to view the data set information for KC03H##.VSAM.JCL. Press ctrl:

Large Scale Computing Lab – Widener University 2006-2007 8 Large Scale Computing Lab - Widener University 9 Lab 1

This is the information for KC03H##.VSAM.JCL, the data set is fairly default, so you will be using its information to create your data set. By viewing this data set’s parameters, the next time you visit the Data Set Information screen these parameters will automatically be used.

F3 back to the Data Set Utility screen and type ‘A’ on the option line to allocate a new data set. Tab down to the Project field and type your USERID, then type ‘LABS’ in the Group field, and ‘LAB1’ in the Type field. This will create a new data set named KC03H##.LABS.LAB1.

Press ctrl. You now see the Data Set Information screen again, with the previous parameters from the VSAM.JCL data set.

Large Scale Computing Lab – Widener University 2006-2007 9 Large Scale Computing Lab - Widener University 10 Lab 1

Press ctrl to accept the parameters and create the data set. You now have created your first data set!

You can see your new data set by returning to the main ISPF screen and choosing option 3 followed by option 4, and using you USERID as the Dslit parameter to search for.

(6.) Populate your data set with a member

Right now, most of your data sets (folders) are just empty containers. We need to put something in them. A member (file) 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.

F3 all the way back to the ISPF Primary Option Menu. Select option 2 (Edit). Let's name the new member after the person who's going to create it - you.

Data sets are named with 1-8 character identifiers separated by periods, like this: KC03H##.LABS.LAB1. When you're creating or editing new members, the system automatically assumes that you want the first identifier (called the high level qualifier or HLQ) to be your user ID, unless you put single quotes around the entire data set name.

Tab down until your cursor is on the Data Set Name field. The PDS we're going to populate is your KC03H##.LABS.LAB1 data set. Enter LABS.LAB1 as the data set name, and then put the member name in parentheses directly following the data set name. Let's use your first name (or the first eight letters of your first name). Once your screen looks something like this (though not exactly like this, unless your name is Noah):

Large Scale Computing Lab – Widener University 2006-2007 10 Large Scale Computing Lab - Widener University 11 Lab 1

Press Ctrl to continue. The system creates a new member named your_name in the data set KC03H##.LABS.LAB1 and automatically opens it in an editor session. (In case you're curious, entering 'KC03H##.LABS.LAB1(your_name)' also would have worked.)

Now you're ready to learn the ISPF editor!

Large Scale Computing Lab – Widener University 2006-2007 11 Large Scale Computing Lab - Widener University 12 Lab 1

(7.) Enter three lines of text into your new data set member

You are now in the ISPF editor, looking at a blank member:

Tab your cursor to the first line of blank space (two lines under the first "-" in "-Warning-"):

Large Scale Computing Lab – Widener University 2006-2007 12 Large Scale Computing Lab - Widener University 13 Lab 1

Now type in three lines worth of whatever you'd like to say. We highly recommend a haiku poem about the mainframe - five syllables on the first line, seven on the second line, then five again on the third line.

The three lines of text can be whatever you want - you don't have to come up with a haiku. The important thing is that you type three lines of text here, using the tab key to move to the second line when you're done with the first and so on. When you are finished entering the text, press Ctrl. (If at any point you mess up 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.)

Once you're happy with your text, press Ctrl. Your screen should now look something like this:

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. To save your work, type SAVE on the command line and press Ctrl.

Large Scale Computing Lab – Widener University 2006-2007 13 Large Scale Computing Lab - Widener University 14 Lab 1

(8.) Use the ISPF editor to manipulate text

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

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

Press ctrl. Two blank lines have been created.

Large Scale Computing Lab – Widener University 2006-2007 14 Large Scale Computing Lab - Widener University 15 Lab 1

Let's now copy your brilliant text sixty times over. 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 sixty times, go to the last line, and put an A60 in the last line's command field (the A stands for "paste After this line." A B would paste it before the line.)

Your screen should look something like this:

Large Scale Computing Lab – Widener University 2006-2007 15 Large Scale Computing Lab - Widener University 16 Lab 1

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

Large Scale Computing Lab – Widener University 2006-2007 16 Large Scale Computing Lab - Widener University 17 Lab 1

Notice that one blank line — ISPF doesn't like wasted resources. Paging up and down using F7 and F8, respectively, 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:

Press ctrl; your line should be deleted and now look like this:

Large Scale Computing Lab – Widener University 2006-2007 17 Large Scale Computing Lab - Widener University 18 Lab 1

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. To do this, use the R (repeat) command. Type R10 on the first line:

Press ctrl. Your first line repeats 10 times with new line numbers to match:

Large Scale Computing Lab – Widener University 2006-2007 18 Large Scale Computing Lab - Widener University 19 Lab 1

On the command line, enter the command 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 first and last name, followed by the school you currently attend, and press Ctrl:

Large Scale Computing Lab – Widener University 2006-2007 19 Large Scale Computing Lab - Widener University 20 Lab 1

You've now learned how to log into a mainframe, to navigate the ISPF panels and to create and edit your own data set members. Not too shabby. Let's save your work and move on.

F3 out of your data set member - it will save automatically (if you ever want to quit without saving, remember that CAN for cancel will do the trick).

More background to explore: Why do I have to keep pressing page up (F7) and page down (F8)? 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!

Large Scale Computing Lab – Widener University 2006-2007 20

Recommended publications