IBM Mainframe Exercises - Enterprise Labmainframe:zos_online:... · IBM Mainframe Exercises Number...

43
Mainframe Exercise 01 15.05.2015 by Franco Pinto 1 | Seite IBM Mainframe Exercises Number 01 By Franco Pinto Versions Date Version Changes Name 2015.03.30 1.0.0 Document creation FP 2015.05.15 1.0.1 Review, small corrections for a better understanding FW 2015.06.04 1.0.2 Changing Datasetnames FW 2015.06.09 1.0.3 Resize and change the pictures FW

Transcript of IBM Mainframe Exercises - Enterprise Labmainframe:zos_online:... · IBM Mainframe Exercises Number...

Page 1: IBM Mainframe Exercises - Enterprise Labmainframe:zos_online:... · IBM Mainframe Exercises Number 01 By Franco Pinto ... Goal of this training exercise is to provide a first impression

Mainframe Exercise

01

15.05.2015 by Franco Pinto 1 | S e i t e

IBM Mainframe Exercises Number 01

By

Franco Pinto

Versions

Date Version Changes Name

2015.03.30 1.0.0 Document creation FP

2015.05.15 1.0.1 Review, small corrections for a better understanding

FW

2015.06.04 1.0.2 Changing Datasetnames FW

2015.06.09 1.0.3 Resize and change the pictures FW

Page 2: IBM Mainframe Exercises - Enterprise Labmainframe:zos_online:... · IBM Mainframe Exercises Number 01 By Franco Pinto ... Goal of this training exercise is to provide a first impression

Mainframe Exercise

01

15.05.2015 by Franco Pinto 2 | S e i t e

Introduction

Purpose and scope

This document describes the purpose and scope of the introductory exercise provided to the participants of the HSLU mainframe training environment. It outlines content and methodology of the exercise and provides basic guidance to use the mainframe ISPF and JES2 environment.

The exercise proposed is focused on the HSLU z/OS mainframe environment. It consists of an ISPF foreground part and a batch part. Both parts will concentrate on allocating a sequential dataset and fill the allocated dataset with data.

It’s scope is to provide basic knowledge on how the navigate the mainframe ISPF environment, get insight on how to manage sequential datasets and finally do the same using a batch utility.

Audience

This document is intended for:

Subscribers to the mainframe test environment

Tutors for the environment

The purpose of the exercise

Background

There is wide spread consensus that over the last decades the building of mainframe skills has been neglected. Motivating people to have a first impression of the mainframe is the main driver for this exercise.

Exercise structure

After the student has successfully been identified and provided with a valid mainframe User-Id and password, the student has the opportunity to login to the HSLU mainframe. Once active on the HSLU mainframe the student will have to allocate a sequential dataset, in the second part of the exercise he will have to copy data from a source to the new target dataset. The exercise is executed twice, once interactively in the so-called foreground mode, and once in batch mode.

Education goals

Goal of this training exercise is to provide a first impression of how a main frame environment “looks and feels”. We will demonstrate this by working with one specific dataset type (sequential).

Dataset characteristics

In working with the z/OS operating system, you must understand data sets, the files that contain programs and data. The characteristics of traditional z/OS data sets

Page 3: IBM Mainframe Exercises - Enterprise Labmainframe:zos_online:... · IBM Mainframe Exercises Number 01 By Franco Pinto ... Goal of this training exercise is to provide a first impression

Mainframe Exercise

01

15.05.2015 by Franco Pinto 3 | S e i t e

differ considerably from the file systems used in UNIX and PC systems. To make matters even more interesting, you can also create UNIX file systems on z/OS, with the common characteristics of UNIX systems.

What is a data set?

Nearly all work in the system involves data input or data output. In a mainframe system, the channel subsystem manages the use of I/O devices, such as disks, tapes, and printers, while z/OS associates the data for a given task with a device.

z/OS manages data by using data sets. The term data set refers to a file that contains one or more records. Any named group of records is called a data set. Data sets can hold information such as medical records or insurance records that are used by a program running on the system. Data sets are also used to store information needed by applications or the operating system itself, such as source programs, macro libraries, or system variables or parameters. For data sets that contain readable text, you can print them or display them on a console (many data sets contain load modules or other binary data that is not really printable). Data sets can be cataloged, which permits the data set to be referred to by name without specifying where it is stored.

In simplest terms, a record is a fixed number of bytes containing data. Often, a record collects related information that we treat as a unit, such as one item in a database or personnel data about one member of a department. The term field refers to a specific portion of a record used for a particular category of data, such as an employee's name or department.

