You are on page 1of 22

Introduction

This guide is intended to give you a basic reference to the use of the TSO/ISPF
environment. TSO stands for Time Sharing Option, which is a multi-user environment for
the IBM MVS mainframe operating system. TSO divides available CPU time and
allocates the slices to users. Since the time slices are very short and the system cycles
through the requesting users very quickly, it appears as if they have simultaneous access.
ISPF (Interactive System Productivity Facility) is a menu driven full screen interface to
the most commonly accessed TSO features. It includes facilities to edit, browse, and
manage data and programs.

Using This Guide

Within this guide two conventions are used for instructions. Italicized words represent
actions. Bold face words represent either keys or commands to be typed in. For example

press ENTER instructs you to press the ENTER key on the keyboard. Another example
would be type ISPF which instructs you to type the letters ISPF.

Logonid and userid are used interchangeably throughout this manual and are
synonymous.

Logging On

To enter the TSO system (log on), you must first have an account and an accompanying
user id. Your instructor will provide this information to you. To access the TSO system
from the CBA student menu choose option P from the main menu. This system will then
present a screen with these lines near the top of the screen.

Enter Your Userid:


Password: New password:
Application:
Application required. No Installation Default
There is no need to enter the Userid or password fields on this screen and you may use
the TAB key to bypass them.

On the line marked "Application: " type TSO then press ENTER

example:

Enter Your Userid:


Password: New password:
Application: TSO
Application required. No Installation Default
The system will then prompt you twice to enter your userid.

example

ENTER USERID -
BA0145
IKJ56700A ENTER USERID -
BA0145
You will be presented a TSO logon screen illustrated below.
------------------------------- TSO/E LOGON
----------------------------------
PF1/PF13 ==> Help PF3/PF15 ==> Logoff PA1 ==> Attention PA2
==> Reshow
You may request specific HELP information by entering a '?' in any
entry field.
ENTER LOGON PARAMETERS BELOW: RACF LOGON
PARAMETERS:

USERID ===> BA0145

PASSWORD ===> NEW PASSWORD ===>

PROCEDURE ===> $TSOPROC GROUP IDENT ===>

ACCT NMBR ===> BDW02112

SIZE ===> 1024

PERFORM ===>

COMMAND ===>

ENTER AN 'S' BEFORE EACH OPTION DESIRED BELOW:

-NOMAIL -NONOTICE -RECONNECT -OIDCARD


The USERID and other information will be filled in for you. You will need to enter your
password.

Starting The ISPF Menu System

You are now in TSO at the READY prompt. The following instructions show you how to
access ISPF (the editor that you will be using in this class).

Type: ISPF and press ENTER

The ISPF primary menu is shown below. There are a number of options that will not be
used in this class. Options are selected by typing the number of the option at the OPTION
prompt. This class will be using the EDIT option. This will allow students to create, edit,
and execute COBOL programs and JCL required for assignments in this class. To enter
the edit mode type 2 at the OPTION prompt and press ENTER.
Menu Utilities Compilers Options Status Help
----------------------------------------------------------------------
--------
ISPF Primary Option Menu
Option ===>

0 Settings Terminal and user parameters User ID . : BA0145


1 View Display source data or listings Time. . . : 12:11
2 Edit Create or change source da Terminal. : 3278
3 Utilities Perform ISPF utility functions Screen. . : 1
4 Foreground Interactive language processing Language. : ENGLISH
5 Batch Submit Job for language processing Appl ID . : ISR
6 Command Enter TSO or Workstation commands TSO logon : $TSOPROC
7 Dialog Test Perform dialog testing TSO prefix: BA0145
8 Workplace ISPF Object/Action Workplace System ID : UOK1
S SPECIAL Special UOK Functions MVS acct. : ########
.----------------------------------------------. Release . : ISPF 4.2
| Licensed Materials - Property of IBM |
| 5655-042 (C) Copyright IBM Corp. 1980, 1995. |
| All rights reserved. |
| US Government Users Restricted Rights - |
| Use, duplication or disclosure restricted |
| by GSA ADP Schedule Contract with IBM Corp. |
'----------------------------------------------'

Allocating a Partitioned Data Set

Note: Some classes will have the PDS allocated by the instructor. Other classes will be
given directions by the instructor. Please conform to the class requirements.

In University of Oklahoma COBOL classes, students will be editing primarily Partitioned


Data Set (PDS) Members. If a PDS does not exist it must be allocated before it can be
used. Allocating a PDS causes the operating system to set aside space on a secondary
storage device, such as a disk or on tape, in the specified format for use by the PDS.

From The ISPF PRIMARY OPTION MENU select Option 3 (Utilities) by the following
method.

Type: 3 at the OPTION prompt and press ENTER

The UTILITY SELECTION MENU is presented as illustrated below.

Menu Help
-----------------------------------------------------------------------
-------
Utility Selection Panel
Option ===> 2

1 Library Compress or print data set. Print index listing. Print


