HP 3000 Manuals

Creating a Job File [ Using Your System The User's Guide ] MPE/iX 5.0 Documentation


Using Your System The User's Guide

Creating a Job File 

Until now your logon time has been in session mode.  In session mode, the
computer acts on a single command at a time; however, in job mode or
batch processing, you use the STREAM command to submit an entire series
of commands as a batch file or job file to the computer.

To look at a sample job file 

In this section, you practice with sample job files to see how job files
are organized and what kinds of commands are used within these files.

Below is a sample job file.  This file contains examples of commands used
in this section.
________________________________________________________________________
|                                                                      |
|                                                                      |
| LINE   TEXT                                                          |
|  1     !JOB MYJOB1,USER1.PRACTICE,PUB                                |
|  2     !FILE EDLIST;DEV=LP,8                                         |
|  3     !EDITOR                                                       |
|  4     TEXT FILE2.PRACTICE                                           |
|  5     LIST ALL MYJOB1, OFFLINE                                      |
|  6     EXIT                                                          |
|  7     !TELL USER1.PRACTICE FILE2 IS DONE                            |
|  8     !EOJ                                                          |
|                                                                      |
________________________________________________________________________

            

Every job file must contain a few specific commands.  A job file must
start with a JOB command.  The purpose of the JOB command is to initiate
a batch job.  It is always the first executable line of any job and
contains additional information regarding the location of the file
materials, user names, and account names.  Much like the HELLO command,
the JOB command is to batch processing what the HELLO command is to
interactive processing.

By using the required and optional parameters of the JOB command, you
tell the system that the commands that follow should be executed as a
job.

To include a JOB command line 

Follow these steps to create a job file:

   1.  Enter EDIT/3000 to begin typing the text for your job file:

            :EDITOR 

       At the slash prompt (/), type ADD.

   2.  On the first text line, type the JOB command preceded by an
       exclamation point (!).  Do not press Return yet.

            !JOB 

       Press the space bar once and add the following to the same line:

          a.  An optional file name followed by a comma.  To identify
              your job file, put your initials in the job name.  For
              example, type:

                   MYJOBNM, 

          b.  After the command, type the user name, account name, and
              logon group name.  If you have passwords, you must include
              them.  Type:

                   USER1.PRACTICE,PUB 

       You have completed the first command line in your job file.  Your
       screen should look like this:
________________________________________________________________________
|                                                                      |
|                                                                      |
|  1    !JOB MYJOB1NM, USER1.PRACTICE,PUB                              |
|                                                                      |
________________________________________________________________________

            

Continue creating the job file by following the directions for the file
equations in the section below.

To defer output to a file 

Job files generally include file equations to direct error listings and
job output to other devices.  The purpose of file equations is to do the
following:

   *   Write the job's output to a file designated by EDTLIST. (EDTLIST
       is the editor's formal file designated for the offline listing
       device.)

   *   Designate the printer to which your job file will print.

   *   Set the print priority for your job file.

Add line 4 now by entering:

     !FILE EDTLIST;DEV=LP,8 Return 

Your screen displays the following:
________________________________________________________________________
|                                                                      |
|                                                                      |
| 1     !JOB MYJOB1NM, USER1.PRACTICE,PUB                              |
| 2     !FILE EDTLIST;DEV=LP,8                                         |
| 3     _                                                              |
|                                                                      |
________________________________________________________________________

            

To use other commands in job files 

Some jobs might use a word processor or other applications or utilities
(for example, EDIT/3000 or SORT/3000).  Any application that is normally
executed from a system prompt can be included in a job file preceded by
an exclamation point.  For example, line 3 of the sample job file starts
the editor.

Any application command that will be used in the job file, is entered on
a separate line.  Enter these commands in the same manner that you would
if you were running the application interactively.  Press Return and go
to the next line.

Add the following commands to the job file.  (Press Return after each
lines.)

     !EDITOR 
     TEXT YOURFILE.PRACTICE 
     LIST ALL, OFFLINE 
     END 

What does this mean?

   *   The EDITOR command tells the system that EDIT/3000 is the
       application that you want.

   *   TEXT YOURFILE.PUB.PRACTICE tells the system to open a file named
       YOURFILE file in the PUB group of the PRACTICE account.

   *   LIST ALL, OFFLINE tells the system to print the YOURFILE file.

   *   The END command tells the system to exit the editor.

Your screen should look like this:
________________________________________________________________________
|                                                                      |
|                                                                      |
| 1     !JOB MYJOB1NM, USER1.PRACTICE,PUB                              |
| 2     !FILE EDTLIST;DEV=PP,8                                         |
| 3     !EDITOR                                                        |
| 4     TEXT YOURFILE.PUB.PRACTICE                                     |
| 5     LIST ALL, OFFLINE                                              |
| 6     END                                                            |
| 7     _                                                              |
|                                                                      |
________________________________________________________________________

            

You have ended the internal set of commands for the application that this
job will open and use; however, you have not yet completed creating your
job file.

To include a TELL command line 

The TELL command can be used to send a message to your terminal screen
saying that a particular job has finished processing.

Add the TELL command line now at line 7.  Enter

     !TELL USER1.PRACTICE MYJOB1NM IS DONE  Return 