The record is the basic unit of information used by a program running on z/OS. The records in a data set can be organized in various ways, depending on how we plan to access the information. If you write an application program that processes things such as personnel data, for example, your program can define a record format for each person’s data.

There are many different types of data sets in z/OS, and different methods for accessing them. This exercise is based on manipulating one type of data set: A sequential data sets.

In a sequential data set, records are data items that are stored consecutively. To retrieve the tenth item in the data set, for example, the system must first pass the preceding nine items. Data items that must all be used in sequence, such as the alphabetical list of names in a classroom roster, are best stored in a sequential data set.

A standard reference for information about data sets is z/OS DFSMS Using Data Sets, SC26-7410. You can find this and related publications at the z/OS Internet Library website:

http://www-03.ibm.com/systems/z/os/zos/bkserv/

Where are data sets stored?

z/OS supports many different devices for data storage. Disks or tape are most frequently used for storing data sets on a long-term basis. Disk drives are known as direct access storage devices (DASDs) because, although some data sets on them might be stored sequentially, these devices can handle direct access. Tape drives

Page 4: IBM Mainframe Exercises - Enterprise Labmainframe:zos_online:... · IBM Mainframe Exercises Number 01 By Franco Pinto ... Goal of this training exercise is to provide a first impression

Mainframe Exercise

01

15.05.2015 by Franco Pinto 4 | S e i t e

are known as sequential access devices because data sets on tape must be accessed sequentially.

The term DASD applies to disks or simulated equivalents of disks. All types of data sets can be stored on DASD (only sequential data sets can be stored on magnetic tape). You use DASD volumes for storing data and executable programs, including the operating system itself, and for temporary working storage. You can use one DASD volume for many different data sets, and reallocate or reuse space on the volume.

To enable the system to locate a specific data set quickly, z/OS includes a data set known as the master catalog that permits access to any of the data sets in the computer system or to other catalogs of data sets. z/OS requires that the master catalog reside on a DASD that is always mounted on a drive that is online to the system. For a basic discussion of catalogs please refer to the IBM Redbook Introduction tot he New Mainframe SG24-6366. You can find this and related publications at the IBM Redbook site:

http://www.redbooks.ibm.com/

Allocating a data set

To use a data set, you first allocate it (establish a link to it), and then access the data using macros for the access method that you have chosen.

The allocation of a data set means either or both of two things:

To set aside (create) space for a new data set on a disk.

To establish a logical link between a job step and any data set.

During this exercise, we allocate a data set using ISPF panel option 3.2. Other ways to allocate a data set include the following methods:

Access method services You can allocate data sets through a multifunction services program called access method services. Access method services include commonly used commands for working with data sets, such as ALLOCATE, ALTER, DELETE, and PRINT.

ALLOCATE You can use the TSO ALLOCATE command to create data sets. The command actually guides you through the allocation values that you must specify.

ISPF menus You can use a set of TSO menus called Interactive System Productivity Facility. One menu guides the user through allocation of a data set.

Using JCL You can use a set of commands called job control language to allocate data sets.

How data sets are named

When you allocate a new data set, you must give the data set a unique name.

Page 5: IBM Mainframe Exercises - Enterprise Labmainframe:zos_online:... · IBM Mainframe Exercises Number 01 By Franco Pinto ... Goal of this training exercise is to provide a first impression

Mainframe Exercise

01

15.05.2015 by Franco Pinto 5 | S e i t e

A data set name can be one name segment, or a series of joined name segments. Each name segment represents a level of qualification. For example, the data set name VERA.LUZ.DATA is composed of three name segments. The first name on the left is called the high-level qualifier (HLQ), and the last name on the right is the lowest-level qualifier (LLQ).