rename, delete, browse, edit or view Members
2 Data Set Allocate, rename, delete, catalog, uncatalog, or display
information of an entire data set
3 Move/Copy Move, copy, or promote Members or data sets
4 Dslist Print or display (to process) list of data set names.
Print or display VTOC information
5 Reset Reset statistics for Members of ISPF library
6 Hardcopy Initiate hardcopy output
7 ISPF C/S Install ISPF C/S workstation code from MVS to your
workstation.
8 Outlist Display, delete, or print held job output
9 Commands Create/change an application command table
* Reserved This option reserved for future expansion.
11 Format Format definition for formatted data Edit/Browse
12 SuperC Compare data sets (Standard Dialog)
13 SuperCE Compare data sets Extended (Extended Dialog)
14 Search-For Search data sets for strings of data (Standard Dialog)
15 Search-ForE Search data sets for strings of data Extended (Extended
Dialog)
Type: 2 at the Option prompt and press ENTER

This will present the Data Set Utility screen illustrated below.

Menu RefList Utilities Help


----------------------------------------------------------------------
--------
Data Set Utility
Option ===> A

A Allocate new data set C Catalog data set


R Rename entire data set U Uncatalog data set
D Delete entire data set S Short data set
information
blank Data set information V VSAM Utilities

ISPF Library:
Project . . BA0145
Group . . . SPRING97
Type . . . . COBOL

Other Partitioned, Sequential or VSAM Data Set:


Data Set Name . .
Volume Serial . . (If not cataloged, required for option
"C")

Data Set Password . . (If password protected)


Type A at the Option Prompt to indicate that you wish to Allocate a new data set. Position
the cursor next to the Data Set Name. (Use the TAB key or arrow keys to position the
cursor.) Enter the name of the new PDS in fully qualified form with the single quote
marks before and after. This is illustrated below.
Menu RefList Utilities Help
----------------------------------------------------------------------
--------
Data Set Utility
Option ===> A

A Allocate new data set C Catalog data set


R Rename entire data set U Uncatalog data set
D Delete entire data set S Short data set
information
blank Data set information V VSAM Utilities

ISPF Library:
Project . . BA0145
Group . . . SPRING97
Type . . . . COBOL

Other Partitioned, Sequential or VSAM Data Set:


Data Set Name . . 'BA0145.sample.programs'
Volume Serial . . (If not cataloged, required for option
"C")

Data Set Password . . (If password protected)


Alternately you may also enter the qualifiers in the Project, Group and Type fields under
ISPF Libraray. Note that quotation marks are not used when this method is employed.
This is illustrated below.
Menu RefList Utilities Help
----------------------------------------------------------------------
--------
Data Set Utility
Option ===> A

A Allocate new data set C Catalog data set


R Rename entire data set U Uncatalog data set
D Delete entire data set S Short data set
information
blank Data set information V VSAM Utilities

ISPF Library:
Project . . BA0145
Group . . . sample
Type . . . . programs

Other Partitioned, Sequential or VSAM Data Set:


Data Set Name . .
Volume Serial . . (If not cataloged, required for option
"C")

Data Set Password . . (If password protected)


If your screen looks correct, press the ENTER key, and you will see a screen which will
allow you to fill in information concerning the size and type of dataset you wish to create.
This is the Allocate New Data Set screen and is illustrated below.
Menu RefList Utilities Help
.--------------------------- Allocate New Data Set
----------------------------.
| |
| Command ===> |
| |
| |
| Data Set Name . . . : BA0145.SAMPLE.PROGRAMS |
| |
| Volume serial . . . . TSO012(Blank for authorized default volume) * |
| Generic unit. . . . . (Generic group name or unit address) * |
| Space units . . . . . TRACK (BLKS, TRKS, CYLS, KB, MB or BYTES) |
| Primary quantity. . . 2 (In above units) |
| Secondary quantity. . 2 (In above units) |
| Directory blocks. . . 10 (Zero for sequential data set) |
| Record format . . . . FB |
| Record length . . . . 80 |
| Block size . . . . . 4800 |
| Expiration date . . . (YY/MM/DD, YYYY/MM/DD |
| YY.DDD, YYYY.DDD in Julian form |
| Enter "/" to select option DDDD for retention period in days |
| Allocate Multiple Volumes or blank) |
| |
| ( * Only one of these fields may be specified) |
'----------------------------------------------------------------------
--------'
As you look at the example screen, please read the following explanation of the
individual screen items:

Data Set Name


The name of the data set entered on the previous screen will be shown next to this item. It
will be shown in its fully qualified form but without the single quote marks.

Volume Serial
This is the VOL-SER code for the unit on which you wish to place this data set. If you
leave this space blank, the system will provide a default code. For data sets stored on tape
the VOL-SER code identifies the reel on which the data set is stored. For disk data sets
this identifies the specific device and any logical partitions on the device. Unless
instructed otherwise leave this blank and accept the default.

Generic Unit
System resources are often assigned generic names which are easier for the human users
to remember. You may specify this rather than a VOL-SER. Unless instructed
otherwise leave this blank and accept the default.

Space Units
Storage space may be allocated in a variety of size units. These include blocks (BLKS),
tracks (TRKS) and cylinders (CYLS) which are related to disk organization or bytes
(BYTES), kilobytes (KB) and megabytes (MB) which are units of raw data. Unless
instructed otherwise allocate space for a PDS in TRKS.

