Effective Spring 2002

Version 1.9.1



This book has been designed to take you on a tutorial trip through the process of creating and submitting a program to the mainframe using the MVSBATCH facility. This book covers the basics necessary for creating a program file, editing existing program files, submitting program files as mainframe jobs, fetching executed jobs, managing programs and fetched jobs, and using predefined utilities for additional mainframe file management. This manual has been designed for you to take to the lab and self-learn the system. After the initial session, you can use this manual for future reference.



If not already on, the computer and monitor must be turned on. Usually the switch on the monitor is on the right side near the top. The switch to turn on the computer is usually on the front of the CPU (central processing unit) on the right side. Flip this switch up to turn on the machine. The machine will go through a series of steps to attach to the network server and then ask you a sequence of questions to complete the log on process. NOTE: Depending upon the machine that you are working with, the on/off switches may be in a different location than the one stated above. If you have trouble locating the on/off switches on either the monitor or CPU, ask the lab attendant for help.


Log on procedures are outlined in the Using the Computer Science Student Computer Facilities.

Refer to this document and any instructions provided by your instructor. The log on process is a two step process. First you must log on to the network and second you must provide information that allows the MVSBATCH facility to log into MVS when needed. Providing this information does not mean that you are actually logged in to MVS. This manual will now illustrate the screen sequence that you will see. The screen examples found here are the ones which require user responses. Intermediate screens have been excluded.


Refer to the Using the Computer Science Student Computer Facilities document for the correct procedures for logging into NIU's computer network and choosing the appropriate operating system and class application set.

Once you have chosen your class application set, you may run MVSBatch. Use one of the following instruction sets to run MVSBatch

A. To run MVSBatch from the CSL Main Menu under Dos,

Use the ARROW keys to move the color bar to highlight selection 'A' and press ENTER or type the letter 'A' and press ENTER.

B. To run MVSBatch from Windows,

C. To run MVSBatch from Windows 95,


At this point you will see the MVSBATCH Welcome screen. The purpose of this screen is to gather user information required to log into MVS to submit programs or fetch output. When you have provide the requested information, MVSBATCH will attempt to momentarily log into MVS to confirm the accuracy of the information provided. However, during most your MVSBATCH session, you are NOT actually logged into MVS. MVSBatch will reconnect to MVS when needed.

MVS password authentication is performed via Novell's password authentication system, therfore your MVS password will be the same as your Novell login password..


At the Logonid prompt, type in the Z9????? number that was assigned to you. This is the same logonid number that was used to log on to the network. Once you have typed in your logonid number, press the TAB key to bring the cursor down to the password prompt.


Use your Novell password for MVS access. If you wish to change your password at any time, you should do so by changing your Novell password. The change automatically be recognized by MVS. The lab aids will be able to help you with changing the Novell password.


Each user has been given storage space on the file server on the f: drive. You will notice that the location of this storage is specified on the screen. This path may vary depending on which operating system and application set you chose during your network login.

You are permitted to change this and might want to save your files to a different subdirectory or on your own 3.5 inch disk. This way you can keep a copy of your files and edit the files on a computer at another location. Changing you directory is described later..

Additionally, facilities for managing files on 3.5 inch diskettes are available on each operating system.


The following is an example of how the log on screen will look.

Note that the user's password will not show up on the actual MVS Batch screen. Make sure you have logged in to the Novell server in the lab and changed your password before running MVSBatch for the first time. If you are accessing MVSBatch from the lab, you will have already done so. If you running MVSBatch from home, login will fail if you have not logged into Novell from a lab at least once.


At this point you will see the MVSBATCH main menu. It looks similar to the following:

We will take each selection one by one and explore its function. To make a selection simply type the number or letter of the required function. You may also use the ARROW keys to move the white bar to highlight the desired selection.

This selection displays the Miscellaneous items menu. Now select '4.' :

This selection displays the Change MVS Batch Facility options menu. Now select '1.'

While it may be possible to change your MVS password through the MVSBatch facilities, it is strongly recommended that you instead change your Novell password. The change will be recognized by MVS. Remember that MVS requires that the password be between 5 and 8 characters long. Make it something that is easy to remember but not obvious. For example, do not make it your name, birth date or anything else that can be easily identified with you as the logonid owner.

1. Create a new JCL file

When you want to type a new file, from the main MVSBatch menu, select 1. This will show you the following screen:

You will type in the name of the file that you want to create. The file name must consist of a name which must be between 1 and 8 characters long, then a period, and then a three character extension. The system is set up so that the extension must start with the letters JC, the third letter can be of your choosing, ie: JCL.

After specifying the name, the editor VEDIT will be invoked. Using this editor you will type in your file. We will discuss the editing process in a later section of this manual.

After ending the edit session, if you are not already at the MVS Batch main menu, press ESC to return to the MVS Batch main menu.

2. Edit an existing JCL file

When you already have existing files that you have been working on and you want to edit one of those files, take selection 2. This should bring up a list of the files names with the extension JC? that are located in your work directory. Use the ARROW keys to highlight the name of the file that you want to edit. Then press ENTER. This will take you into the editor so that you can continue working on this particular file.

3. Submit a job file to MVS for fetch