Segments or qualifiers are limited to eight characters, the first of which must be alphabetic (A to Z) or special (#, @, or $). The remaining seven characters are either alphabetic, numeric (0 - 9), special, or a hyphen (-). Name segments are separated by a period (.).

Including all name segments and periods, the length of the data set name must not exceed 44 characters. Thus, a maximum of 22 name segments can make up a data set name.

For example, the following names are not valid data set names:

A name with a qualifier that is longer than eight characters (HLQ.ABCDEFGHI.XYZ).

A name containing two successive periods (HLQ..ABC).

A name that ends with a period (HLQ.ABC.).

A name that contains a qualifier that does not start with an alphabetic or special character (HLQ.123.XYZ).

The HLQ for a user’s data sets is typically controlled by the security system. There are a number of conventions for the remainder of the name. These are conventions, not rules, but are widely used. They include the following items:

The letters LIB somewhere in the name indicate that the data set is a library. The letters PDS are a lesser-used alternative for this convention.

The letters CNTL, JCL, or JOB somewhere in the name typically indicate the data set contains JCL (but might not be exclusively devoted to JCL).

The letters LOAD, LOADLIB, or LINKLIB in the name indicate that the data set contains executables. (A library with z/OS executable modules must be devoted solely to executable modules.)

The letters PROC, PRC, or PROCLIB indicate a library of JCL procedures.

Various combinations are used to indicate source code for a specific language, for example COBOL, Assembler, FORTRAN, PL/I, JAVA, C, or C++.

A portion of a data set name may indicate a specific project, such as PAYROLL.

Using too many qualifiers is considered poor practice. For example, P390A.A.B.C.D.E.F.G.H.I.J.K.L.M.N.O.P.Q.R.S is a valid data set name (upper case, does not exceed 44 bytes, no special characters) but it is not very meaningful. A good practice is for a data set name to contain three or four qualifiers.

Again, the periods count toward the 44-character limit.

Logon and preparation for the exercise

After you received your Userid and your password. The first thing to do is logging on to the system and prepare your personal test environment. By now, you have installed a Telnet 3270 console emulator on your personal machine.

Page 6: IBM Mainframe Exercises - Enterprise Labmainframe:zos_online:... · IBM Mainframe Exercises Number 01 By Franco Pinto ... Goal of this training exercise is to provide a first impression

Mainframe Exercise

01

15.05.2015 by Franco Pinto 6 | S e i t e

Get access to the HSLU system by using the appropriate TCP/IP address, start your TN3270 emulator, enter the TCP/IP address. If the connection successfully establishes, you will get a typical mainframe logon screen (see Picture „HSLU logon screen“ below):

HSLU logon screen

As a next step, you have to logon to the system. The main component that manages online users on a z/OS system is called TSO/E (Time Sharing Option/Extensions). Therefore you have to logon to the TSO subsystem by typing „L TSO“ and pressing, „ENTER“ (see picture below):

Page 7: IBM Mainframe Exercises - Enterprise Labmainframe:zos_online:... · IBM Mainframe Exercises Number 01 By Franco Pinto ... Goal of this training exercise is to provide a first impression

Mainframe Exercise

01

15.05.2015 by Franco Pinto 7 | S e i t e

Enter command „L TSO“ to connect to the TSO subsystem of z/OS

The following screen will ask you to authenticate yourself by entering:

Your Userid followed by on the next panel

Your password

Page 8: IBM Mainframe Exercises - Enterprise Labmainframe:zos_online:... · IBM Mainframe Exercises Number 01 By Franco Pinto ... Goal of this training exercise is to provide a first impression

Mainframe Exercise

01

15.05.2015 by Franco Pinto 8 | S e i t e

Enter your Userid at the current cursor position and press „ENTER“

A Userid is typed-in to confirm your entry press the „ENTER“ key

Page 9: IBM Mainframe Exercises - Enterprise Labmainframe:zos_online:... · IBM Mainframe Exercises Number 01 By Franco Pinto ... Goal of this training exercise is to provide a first impression

Mainframe Exercise

01

15.05.2015 by Franco Pinto 9 | S e i t e

After you have entered your VALID Userid the next screen will ask you about your password:

Enter the password you have received by email at the current cursor position

This particular z/OS system has been set-up in a manner that it will not look at

upper-, or lowercase characters when entering passwords.

Page 10: IBM Mainframe Exercises - Enterprise Labmainframe:zos_online:... · IBM Mainframe Exercises Number 01 By Franco Pinto ... Goal of this training exercise is to provide a first impression

Mainframe Exercise

01

15.05.2015 by Franco Pinto 10 | S e i t e

For security reasons, the password you have been given has an „expired“ status. As a consequence, the system will ask you to set a new password. Please follow these rules to set a new password:

A valid password can be up to eight (8) characters long

Use alphabetic (A to Z)-, or special (#, @, or $) characters

Use numeric (0-9) characters or a mix of alphabetic-, special-, or numeric characters

Please set a new password at the current cursor position, confirm by pressing, „ENTER“

Page 11: IBM Mainframe Exercises - Enterprise Labmainframe:zos_online:... · IBM Mainframe Exercises Number 01 By Franco Pinto ... Goal of this training exercise is to provide a first impression

Mainframe Exercise

01

15.05.2015 by Franco Pinto 11 | S e i t e

Re-enter your new password again for verification:

Re-enter your new password again for verification

Once the password has been accepted by the system, login to the TSO subsystem will proceed. After the access to the TSO subsystem has been established, a screen as shown below will appear:

Page 12: IBM Mainframe Exercises - Enterprise Labmainframe:zos_online:... · IBM Mainframe Exercises Number 01 By Franco Pinto ... Goal of this training exercise is to provide a first impression

Mainframe Exercise

01

15.05.2015 by Franco Pinto 12 | S e i t e

Logon to the TSO subsystem has been successfully achieved

In working with the z/OS operating system, you need to know its user interfaces. Chief among these is Time Sharing Option/Extensions (TSO/E) and its menu-driven interface, Interactive System Productivity Facility (ISPF). These programs allow you to log on to the system, run programs, and manipulate data files. For this exercise, we will use the ISPF interface. To start the interface, enter the command „ISPF“ at the current cursor position (see screenshot below).

At the current cursor position type “ISPF” to start the ISPF interface

Page 13: IBM Mainframe Exercises - Enterprise Labmainframe:zos_online:... · IBM Mainframe Exercises Number 01 By Franco Pinto ... Goal of this training exercise is to provide a first impression

Mainframe Exercise

01

15.05.2015 by Franco Pinto 13 | S e i t e

The next picture shows a typical situation for a screen, waiting for your input. When a function is executed in the background, and the next logical step is to display a full screen, ISPF will signal this by displaying three stars after the last command entered (see picture below).

System is waiting for a user input to clear the screen

At this point simply press the “ENTER” key. As soon as the screen buffer is cleared, the ISPF main panel is shown.

Page 14: IBM Mainframe Exercises - Enterprise Labmainframe:zos_online:... · IBM Mainframe Exercises Number 01 By Franco Pinto ... Goal of this training exercise is to provide a first impression

Mainframe Exercise

01

15.05.2015 by Franco Pinto 14 | S e i t e

ISPF main panel showing IBM copyright panel

At the first start-up, the IBM copyright panel is displayed. To see what is behind the IBM copyright panel, simply press the “ENTER” key again.

Page 15: IBM Mainframe Exercises - Enterprise Labmainframe:zos_online:... · IBM Mainframe Exercises Number 01 By Franco Pinto ... Goal of this training exercise is to provide a first impression

Mainframe Exercise

01

15.05.2015 by Franco Pinto 15 | S e i t e

ISPF main panel without the IBM copyright screen

Navigating ISPF

You navigate the panels by entering the appropriate numbers on the left of the options. Therefore to access the ISPF “Utilities” panel, you enter “3” on the command line (the line designated “Option” on the picture above).

If the screen content is too large to be displayed entirely on the display use PF8 to scroll down, or PF7 to scroll up. (Remark: PF keys most often are the equivalent to the “F” keys on today’s laptop keyboards).

Use the PF1 (F1) key to get additional help.

To leave the system again, type an “X” at the command line on the ISPF main panel .

This will force TSO/E to quit the ISPF interface, and force the screen back into the “command line interface” mode, as shown in the following picture:

Page 16: IBM Mainframe Exercises - Enterprise Labmainframe:zos_online:... · IBM Mainframe Exercises Number 01 By Franco Pinto ... Goal of this training exercise is to provide a first impression

Mainframe Exercise

01

15.05.2015 by Franco Pinto 16 | S e i t e

When “X” is entered at the ISPF main panel, the system returns to the TSO/E command line mode

To quit TSO/E type “LOGOFF” at the current cursor position. This will force TSO/E to force your Userid out of the system and cleanup all the resources your Userid has allocated.

Page 17: IBM Mainframe Exercises - Enterprise Labmainframe:zos_online:... · IBM Mainframe Exercises Number 01 By Franco Pinto ... Goal of this training exercise is to provide a first impression

Mainframe Exercise

01

15.05.2015 by Franco Pinto 17 | S e i t e

Final logout step

Page 18: IBM Mainframe Exercises - Enterprise Labmainframe:zos_online:... · IBM Mainframe Exercises Number 01 By Franco Pinto ... Goal of this training exercise is to provide a first impression

Mainframe Exercise

01

15.05.2015 by Franco Pinto 18 | S e i t e

Exercise 1

Prepare your own testing environment

The scope of exercise 1 is to have all the prerequisites prepared for the subsequent exercises. In order to accomplish this, you have to submit a batch job that will create your needed input files. The batch job will copy datasets from a master set of data. The copied datasets will have names starting with your personal Userid as the HLQ (High Level Qualifier).

From the ISPF primary option menu select option “3” (Utilities)

On the utility selection panel select option “4” (Dslist)

On the data set list utility enter the name of the master control library “HSLU100.LABEX0.*” (in the picture below its LABEX0.JCL.CNTL)

Enter “HSLU100.LABEX0.*” on the Dsname Level line

Press “Enter”

On the resulting Data set list panel the name of the master control library wil l appear

Tab the cursor in front of the library and select the library in edit mode by placing an “E” before the data set name (see picture below).

Page 19: IBM Mainframe Exercises - Enterprise Labmainframe:zos_online:... · IBM Mainframe Exercises Number 01 By Franco Pinto ... Goal of this training exercise is to provide a first impression

Mainframe Exercise

01

15.05.2015 by Franco Pinto 19 | S e i t e

Select the master control library in edit mode (HSLU100.LABEX0.*)

Press the Enter key

The master control library will open and a list of it’s contents will show

Select member “JOB1” in edit mode by placing an “E” in front of member “JOB1” (see picture below) and press the Enter key

Page 20: IBM Mainframe Exercises - Enterprise Labmainframe:zos_online:... · IBM Mainframe Exercises Number 01 By Franco Pinto ... Goal of this training exercise is to provide a first impression

Mainframe Exercise

01

15.05.2015 by Franco Pinto 20 | S e i t e

Select member JOB1 in edit mode from library HSLU100.LABEX0.*

The contents of member “JOB1” will be displayed (see picture below)

Page 21: IBM Mainframe Exercises - Enterprise Labmainframe:zos_online:... · IBM Mainframe Exercises Number 01 By Franco Pinto ... Goal of this training exercise is to provide a first impression

Mainframe Exercise

01

15.05.2015 by Franco Pinto 21 | S e i t e

Contents of member “JOB1”

The contents of member “JOB1” are the controlling parameters of a batch job, bound to run on mainframe subsystem. The parameters and statements are part of the JCL (Job Control Language). Coding JCL is not part of this exercise. A standard reference for information about JCL is z/OS MVS JCL Reference, SA22-7598. You can find this and related publications at the z/OS Internet Library website:

http://www-03.ibm.com/systems/z/os/zos/bkserv/

Some of the parameters of this particular batch job have to be changed before you can submit it.

On the command line enter the following command:

“c ‘1111111’ ‘yourUserid’ all”

Use the same Userid sent to you by email that you use to logon to the system.

For this example, I will use the Userid HSLU101 (see picture below)

Page 22: IBM Mainframe Exercises - Enterprise Labmainframe:zos_online:... · IBM Mainframe Exercises Number 01 By Franco Pinto ... Goal of this training exercise is to provide a first impression

Mainframe Exercise

01

15.05.2015 by Franco Pinto 22 | S e i t e

Enter the command as described above, use your personal Userid, and press the “ENTER” key

If you entered the command correctly, after you have executed the change command by pressing the “ENTER” key, the JCL should look like this (see picture below)

JCL after executing the change command

Page 23: IBM Mainframe Exercises - Enterprise Labmainframe:zos_online:... · IBM Mainframe Exercises Number 01 By Franco Pinto ... Goal of this training exercise is to provide a first impression

Mainframe Exercise

01

15.05.2015 by Franco Pinto 23 | S e i t e

You will notice, that all character strings ‘1111111’ have been replaced wi th ‘HSLU101’.

Now we are ready to submit the batch job.

On the command line type “SUB;CAN” (see picture below), this statement contains two commands. The first (SUB) will submit the job for execution to the system. The second (CAN) will force ISPF to exit member “JOB1” in the current library “HSLU100.LABEX0.*” without saving any changes.

By entering “SUB;CAN” the job will be submitted and the library member left saving any changes made

Page 24: IBM Mainframe Exercises - Enterprise Labmainframe:zos_online:... · IBM Mainframe Exercises Number 01 By Franco Pinto ... Goal of this training exercise is to provide a first impression

Mainframe Exercise

01

15.05.2015 by Franco Pinto 24 | S e i t e

Next you will be informed, that the job has been successfully submitted

Notice that the system has assigned a job number to the batch job submitted by you

Because of the statements in the JCL, you will be notified by the system as soon as the batch job ends.

Page 25: IBM Mainframe Exercises - Enterprise Labmainframe:zos_online:... · IBM Mainframe Exercises Number 01 By Franco Pinto ... Goal of this training exercise is to provide a first impression

Mainframe Exercise

01

15.05.2015 by Franco Pinto 25 | S e i t e

System message indicating the successful ending of the batch job (MAXCC=0000)

The system provides you with a user interface to verify the execution of batch jobs. The interface is called “SDSF” (System Display And Search Facility).

You can access the SDSF interface from the ISPF primary menu by typing “SD” (see picture below)

Page 26: IBM Mainframe Exercises - Enterprise Labmainframe:zos_online:... · IBM Mainframe Exercises Number 01 By Franco Pinto ... Goal of this training exercise is to provide a first impression

Mainframe Exercise

01

15.05.2015 by Franco Pinto 26 | S e i t e

SDSF Primary Option Menu

From the SDSF Primary Option Menu select option “H” Held output queue

On the held output queue select the appropriate job (see job number)

Page 27: IBM Mainframe Exercises - Enterprise Labmainframe:zos_online:... · IBM Mainframe Exercises Number 01 By Franco Pinto ... Goal of this training exercise is to provide a first impression

Mainframe Exercise

01

15.05.2015 by Franco Pinto 27 | S e i t e

Select the system has given to your batch job

When you open the joblog, detailed information of the operation is provided in the log. For the scope of this exercise we just check the return code “RC” on the top of the log (see picture below)

Page 28: IBM Mainframe Exercises - Enterprise Labmainframe:zos_online:... · IBM Mainframe Exercises Number 01 By Franco Pinto ... Goal of this training exercise is to provide a first impression

Mainframe Exercise

01

15.05.2015 by Franco Pinto 28 | S e i t e

The Job containing one step called ‘COPY’ has ended with a RC=00 anything up to RC=04 is acceptable

From the ISPF Primary option menu go to “Utilities” and then from the “Utility Selection Panel” to the “Dslist” panel.

On the “Dslist” panel enter your Userid on the Dsname Level line

Page 29: IBM Mainframe Exercises - Enterprise Labmainframe:zos_online:... · IBM Mainframe Exercises Number 01 By Franco Pinto ... Goal of this training exercise is to provide a first impression

Mainframe Exercise

01

15.05.2015 by Franco Pinto 29 | S e i t e

Select all Files with your Userid as the HLQ

As shown in the example below, you should now see at least two files with your Userid as the HLQ. There should be one file called “yourUserid.LABEX0.*” and one file called “yourUserid.LABEX0.SAMPLE.INPUT”

Page 30: IBM Mainframe Exercises - Enterprise Labmainframe:zos_online:... · IBM Mainframe Exercises Number 01 By Franco Pinto ... Goal of this training exercise is to provide a first impression

Mainframe Exercise

01

15.05.2015 by Franco Pinto 30 | S e i t e

Check for existence of JCL.CNTL and SAMPLE.INPUT file

This concludes Exercise 1

Exercise 2

Allocate a new data set in foreground and copy data

The scope of exercise 2 is to allocate a new data set as a foreground transaction using ISPF. You will then copy data into the data set and try to manage an error condition

From the ISPF Primary Option Menu select option “3” (Utilities)

On the utility selection panel select option “2” (Data Set)

On the Data Set Utility panel enter the name of the new data set o For these exercises you are allowed to allocate data sets that have

your Userid as the HLQ only. o The system will provide your Userid as the HLQ automatically

Enter option “A” (Allocate new data set) on the Option line (see picture below). Press the “ENTER” key

Page 31: IBM Mainframe Exercises - Enterprise Labmainframe:zos_online:... · IBM Mainframe Exercises Number 01 By Franco Pinto ... Goal of this training exercise is to provide a first impression

Mainframe Exercise

01

15.05.2015 by Franco Pinto 31 | S e i t e

Enter LABEX0 for the name of the data set to be allocated.

After you have confirmed your intend to the system, press the “ENTER” key. On the resulting “Allocate New Data Set” Panel enter the values EXACTELLY as shown the following example (see picture below)

Page 32: IBM Mainframe Exercises - Enterprise Labmainframe:zos_online:... · IBM Mainframe Exercises Number 01 By Franco Pinto ... Goal of this training exercise is to provide a first impression

Mainframe Exercise

01

15.05.2015 by Franco Pinto 32 | S e i t e

Enter the required parameters EXCATELLY as shown in the picture but typ VPWRKJ and press the “ENTER” key

Once you have pressed the “Enter” key, you will be returned to the previous panel.

Page 33: IBM Mainframe Exercises - Enterprise Labmainframe:zos_online:... · IBM Mainframe Exercises Number 01 By Franco Pinto ... Goal of this training exercise is to provide a first impression

Mainframe Exercise

01

15.05.2015 by Franco Pinto 33 | S e i t e

The system will confirm the allocation on the upper right corner of the panel

If you press the “ENTER” key again, you will get a detailed report of the allocated file on the “Data Set Information” panel (see picture below)

Page 34: IBM Mainframe Exercises - Enterprise Labmainframe:zos_online:... · IBM Mainframe Exercises Number 01 By Franco Pinto ... Goal of this training exercise is to provide a first impression

Mainframe Exercise

01

15.05.2015 by Franco Pinto 34 | S e i t e

See the details of the newly allocated file

Notice the Data Set Organization (PS) being “Physical Sequential” and the allocated space being 5 MB. On the right half of the panel the “Current Utilization” is “0”. That’s because no data is yet contained in the record.

You will now fill your new data set with data. From the ISPF Primary Option Menu go to option “3” and then from the “Utility Selection Panel” select option “3” (Move/Copy). On the “Move/Copy” panel enter the source file name of the copy operation on the “From Other Partitioned or Sequential Data Set:” line. Enter the option “C” on the Option line (see picture be low). Remember that the system will provide your Userid as the HLQ of any data set name automatically.

Page 35: IBM Mainframe Exercises - Enterprise Labmainframe:zos_online:... · IBM Mainframe Exercises Number 01 By Franco Pinto ... Goal of this training exercise is to provide a first impression

Mainframe Exercise

01

15.05.2015 by Franco Pinto 35 | S e i t e

Enter the filename of the source of the copy operation. Press the “enter” key

On the next panel, you have to enter the name of the target data set (see picture below)

Enter the name of the target data set. Press the “Enter” key

Page 36: IBM Mainframe Exercises - Enterprise Labmainframe:zos_online:... · IBM Mainframe Exercises Number 01 By Franco Pinto ... Goal of this training exercise is to provide a first impression

Mainframe Exercise

01

15.05.2015 by Franco Pinto 36 | S e i t e

Operation failed

The copy operation failed. The system will give you various indications. The first is an informational message IEC031I. A search on the Internet will give a first hint.

Page 37: IBM Mainframe Exercises - Enterprise Labmainframe:zos_online:... · IBM Mainframe Exercises Number 01 By Franco Pinto ... Goal of this training exercise is to provide a first impression

Mainframe Exercise

01

15.05.2015 by Franco Pinto 37 | S e i t e

Explanation:

The error occurred when an output operation to a direct access device was requested.

The second hint will be D37-04 following the IEC030I message.

Explanation:

A data set opened for output used all the primary space, and no secondary space was requested.

The reason, why the copy operation failed seems to be because we did not allocate enough space for our data set. This drives home an important message: Unlike on other platforms, when we manage data sets on the mainframe, we have to be aware of the data set size at the time of the allocation. Therefore in our case, we have to look at the input data set before we allocate the space for our output data set.

From the ISPF Primary Option Panel go to the “Data Set List Utility” panel

On the “Dsname Level” line enter your Userid as the HLQ

Press the “Enter” key

Place an “I” in front of the input data set to get detailed information about the data set’s characteristics

Data set information for the file we use as input

Note that the file has a current allocation of 191 cylinders. A cylinder occupies roughly 0.85GB. Based on this fact, we have to allocate approximately 163MB to accommodate all of the input data. Please repeat the same exercise as be fore by allocating a new data set. Use the same allocation parameters as before with the exception of the primary allocation. Your “Allocate New Data Set” panel should look approximately as follows:

Page 38: IBM Mainframe Exercises - Enterprise Labmainframe:zos_online:... · IBM Mainframe Exercises Number 01 By Franco Pinto ... Goal of this training exercise is to provide a first impression

Mainframe Exercise

01

15.05.2015 by Franco Pinto 38 | S e i t e

New output file with increased primary allocation

Repeat the copy operation with your new file as the target. After successful completion of the copy operation, the new target file Data Set Information should look approximately like this (see Picture below)

Page 39: IBM Mainframe Exercises - Enterprise Labmainframe:zos_online:... · IBM Mainframe Exercises Number 01 By Franco Pinto ... Goal of this training exercise is to provide a first impression

Mainframe Exercise

01

15.05.2015 by Franco Pinto 39 | S e i t e

Data set information of new target data set after successful copy operation

This concludes Exercise 2

Page 40: IBM Mainframe Exercises - Enterprise Labmainframe:zos_online:... · IBM Mainframe Exercises Number 01 By Franco Pinto ... Goal of this training exercise is to provide a first impression

Mainframe Exercise

01

15.05.2015 by Franco Pinto 40 | S e i t e

Exercise 3

Allocate a new data set and copy data by using a batch job

The scope of exercise 3 is to allocate a new data set and copy data into it by using a batch job. You will handle the same type of error as before.

From the ISPF Primary Option Menu select option “3” (Utilities)

On the utility selection panel select option “4” (Data Set List Utility)

On the Data Set List Utility panel enter the name of the LABEX0.JCL.CNTL data set you have copied in exercise 1

Access the content of member “JOB2” in edit mode

Edit Member JOB2 of the ‘yourUserid.JCL.CNTL’ library you created during exercise 1

Change the ‘1111111’ parameter to your Userid

Submit the job.

Check the joblog in SDSF o From the ISPF Primary Option Menu select option “SD” o From the SDSF Primary Option Menu select option “H”

Select the job you have submitted as last (job with highest jobnumber assigned)

Page 41: IBM Mainframe Exercises - Enterprise Labmainframe:zos_online:... · IBM Mainframe Exercises Number 01 By Franco Pinto ... Goal of this training exercise is to provide a first impression

Mainframe Exercise

01

15.05.2015 by Franco Pinto 41 | S e i t e

Abend during batch execution

The batch job abended. Because of abend code IEC030I B37-04 we can assume that we ran into a space problem again. Because the allocation of the target data set was too small.

Page 42: IBM Mainframe Exercises - Enterprise Labmainframe:zos_online:... · IBM Mainframe Exercises Number 01 By Franco Pinto ... Goal of this training exercise is to provide a first impression

Mainframe Exercise

01

15.05.2015 by Franco Pinto 42 | S e i t e

From the earlier check we did against the input data set, we know, the space allocation to be 191 cylinders. Now let’s check what space parameters where in effect for the batch job (see picture below)

JCL for the batch job note the space parameter

A check of the space parameter in the JCL of the batch job “JOB2” in ‘yourUserid.JCL.CNTL’ shows that the space parameter is coded using cylinders as the allocation unit a value of 158 cylinders as the primary allocation and 2 cylinders as the secondary allocation. The secondary allocation will be used up to 16 times by the system, in case the primary allocation cannot fulfill the space request. If we do the calculation, the system allocated 158 cylinders as the primary allocation and then 16 times 2 cylinders for a total of 32 cylinders as the secondary allocation for a total of 190 cylinders.

Modify the JCL by coding the following statements: o Change the ‘DSN=yourUserid.BATCH.OUTPUT to

‘yourUserid.BATCH.OUTPUT2’ o Change the ‘SPACE=(CYL,(158,2),RLSE),’ to

‘SPACE=(CYL,(162,2),RLSE),’

Submit the modified batch job again

Can you tell the difference? Also compare the data set information of the two output data sets.

This concludes Exercise 2

Page 43: IBM Mainframe Exercises - Enterprise Labmainframe:zos_online:... · IBM Mainframe Exercises Number 01 By Franco Pinto ... Goal of this training exercise is to provide a first impression

Mainframe Exercise

01

15.05.2015 by Franco Pinto 43 | S e i t e

Exercise 3 (optional)

Delete the exercise environment

The scope of exercise 3 is to delete all the data sets you have allocated during this session.

From the ISPF Primary Option Menu select option “3” (Utilities)

On the utility selection panel select option “4” (Data Set List Utility)

On the Data Set List Utility panel enter the name of the JCL.CNTL data set you have copied in exercise 1

Access the content of member “JOB3” in edit mode

Change the ‘1111111’ parameter to your Userid

Submit the job by coding “SUB;CAN” on the option line

Check the joblog in SDSF o From the ISPF Primary Option Menu select option “SD” o From the SDSF Primary Option Menu select option “H”

Select the job you have submitted as last (job with highest jobnumber assigned)

As you can see in the joblog, all data sets you have allocated during this exercise have been deleted. Also check on the “Data Set List” panel.

This concludes this set of exercises.

Thank you!