Primary Quantity
This is the number of units that of space that are initially set aside for the data set. For
most College of Business courses, set this to 1 or 2.
Secondary Quantity
As the data set is used the initial allocation may fill up. By specifying a secondary
quantity, the system will automatically provide additional space. For most College of
Business courses, set this to 1 or 2.

Directory Blocks
The MVS system maintains a directory for each PDS so that it can access the members
individually. The number required for the PDS is dependent upon the number of
members expected. Each 256 byte block can accommodate 21 members. This parameter
allocates the number of directory blocks specified.

If left blank or 0 is specified then the system allocates the file as a single sequential file
rather than a PDS.

For most College of Business courses, set this to 5 to 10 for a PDS or 0 for a
sequential file.

Record Format
Most PDS or sequential files are allocated as fixed block (FB) which means that all
records in the file have the same length and are blocked for better I/O performance.
Variable block (VB) allows variable length records and fixed unblocked (F) is available
but seldom used. For a PDS that will contain program source code, program object
code or JCL this should be FB.

Record Length
This specifies the logical length of each record in the file. COBOL, SAS and JCL were
originally developed for 80 character punch cards therefore the correct logical record
length (sometimes referred to as LRECL) is 80 bytes or characters. For a PDS that will
contain program source code, program object code or JCL this should be 80.

Block Size
Block size is always some multiple of the record length. Secondary storage devices do
not use every available byte of storage for data. There are I/O size considerations, space
requirements for directories and other overhead data and the amount of space capacity of
the disk that must be considered when determining the optimal blocking factor. This
optimal factor is device dependent. For 80 character record lengths on the OU MVS
system use a 4800 character block.

Expiration Date
Coding anything into this parameter will cause the data set to be uncataloged on the
expiration date or after the specified number of days has been reached. For most College
of Business courses, set this to 5 to 10 for a PDS or 0 for a sequential file.

Editing An Existing data set Or Member


The EDIT entry panel is shown below. The COMMAND line, as the name implies, is for
entry of ISPF commands. Directly below the command line are the lines comprising the
ISPF LIBRARY section. These lines identify the data set being edited. For PDS members

PROJECT refers to the highest qualifier, usually the owners logonid. GROUP and TYPE
refer to the second and third level qualifiers of the PDS name. Member refers to the
actual Member name. When the screen comes up, the default values for the Project,
Group and Type qualifiers are the last PDS where editing was performed.

The data set NAME line allows a non-PDS sequential data set to be edited or a fully
qualified PDS name or sequential file name must be enclosed in single quotes.

Menu RefList RefMode Utilities LMF Workstation Help


----------------------------------------------------------------------
--------
Edit Entry Panel
Command ===>

ISPF Library:
Project . . . BA0145
Group . . . . SPRING97 . . . . . . . . .
Type . . . . COBOL
Member . . . (Blank or pattern for Member
selection list)

Other Partitioned or Sequential data set:


data set Name . . .
Volume Serial . . . (If not cataloged)

Workstation File:
File Name . . . . .

Initial Macro . . . . Options


Profile Name . . . . . / Confirm Cancel/Move/Replace
Format Name . . . . . Mixed Mode
data set Password . . Edit on Workstation
To open a new Member of the PDS for editing, choose a name for the Member. The
name must be 8 characters or less, must begin with an alphabetic character, and cannot
contain special characters such as a dash or asterisk. An example of a legal name is
EXAMPLE1.

To open EXAMPLE1 for editing, type EXAMPLE1 on the Member line and

press Enter.

Menu RefList RefMode Utilities LMF Workstation Help


----------------------------------------------------------------------
--------
Edit Entry Panel
Command ===>

ISPF Library:
Project . . . BA0145
Group . . . . SPRING97 . . . . . . . . .
Type . . . . COBOL
Member . . . EXAMPLE1 (Blank or pattern for Member
selection list)

Other Partitioned or Sequential data set:


data set Name . . .
Volume Serial . . . (If not cataloged)

Workstation File:
File Name . . . . .

Initial Macro . . . . Options


Profile Name . . . . . / Confirm Cancel/Move/Replace
Format Name . . . . . Mixed Mode
data set Password . . Edit on Workstation
When you open a new Member you will be presented with a screen in the format
illustrated below. If you are editing an existing Member the screen will open at the top of
the Member.
File Edit Confirm Menu Utilities Compilers Test Help
----------------------------------------------------------------------
---------
EDIT BA0145.SPRING97.COBOL(EXAMPLE1) - 01.00 Columns
00001 00072
Command ===> Scroll
===> CSR
****** ***************************** Top of Data
******************************
''''''
''''''
''''''
''''''
''''''
''''''
''''''
''''''
''''''
''''''
''''''
''''''
''''''
''''''
''''''
''''''
''''''
''''''
****** **************************** Bottom of Data
****************************
The cursor will be positioned on the COMMAND line when the screen opens.
Commands used on this line are discussed later in this manual. The lines of asterisks
represent the top and bottom of the Member display. The Member may be longer than
can be displayed on one screen.
The area filled with commas on the left hand side of the screen is for line numbers which
ISPF will automatically generate. There are also a series of Line Commands which may
be entered in these spaces. These will be discussed later. You may begin entry on the first
line of empty space if a new Member is being edited.