Your screen should look like this:
________________________________________________________________________
|                                                                      |
|                                                                      |
| 1     !JOB MYJOB1NM, USER1.PRACTICE,PUB                              |
| 2     !FILE EDTLIST;DEV=LP,8                                         |
| 3     !EDITOR                                                        |
| 4     TEXT YOURFILE.PUB.PRACTICE                                     |
| 5     LIST ALL, OFFLINE                                              |
| 6     END                                                            |
| 7     !TELL USER1.PRACTICE MYJOB1NM IS DONE                          |
|                                                                      |
________________________________________________________________________

            

To include the EOJ command line 

The EOJ (End of Job) command terminates a job and displays the following
information on the job's printout:

   *   CPU time (in seconds)

   *   time elapsed since the beginning of the job

   *   the time and date that the job ended

The EOJ command always appears on the last line of a job file.

Add the EOJ command now.  Enter:

     !EOJ Return 

You have now completed the text for a job file.  Leave the ADD mode by
entering two slashes (//) at the last line.

Type LIST ALL at the slash prompt.
Your screen should look like this:
________________________________________________________________________
|                                                                      |
|                                                                      |
| 1     !JOB MYJOB1NM, USER1.PRACTICE,PUB                              |
| 2     !FILE EDTLIST;DEV=LP,8                                         |
| 3     !EDITOR                                                        |
| 4     TEXT YOURFILE.PUB.PRACTICE                                     |
| 5     LIST ALL, OFFLINE                                              |
| 6     END                                                            |
| 7     !TELL USER1.PRACTICE MYJOB1NM IS DONE                          |
| 8     !EOJ                                                           |
| 9     //Return                                                       |
| ...                                                                  |
|                                                                      |
|                                                                      |
| /                                                                    |
|                                                                      |
________________________________________________________________________

            

Use the KEEP command to save this file.  Enter:

     /KEEP MYJOB1NM Return 

To stream a job 

Now you have a job file to execute.  The process of doing this is called
streaming a job.  This is accomplished with the STREAM command.  The
STREAM command has options that allow you to actually specify the time
and date that you wish a job to run.  Refer to chapter 6 for information
about these commands.

Try streaming the file named MYJOB1NM. If you are still in the editor,
you must enter a colon before the command name, /:STREAM MYJOB1NM. Enter:

     :STREAM MYJOB1NM Return 

Watch for the job number that appears on your screen (Jxxx).  This number
identifies your job file.  MYJOB1NM immediately enters the job queue and
print when the system printer is available.

To schedule a job 

Now suppose you want to stream your job late at night at a specific time.
You can specify the time, the day, and the date with the scheduling
options of the STREAM command.

There are several options that you can specify when using the STREAM
command:

STREAM jobname;AT=                 lets you specify a time to run the job

              ;DAY=                lets you specify a day to run the job

              ;DATE=               lets you specify a date to run the job

              ;IN=                 lets you specify a relative time, day, or date to
                                   run the job (for example, two hours from now, or
                                   two days from now.)

To schedule a job at a specific time.   

To schedule a job at a specific time, use the AT option of the STREAM
command.  Try scheduling MYJOB1NM to run tomorrow at 3:00 am.  Enter:

     :STREAM MYJOB1NM; AT=03:00 Return 

Remember to enter the time of day in 24-hour notation.

To schedule MYJOB1NM to run tomorrow at 3:00 pm, enter:

     :STREAM MYJOB1NM; AT=15:00 Return 

To schedule a job on a specific date.   

You can schedule your job on a specific calendar date with the DATE=
option of the STREAM command.  The format is the month (mm), day (dd),
and the year (yy).  For example, to schedule MYJOB1NM to run on a
specific date, enter:

     :STREAM MYJOB1NM;DATE=04/05/91 Return 

To schedule a job for a specific number of days, hours, or minutes.   

The IN= option of the STREAM command allows you to schedule a job to be
streamed in a number of days, hours, and minutes.  You can use a positive
integer for the number of days.  For the number of hours, use a number
from 0 to 23.  For the number of minutes, use a number from 0 to 59.  For
example, try scheduling MYJOB1NM to run in 5 days and 1 hour from the
time that it is streamed.

Enter:

     :STREAM MYJOB1NM;IN=5,1 Return 

To change this to today and 15 minutes from now, enter this now:

     :STREAM MYJOB1NM 

Because this job is now scheduled but not yet executed, you can see its
job number and other information with the SHOWJOB command.

To stop a scheduled job.   

If you have scheduled a job and later decide not to stream it, you can
prevent it from starting.  To see how to do this, try these steps now.

Repeat the stream command for MYJOB1NM as you did previously.  Do this a
few times with different values of minutes.  Enter:

     :STREAM MYJOB1NM;IN=,,10 Return 
     :STREAM MYJOB1NM;IN=,,20 Return 

(Remember to record each respective job number.)

Now use the SHOWJOB command to see a list of these and any other
scheduled jobs.  Enter:

     :SHOWJOB JOB=@J 

Try to stop the second job.  Use the ABORTJOB command and the second job
number in the list under the far left column of the display.  For job
number #J33, you would enter:

     :ABORTJOB #J33 

Again, try SHOWJOB JOB=@J to see that the job that you aborted has been
removed from the list of scheduled jobs.



MPE/iX 5.0 Documentation