Once a file has been created and the source code is ready to be tested, you must submit the file to MVS for execution. Take selection 3. This will check the work directory for all of the files with the proper extension. Use the ARROW keys to highlight the file that you want to execute. Press ENTER.

After the file has been selected and submitted, the system will return to the main MVSBatch screen. Notice, however, that the MVS jobs listing has changed. Each file that is submitted is called a job. Each job, when submitted, has a number. The MVS jobs category will tell you the status of all of your jobs. For example if several jobs have been submitted you might see:

The 'i' after the job number means that the job is waiting its turn to execute. The 'w' means that a copy of the output from the job is located in the work directory. The work directory can be located on the file server or on a floppy disk. The default is on the file server; however, you may change this through the menu selection sequence under the main menu selection.

After submitting the required files, if you are not already at the MVS Batch main menu press ESC to return to the main menu.

4. Update MVS batch job status.

This selection simply checks the current status of all of your jobs and updates the MVS jobs category at the bottom of the screen. For example:

Notice that job number 9215 now is followed by a 'u'. In the last example it was followed by an 'i'. The 'u' means that the job has finished executing and is waiting for you to retrieve or fetch the output from MVS and store it in your work directory.

5. Fetch the output of an MVS batch job

In order to be able to look at the output of the jobs which you have submitted to MVS, you must retrieve, or fetch, the output. When this selection is taken you will see a screen similar to the following:

Use the ARROW keys to highlight the job number that you want. Press ENTER. If you wish you may select more than one job at a time. Highlight each job number that you want by pressing the SPACE BAR. When all job numbers have been selected, press ENTER.

Fetching a job places a file in the work directory under the job number with an extension of X. For example, the output for job number 9215 would be in the file J9215.X in the work directory.

When MVS Batch returns from fetching the job, notice that the status of job 9215 in the current job category has changed.

If you are not already at the MVS Batch main menu press ESC to return to the main menu.

6. Display MVS job output file

This menu selection is used to view the output of a fetched job. The system will list all of the job files in the work directory. Selecting

from the main menu, will display the following screen.

Use the ARROW keys to select the job number of the output that you would like to look at. Press ENTER.

A special type of viewer called a browser allows you to look at the contents of the output file. You may notice that the lines in the output are too long to fit on the screen. Use the RIGHT or LEFT ARROW keys to move the screen to the right or left in order to see an entire line.

The PAGE UP and PAGE DOWN keys will scroll the output on the screen up or down an entire screen at a time. The UP and DOWN ARROW keys will scroll the screen up or down one line at a time.

For more explicit instructions about using the browser press F1 for help.

Press F10 to exit the browser and go back to the job selection screen. From here, if you are not already at the MVS Batch main menu, press ESC to return to the main menu.

7. Submit a JCL file to MVS for print

Once you have reached a point where you want to print the output of a file, you must submit the job and select a printer on which to print the program and its output. Note that this does not have to be the printer that you selected when you logged on the student network. The first part of this operation is very similar to when you simply submitted a job for execution and then fetched the output in order to look at it using the browser. This time you will select a file to execute but the output will not come back to the fetch queue, instead it will go to the specified printer.

Start by selecting

from the main menu. Next, when the following screen appears, use the ARROW keys to select the file that you wish to execute. Press ENTER.

You will then see a screen similar to the following where you will use the ARROW keys to highlight the correct printer. Press ENTER.

Once you have selected the desired print location, you are given the option of correcting the printer selection.

At this point if you press ENTER, it will submit and print the job and then go back to the MVS Batch main menu. Notice that a new job number has been added to the MVS jobs category.

If you type no, you will again end up back at the MVS Batch main menu.

8. Purge an MVS batch job

This selection lists all of the job numbers of jobs that are still in the fetch queue. You will want to keep this clear of any unnecessary jobs. Select

from the main menu. Next, Use the ARROW keys to highlight the number of the job that you wish to delete. Press ENTER.

After the job has been deleted you will end up back at the MVS Batch main menu.

9. Delete a MVS output file

If you leave the old output files from your jobs in the work directory you will begin to run out of space. Select

from the main menu.

Use the ARROW keys to highlight the job number of the output file to delete. Then press ENTER.

If you had selected job 6040, you would then get the message:

At this point, press the space bar to return to the MVS Batch main menu.

M. Miscellaneous items (macros, options, etc.)

The miscellaneous items selection brings up a sub-menu which will allow you to do a variety of functions.

? Display the latest MVS Batch Facility News

The more experienced user might want to read this to learn more about MVS Batch and any possible short cuts that have not been covered in this manual.

X. Exit the MVS Batch Facility

Choose this selection to leave MVS Batch and return to the network menu.



1. If you accessed MVSBatch through the CSL Main Menu, upon exiting MVSBatch, you will again be at the CSL Main Menu.

To log off the network, select

E. Close Your Current Session.

from the menu.

2. If you accessed MVSBatch through Windows, upon exiting MVSBatch, you will again be at the main Windows window.

To log off the network, exit Windows

a. if you had entered Windows from the CSL Main Menu, select

from the menu.

b. if you had entered Windows directly after selecting you class applications, you will automatically be logged out.