ISPF is a full screen editor you may move the cursor anywhere within the text being
edited by using the arrow keys on your terminal. Common editing operations will be
discussed on the following pages.

Operations Using Command Line Commands


Copying Another Member

Frequently you need to make up copy of an existing Member in your PDS. This is done
by using a COMMAND Line operation. If you have an existing Member with the fully
qualified name 'BA0145.SAMPLE.PROGRAMS(JCL)' and you wish to copy it to the
new 'BA0145.SAMPLE.PROGRAMS(EXAMPLE1)', you must first open the new
Member EXAMPLE1 in the manner explained earlier. When the new Member is open
type copy jcl following the arrow on the COMMAND Line then press ENTER. Since
the Member JCL exists within the same PDS, the Member name is all that is required. A
new copy of the data in the Member JCL now exists with the name EXAMPLE1.

If you were attempting to copy a Member from a different PDS then simply type copy
and you will be presented with a screen that allows you to enter the fully qualified data
set name.

The COPY command may also be used to import another Member into a specific location
in an existing Member. If you wish to insert the copied text after a specific line type a in
the line number area of that line then execute the COPY command as described above. If
you wish to insert the copied text before a specific line type b in the line number area of
that line then execute the COPY command as described above. If a specific line is not
specified by use of the positional LINE commands, the copied text is appended to the
bottom of the Member.

Ending the Edit Session

You may end an edit session either of two ways. First you may type end on the
COMMAND Line then press ENTER. There is also a standard function key shortcut. If
you press F3 you will immediately end your session. Either way, changes made since
the last SAVE command (or since opening the edit session if no SAVE command has
been issued) will be automatically saved upon exit.

Saving Changes
Although not common, system failures can lead to lost work. If you have been editing for
a particularly long time and are still not ready to exit, type save on the COMMAND Line
and press ENTER. This will save changes made since the last save to disk or since the
start of the edit session if no previous SAVE command has been issued.

Discarding Changes

You may want to discard changes made during an edit session. Type cancel on the
COMMAND Line and press ENTER. This will discard all changes since the last SAVE
command or since opening the edit session if no SAVE has been issued. One problem
that often arises is when a Member is copied and changes are made without a SAVE
command ever being issued. If the user wishes to discard the changes and issues a
CANCEL command it will also cancel the COPY command and the original will need to
be copied again.

Finding a Text String

When editing an existing Member you may want to search for a specific sequence (string)
of characters. ISPF provides a Command Line command to accomplish this. If you were
looking for the character string 'string' you would

type f 'string' on the Command Line and press ENTER. This will find the next
occurrence down from where the cursor is currently positioned in the body of the
Member. occurrences occurring above the position of the cursor are not found. When the
string is found, the cursor is repositioned to the first character of the found string. The
FIND command can be repeated using a standard function key, F5. Press F5 and the
cursor will move to the next occurrence below the current cursor position. If there are no
occurrences below the current cursor position, ISPF will respond with a message that the
end of the data has been reached. If you press F5 again, the search will start at the top of
the Member.

If a search starts at the top of a Member, and no occurrences of the string are found, ISPF
will notify that the string is not found. The repeat FIND for that string will remain active
as long as the edit session is open or until another FIND command is issued.

The FIND command also has several modifiers to make usage more flexible. To find the
first occurrence in the data without regard to the current position of the cursor, type f
'string' first and press ENTER. This will find the very first occurrence in the data or
notify you that the string is not found within the data.

To find the very last occurrence in the data, type f 'string' last and press ENTER. This
will position the cursor on the last occurrence within the data.

To find the last occurrence of the string above the current cursor position,
type f 'string' prev and press ENTER. When using the F5 repeat FIND command with
either the LAST or PREV modifiers the effect is the same as repeating the command with
the PREV modifier, you would find the occurrence of the string immediately previous to
the current cursor position.

When working with data in a tabular format or data that must be in a particular position
within a record, there is a modifier that allows you to find only the occurrences of the
string starting in the specified position in the record or line. To find occurrences of 'string'
starting 11 characters from the beginning of the line, type f 'string' 11 and press
ENTER. This will place the cursor on the next occurrence of 'string' that start in position
11 of a line. The positional parameter can be used in conjunction with the FIRST, LAST
and PREV modifiers. For example to find the last occurrence of 'string' in position 11 of a
line, type f 'string' 11 last and press ENTER.

When using a FIND command, the string found will not necessarily be a stand alone
word. If that sequence of characters is embedded within another word it will still be
found. This is because ISPF treats anything, including spaces, within the Member as data
characters. This implies that you should be as specific as possible when entering the find
command to ensure that the occurrences that are returned are the expected values.
Alphabetic strings can be entered without using the quotation marks but any string that
contains imbedded commas, or contains imbedded spaces must be entered using the
quotation marks. If you are using the POSITION modifier with a numeric string you must
also use quotation marks around the string. If the string has imbedded quotation marks or
apostrophes it must be entered like the example below:

f "'string'" or f "o'riley".

Changing a Text String

It may be necessary to change all occurrences of a word or text string. You may have
misspelled a word or made a typographical error that prevents your program from
compiling. You may correct that error with the Change command.

The CHANGE command is related to and works with the FIND command. The best way
to discuss the change command is to use an illustration. If you wish to change the text
'pgae-counter' to 'page-counter' you would type

c 'pgae-counter' 'page-counter' on the Command line then press ENTER.

This will change the next occurrence of the 'pgae-counter' string from the point in the text
where the cursor is currently positioned. Occurrences before the cursor position are not
changed. What has occurred is that the ISPF editor has issued a FIND command for the
first string entered on the command line. When it finds that string it replaces it with the
second string entered on the command line. The R5 key repeats the search for the next
occurrence and places the cursor there. The R6 key will then repeat the replacement. If
the R6 key is used alone, both the search and the replace will be performed. Just as with
the FIND repeat, the CHANGE repeat will go to the end of the file then start back at the
top of the file.

The modifiers for FIRST, PREVIOUS, LAST and the positional or column modifier are
available for use with the CHANGE command and they behave in the same way as with
the FIND command. Replacement is performed when the appropriate string is found.

There is one other very powerful modifier available with the CHANGE command and its
use requires caution. The ALL modifier changes all occurrences of the string within the
file without asking for confirmation. This includes occurrences of the string that may be
imbedded within another word. The format for the ALL modifier is illustrated below:

c 'string1' 'string2' all

When using this modifier, be very specific on the string being changed. If there

is a chance of changing imbedded strings unintentionally, use repeated R5 and R6


combinations to change down through the file. This takes longer but may avoid problems
that are difficult to repair later.

Edit Line Functions


An ISPF Edit session with an existing Member is illustrated below

File Edit Confirm Menu Utilities Compilers Test Help


----------------------------------------------------------------------
---------
EDIT BA0145.SAMPLE.PROGRAMS(EXAMPLE1) - 01.00 Columns
00001 00072
Command ===> Scroll
===> CSR
****** ***************************** Top of Data
******************************
000100 IDENTIFICATION DIVISION.
000200 PROGRAM-ID. EXAMPLE1.
000300 AUTHOR. JENNIFER STUDENT.
000400 INSTALLATION. UNIVERSITY OF OKLAHOMA.
000500 DATE-WRITTEN. AUGUST 8, 1997.
000600 DATE-COMPILED.
000700
000800 ENVIRONMENT DIVISION.
000900
001000 CONFIGURATION SECTION.
001100
001200 SOURCE-COMPUTER. IBM-3081.
001300 OBJECT-COMPUTER. IBM-3081.
001400 SPECIAL-NAMES.
001500 C01 IS TOP-OF-PAGE.
****** **************************** Bottom of Data
****************************
Notice that on the extreme left side of the screen are line numbers. ISPF provides
commands to operate on single lines and blocks of lines that are entered by overwriting
those line numbers. The most common Line commands are discussed in the following
sections.

Copying a Line

To copy a line within the text, you must determine the source (line to be copied) and the
destination (where you want the copied line placed). Type c over one of the digits of the
line number on the line you wish to copy. You must not be in insert mode when this is
done. It is good practice to type a blank space after the c also for reasons that will be
discussed later. You then need to find the destination for the copy. You can mark this
destination either of two ways: 1) Type a (which stands for "after") over one of the digits
of the line number on the line just before the destination or 2) Type b (which stands for
"before") over one of the digits of the line number on the line just after the destination.
When the source and destination have been marked then press ENTER. This is
illustrated on the next page.

000100 IDENTIFICATION DIVISION.


000200 PROGRAM-ID. EXAMPLE1.
c00300 AUTHOR. JENNIFER STUDENT.
000400 INSTALLATION. UNIVERSITY OF OKLAHOMA.
000500 DATE-WRITTEN. AUGUST 8, 1997.
a00600 DATE-COMPILED.
000700

The result of this operation is illustrated below.

000100 IDENTIFICATION DIVISION.


000200 PROGRAM-ID. EXAMPLE1.
000300 AUTHOR. JENNIFER STUDENT.
000400 INSTALLATION. UNIVERSITY OF OKLAHOMA.
000500 DATE-WRITTEN. AUGUST 8, 1997.
000600 DATE-COMPILED.
000610 AUTHOR. JENNIFER STUDENT.
000700

Notice that the original source line is unchanged.

The copy operation can be used on blocks of lines as well as single lines. The start and
end of the source block are marked by type cc in the number of line that begins the block
and in the number of the line that ends the block. The destination is marked in the same
way as a single line copy, then press ENTER to complete the operation. This is
illustrated below.

000100 IDENTIFICATION DIVISION.


000200 PROGRAM-ID. EXAMPLE1.
cc0300 AUTHOR. JENNIFER STUDENT.
cc0400 INSTALLATION. UNIVERSITY OF OKLAHOMA.
000500 DATE-WRITTEN. AUGUST 8, 1997.
a00600 DATE-COMPILED.
000700

The result is as follows

000100 IDENTIFICATION DIVISION.


000200 PROGRAM-ID. EXAMPLE1.
000300 AUTHOR. JENNIFER STUDENT.
000400 INSTALLATION. UNIVERSITY OF OKLAHOMA.
000500 DATE-WRITTEN. AUGUST 8, 1997.
000600 DATE-COMPILED.
000610 AUTHOR. JENNIFER STUDENT.
000620 INSTALLATION. UNIVERSITY OF OKLAHOMA.
000700

A block can also be marked by determining the number of lines that are included in the
block and (in this example 3) then type c3. Since it is possible to inadvertently mark a
block in this manner when doing a single line copy or inadvertently mark a larger block
than intended, it is good practice to leave a blank space following the commands on the
source line. The destination is marked as in previous examples then press ENTER. If an
unintended operation occurs, the command line UNDO will restore the dataset to the
previous state. The block command with explicit numbers is illustrated below.

000100 IDENTIFICATION DIVISION.


c20200 PROGRAM-ID. EXAMPLE1.
000300 AUTHOR. JENNIFER STUDENT.
000400 INSTALLATION. UNIVERSITY OF OKLAHOMA.
000500 DATE-WRITTEN. AUGUST 8, 1997.
a00600 DATE-COMPILED.
000700

The result of this operation is illustrated below.

000100 IDENTIFICATION DIVISION.


000200 PROGRAM-ID. EXAMPLE1.
000300 AUTHOR. JENNIFER STUDENT.
000400 INSTALLATION. UNIVERSITY OF OKLAHOMA.
000500 DATE-WRITTEN. AUGUST 8, 1997.
000600 DATE-COMPILED.
000610 PROGRAM-ID. EXAMPLE1.
000620 AUTHOR. JENNIFER STUDENT.
000700

Moving a Line

The line commands to move a line within the text are similar in operation to the copy
commands. The principle difference is that while copy leaves the source line intact, move
removes the old source line leaving only the new line at the destination. The move is
accomplished by marking the source line, type m in the line numbers on the source line,
then marking the destination with a or b just as we did with the copy command. The
command is executed when you press ENTER. This is illustrated below.
000100 IDENTIFICATION DIVISION.
m00200 PROGRAM-ID. EXAMPLE1.
000300 AUTHOR. JENNIFER STUDENT.
000400 INSTALLATION. UNIVERSITY OF OKLAHOMA.
000500 DATE-WRITTEN. AUGUST 8, 1997.
a00600 DATE-COMPILED.
000700

The result of this operation is illustrated on the next page.

000100 IDENTIFICATION DIVISION.


000300 AUTHOR. JENNIFER STUDENT.
000400 INSTALLATION. UNIVERSITY OF OKLAHOMA.
000500 DATE-WRITTEN. AUGUST 8, 1997.
000600 DATE-COMPILED.
000610 PROGRAM-ID. EXAMPLE1.
000700

Block commands for move work in the same manner as the copy command with the same
warning on using the space after the line command to prevent inadvertent block
operations. UNDO is also available.

Deleting a Line

Deleting a line is accomplished by the following procedure. Type d over a number in the
line number next to the line to be deleted. Press ENTER to complete the operation. This
process is illustrated below.

000100 IDENTIFICATION DIVISION.


d00200 PROGRAM-ID. EXAMPLE1.
000300 AUTHOR. JENNIFER STUDENT.
000400 INSTALLATION. UNIVERSITY OF OKLAHOMA.
000500 DATE-WRITTEN. AUGUST 8, 1997.
000600 DATE-COMPILED.
000700

The result of this operation is illustrated below.

000100 IDENTIFICATION DIVISION.


000300 AUTHOR. JENNIFER STUDENT.
000400 INSTALLATION. UNIVERSITY OF OKLAHOMA.
000500 DATE-WRITTEN. AUGUST 8, 1997.
000600 DATE-COMPILED.
000700

Block operations are accomplished in the same manner as the copy and move operations
and the UNDO command is available.

Inserting a New Line


To insert a new line within the body of the text, type i on the line just above (before) the
point where the new line should be. Press ENTER to insert the line.

This is illustrated below.

000100 IDENTIFICATION DIVISION.


i00200 PROGRAM-ID. EXAMPLE1.
000300 AUTHOR. JENNIFER STUDENT.
000400 INSTALLATION. UNIVERSITY OF OKLAHOMA.
000500 DATE-WRITTEN. AUGUST 8, 1997.
000600 DATE-COMPILED.
000700

The result of this is illustrated on the next page.

000100 IDENTIFICATION DIVISION.


000200 PROGRAM-ID. EXAMPLE1.
''''''
000300 AUTHOR. JENNIFER STUDENT.
000400 INSTALLATION. UNIVERSITY OF OKLAHOMA.
000500 DATE-WRITTEN. AUGUST 8, 1997.
000600 DATE-COMPILED.
000700

You may then begin typing the new line. As long as you enter some kind of character on
this line (including a space) a new line will be inserted when ENTER is pressed. To stop
insertion, Press ENTER without entering anything on the line.

Insert has a block command ability using the explicit number of lines that you wish to
insert. If nothing is entered on any line then that line will disappear when ENTER is
pressed to complete the operation.

Repeating a Line

Repeating a line is essentially copying a line to a position immediately after the source
line. To repeat a line type r over one the numbers on the line number of the source line
then press ENTER to complete the operation. This operation is illustrated below.

000100 IDENTIFICATION DIVISION.


r00200 PROGRAM-ID. EXAMPLE1.
000300 AUTHOR. JENNIFER STUDENT.
000400 INSTALLATION. UNIVERSITY OF OKLAHOMA.
000500 DATE-WRITTEN. AUGUST 8, 1997.
000600 DATE-COMPILED.
000700

The result of the operation is illustrated below.

000100 IDENTIFICATION DIVISION.


000200 PROGRAM-ID. EXAMPLE1.
000210 PROGRAM-ID. EXAMPLE1.
000300 AUTHOR. JENNIFER STUDENT.
000400 INSTALLATION. UNIVERSITY OF OKLAHOMA.
000500 DATE-WRITTEN. AUGUST 8, 1997.
000600 DATE-COMPILED.
000700

Block operations are available with this command as is the UNDO command.

Submitting a Job
Once you have entered a program into the TSO editor, you must submit the job for
processing by the operating system. To submit a job, type SUBMIT (or SUB) at the
Command prompt:

Command ===> submit

To then track the progress of your job, you should follow a submit command with the
command that takes you to IOF, IOF:

Command ===> iof

Interactive Output Facility (IOF)


In order to reduce the amount of paper resources used, the University of Oklahoma MVS
environment provides a method to view the output of batch submitted jobs without
actually printing the job. The Interactive Output Facility is used to manage the Held
Output Queue. When you execute a program with the clause SYSOUT=* in the output file
DD statement of the JCL, it causes your output to be sent to disk storage in an area
designated as the Held Output Queue. The IOF contains utilities to view and manage that
output.

Designating A Specific Printer For IOF

The DEST/DEVICE field indicates where the print will be routed to when the job is
released from the Held Output Queue. In this example it is ADAMS which indicates that it
will go to the line printer in Adams Hall. Finally the HLDS field indicates how many
sections of output were generated by the job. In this example 6 sections of output were
generated by the job. This parameter is obtained from the JCL card shown below.

/*ROUTE PRINT R15

The parameter R15 means "Remote 15," which is a system code for the Adams Hall
printer. If you are working in a lab outside of Adams Hall and would like to send the
print to that lab, ask the lab assistant what the remote number is for that lab and change
the JCL to route the print accordingly.

Viewing jobs in IOF

When you type =i on the COMMAND line of any screen you will be presented with the
screen shown below.

There are 2 methods of selecting a job to view. First simply type the number that is listed
left of the job on the COMMAND line. To view SAMPLJOB in the example, type 1 on the
COMMAND line and press ENTER. This is illustrated below.

------------------------------ IOF Job List Menu -------------


( 1 )------------
COMMAND ===> 1 SCROLL
===> SCREEN
--------------------------------- Output Jobs
---------------------------------
-------JOBNAME--JOBID--ACT-STA-DEST/DEVICE--------RECS-HLDS-DAY--
TIME--PAGES---
_ 1 SAMPLJOB J00416 MOV ADAMS 6

An alternate method is to type an s next to the position of the job on the list: Type s in the
space to the left of SAMPLJOB and press ENTER. This is illustrated below.

------------------------------ IOF Job List Menu -------------


( 1 )------------
COMMAND ===> SCROLL
===> SCREEN
--------------------------------- Output Jobs
---------------------------------
-------JOBNAME--JOBID--ACT-STA-DEST/DEVICE--------RECS-HLDS-DAY--
TIME--PAGES---
s 1 SAMPLJOB J00416 MOV ADAMS 6

Either action will present the IOF Job Summary screen.

The jobs are listed in order of the JOBID which in this example is J00416. This JOBID is
assigned by the job scheduling software attached to the MVS operating system. These
numbers start over with J00000 each day so that it is possible to have more recent jobs
listed above jobs from a prior day. Keep this caution in mind if you have multiple jobs
that have run over several days. The JOBNAME field corresponds to the jobname on the job
card of the JCL used to submit this job. The job card for this run is listed below. Note that
the entire job card does not need to be included on one line of JCL.

//SAMPLJOB JOB NO1NOZIT,'YOUR NAME',CLASS=K,MSGCLASS=C,


// NOTIFY=LOGONID,USER=RACFUSER,PASSWORD=RACFPASS
Two important things to note: The job name SAMPLJOB appears on the IOF screen
under the JOBNAME heading. If you name your jobs with some descriptive or logical name
it will not only help you to find the correct job on IOF but also help you quickly identify
your printout from others that are sent to the same printer. The second important thing to
note is the NOTIFY= clause. The value of this clause causes the output of a job to be
routed to a particular 'box' in IOF. These boxes correspond to user logon id's. The value
in the example above, NOTIFY=LOGONID, will send this to the box for the userid that
corresponds to the person who logged on to the session that the job was submitted from.
The job can also be sent to another user box by providing the specific id as the value. It is
generally best to leave this value as LOGONID.

Viewing Job Output

The IOF Job Summary screen is illustrated below.

------------------------------- IOF Job Summary


-------------------------------
COMMAND ===> SCROLL
===> SCREEN
--JOBNAME---JOBID--STATUS---RAN/RECEIVED----DAY--------
DEST--------------------
SAMPLJOB J00416 OUTPUT 11:30 9/12/97 TODAY ADAMS
--RC--PGM--------STEP-----PRSTEP---PROC-----
COMMENTS---------------------------
0 IGYCRCTL COB2 COBV2CLG
0 IEWL LKED COBV2CLG
0 COBV2CLG GO COBV2CLG
--------DDNAME---STEP-----PRSTEP---STAT-ACT-C-GRP-SIZE-U--
DEST-----------------
_ 1 LOG * HELD C 37 L
_ 2 JCL * HELD C 45 L
_ 3 MESSAGES * HELD C 118 L
_ 4 SYSPRINT COB2 HELD C 286 L
_ 5 SYSPUNCH COB2 DONE B
_ 6 SYSPRINT LKED HELD C 21 L
_ 7 SYSOUZ GO DONE C
_ 8 SYSDBOUT GO DONE C
_ 9 SYSABOUT GO DONE C
_ 10 SYSPUNCH GO DONE B
_ 11 SYSOUT GO DONE C
_ 12 PRTFIL GO HELD C 10 L
_ 13 PASSWORD SAMPLJOB DONE A

This particular job is an execution of a sample COBOL program using the compile and
run PROC COBV2CLG. A PROC (procedure) is a collection of JCL statements that are
stored and run as if they were a single program. Statements within COBV2CLG cause a
COBOL source code file to be compiled and the resulting object code executed before
deleting the object code.
The first line of information on the IOF Job Summary screen shows the JOBNAME, JOBID,
and print DEST that were shown on the Job List Menu. Also shown here are the job
STATUS and the time and date that the job was executed. This information is valuable in
determining the correct job to view.

When the JCL is written for a job, each program executed is organized into a job step.
Each step is given a name. The programs executed and the corresonding steps are shown
in the next block of information. The number at the left of each line is a return code for
that step. The return code is generated when the step is executed and indicates whether a
normal execution took place. A return code of 0 means normal execution. Common
errors will be ABND (ABEND or abnormal end) and NCAT2 (Not Cataloged error 2). This
line also notes the PROC name if the steps were included within a PROC. The comments
area will usually contain a brief error message if the step did not execute normally.

The main section of the the Job Summary screen lists sections of output produced by the
execution of the job. The names listed for these sections correspond to the names in the
DD statements of the JCL. The step name indicates the step with which the DD statement
was associated. A status of HELD indicates that there is output to view associated with that
line.

There are 2 methods of selecting the element of the job output you wish to view. First
simply type the number that is listed left of the job on the COMMAND line. Or, again, you
can Type s in the space to the left of the appropriate output entry and press ENTER.

Here is an explanation of the significant entries in the above screen shot.

DDNAME STEP Description

LOG *
Statistics regarding the start and stop times of the job, amount of CPU
time used, and various accounting figures.
JCL * The JCL you submitted, in a form processed by the system.

MESSAGES *
Itemized description of the actions of the compiler, including allocation
of memory and storage space.
A copy of the COBOL source listing, after being processed by the
SYSPRINT COB2 system. This is where you will find many answers as to why your
programs are not working.

Releasing Jobs to the Printer

At any time after a job submission, you may send the output to the printer specified by
the ROUTE statement in your JCL (A list of codes is coming soon). There are 2 methods of
selecting the element of the job output you wish to release. First, simply type the number
that is listed left of the job on the COMMAND line, followed by the letter r. Or, you can Type
r in the space to the left of the appropriate output entry and press ENTER:
------------------------------ IOF Job List Menu -------------
( 1 )------------
COMMAND ===> 1 r SCROLL
===> SCREEN
--------------------------------- Output Jobs
---------------------------------
-------JOBNAME--JOBID--ACT-STA-DEST/DEVICE--------RECS-HLDS-DAY--
TIME--PAGES---
r 1 SAMPLJOB J00416 ADAMS 5

Note that you may also release your job from the IOF Job Summary screen. You can also
release individual components of your job from the Job Summary Screen.

You can also "stack up" release commands. For example, if you wanted to print jobs 1-5,
you could type "1-5 r" at the COMMAND line.

Canceling Jobs

From time to time, you may want to cancel jobs that may have not compiled correctly,
and/or those you chose not to release to the printer. There are 2 methods of selecting the
element of the job output you wish to cancel. First, simply type the number that is listed
left of the job on the COMMAND line, followed by the letter c. Or, you can Type c in the
space to the left of the appropriate output entry and press ENTER:

------------------------------ IOF Job List Menu -------------


( 7 )------------
COMMAND ===> 5 c SCROLL
===> SCREEN
--------------------------------- Output Jobs
---------------------------------
-------JOBNAME--JOBID--ACT-STA-DEST/DEVICE--------RECS-HLDS-DAY--
TIME--PAGES---
_ 1 SAMPLJOB J00818 ADAMS 5
_ 2 SAMPLJOB J02665 ADAMS 6
_ 3 SAMPLJOB J02666 MOV ADAMS 6
_ 4 SAMPLJOB J02667 MOV ADAMS 6
_ 5 SAMPLJOB J02668 MOV ADAMS 6
_ 6 SAMPLJOB J02669 MOV ADAMS 6
_ 7 SAMPLJOB J02670 MOV ADAMS 6

Note that you can "stack up" cancelling commands. For example, if you wanted to cancel
jobs 1-5, you could type "1-5 c" at the COMMAND line.

You might also like