STREAM [ HP 3000 Series 9X8LX Computer Systems Commands Reference ] MPE/iX 5.0 Documentation
HP 3000 Series 9X8LX Computer Systems Commands Reference
STREAM
The STREAM command submits a batch job for execution. The batch job runs
independently of your session, which enables you to continue working at
your terminal while the batch job is running.
You can also use this command in conjunction with the DATA command to
submit data to the system from a device file.
Syntax
[ {day-of-week }]
STREAM [filename][,char] [;AT = timespec][;DAY = {day-of-month }]
[ {days-until-month}]
[;DATE = datespec][;IN = [days[,[hours][,minutes]]]]
Parameters
filename Specifies the ASCII file containing the job
commands. The first character of the first record
is assumed to be the replacement character for the
expected colon (:) that identifies commands. You
must have read (R) and lock (L) or execute (X) file
access in order to specify this parameter.
char Identifies MPE/iX commands within the input file.
It is a character that substitutes for a colon (:).
When you enter the input file on a device
configured to accept jobs or sessions, this
character can be any ASCII non-alphanumeric
character except a colon. The default is an
exclamation point (!).
AT Specifies the absolute time of day. Execution
begins in the format HH:MM, where HH is the hour of
the day (0<=HH<=24) and MM are the minutes of the
hour (0<=MM<=60). If you do not specify DAY and
DATE, then:
timespec < NOW---> JOB LOGON TOMORROW
timespec > NOW---> JOB LOGON TODAY
timespec = NOW---> JOB LOGON IMMEDIATELY
WITH EXPLANATORY MESSAGE
DAY Specifies the absolute day in one of the following
forms:
day-of-week Indicates the day of the
week. Permissible values are
SUN[DAY]
MON[DAY]
TUE[SDAY]
WED[NESDAY]
THU[RSDAY]
FRI[DAY]
SAT[URDAY]
day-of-month Indicates the calendar day of
the month expressed using the
integers 1 through 31. If
day-of-month is greater than
or equal to the current
day-of-month, the current
month is the default. If
day-of-month is less than the
current day-of-month, the
day-of-month is deferred
until the same day of the
next month. An error message
is generated if the
day-of-month does not
correspond to the month (for
example, if you enter 31 for
February). If you omit
day-of-month, the current
date is used.
days-until- month Indicates days until the end
of the month expressed using
the negative integers -31
through -1. The chosen
number specifies the calendar
day from the end of the
specified month when the job
will run. For example, a -1
value represents the last day
of the month. If the
specified day from the end of
the month indicates a day
earlier than the current day,
the next month is assumed.
For example, if today is the
seventh day from the end of
the month and you enter a -8
value, the job is scheduled
for the eighth day from the
end of the next month.
DATE Specifies the absolute date in the format mm/dd/yy,
where mm is the month (1<=mm<=12), dd is the day
(1<=dd<=31), and yy is the year. If you omit this
parameter, the current date is used.
IN Specifies the relative date or time in one of the
following forms:
days Indicates the number of days
from the current date
expressed as a positive
integer.
hours Indicates the number of hours
from the current time
expressed as a positive
integer (0<hours<=23). If
you omit this parameter, zero
is used.
minutes Indicates the number of
minutes from the current time
expressed as a positive
integer (0<=minutes<=59). If
you omit this parameter, zero
is used.
Operation Notes
* Usage
You can enter this command from a session, a job, a program, or in
break mode. Pressing Break during an interactively streamed job
aborts execution of the job.
* Requirements
You must have read (R) and lock (L) or execute (X) file access in
order to stream jobs. The system administrator should assign
general users only X access, because R and L access would allow
general users to obtain security information within the file, such
as passwords and lockwords.
You can initiate stream jobs only if the system administrator has
enabled the stream facility by entering the STREAMS console
command.
* Creating a job stream
To create a job file for streaming, do the following:
1. Enter the following command to invoke the EDIT subsystem:
:EDITOR
2. Enter the ADD command, then add job file commands, as
shown:
/ADD
1 !JOB SMITH,USER.TECH
2 !COMMENT THIS JOB RUNS THE MONTHLY UPDATE PROGRAM
3 !FILE INPUT01=TRANS.DATA.ENGR
4 !FILE MASTER;DEV=TAPE
5 !FILE OUTPUT=NEWFILE.PUB.TECH
6 !RUN UPDPROG
7 !EOJ
8 //
Note that the first command is the JOB command and that an
exclamation point (!) precedes each command.
3. Enter the KEEP and END commands to save your file and
terminate the EDITOR subsystem:
/KEEP MYJOB,UNN
/END
* Scheduling streamed jobs
When you schedule a job for future execution, it enters the SCHED
state. When the specified time arrives, the job enters and
remains in the WAIT state until the system allows the job to
execute. You can specify the time a job is to enter the WAIT
state in absolute or relative time. The differences are as
follows:
Absolute You specify an exact time for the job using
the AT parameter with or without the DAY or
DATE parameter.
Relative You specify a time offset from the current
time using the IN parameter.
If the time that you specify is the same as the current time, your
streamed job logs on immediately. If the time that you specify is
earlier than the current time and you do not specify DAY and DATE,
a warning message is generated, and the job is scheduled for the
specified time tomorrow; otherwise, you can specify any time in
the current century. Because of the limited recoverability of
scheduled jobs, it is recommended that you schedule jobs no more
than a few days in advance.
If you specify DAY or DATE for a job, but do not specify a time,
the job does not enter the WAIT state at midnight on the specified
day. Instead, the job uses the time when the STREAM command
executes and enters the WAIT state at that time on the specified
day.
If the system does not detect any errors, a job ID appears on your
screen. If you include more than one job in the input file, the
system assigns each job a unique job ID and schedules all of the
jobs at the same time.
* Redirecting the listing device
If you want the job listing to appear on a device other than the
standard listing device associated with the streaming device, you
can specify this other device using the JOB command as shown:
!JOB USER.TECHPUBS;OUTCLASS=12
* Terminating interactively streamed jobs
To terminate interactive job input, enter a colon (:). The system
responds by displaying the command interpreter prompt:
>: ** Denotes end of batch job input **
: ** MPE/iX prompts for next command **
Pressing Break aborts the execution of this command and any job
currently being entered through the command. Incompletely spooled
disk space returns to the system.
* Terminating scheduled streamed jobs
You can use the ABORTJOB command to terminate jobs that you have
scheduled for STREAM execution. Refer to the ABORTJOB command for
information on its usage.
* Rescheduling system-terminated streamed jobs
If the system fails or is intentionally stopped, your stream jobs
may be saved or deleted, depending on the method used to restart
the system. If you have scheduled a job for execution earlier
than the system restart, the job enters the WAIT state and
executes when the system parameters allow it to execute.
After the system is restarted, you should first enter the SHOWJOB
command to display the scheduled jobs. Reschedule your stream
jobs that do not appear as scheduled jobs.
Examples
The following examples assume that the current date and time are Monday,
June 10, 1991 at 12:00 pm. The examples also assume that the input file,
named JOBFILE, contains a valid STREAM job.
* To introduce JOBFILE immediately, enter:
:STREAM JOBFILE
* To introduce JOBFILE at 8:00 am, Tuesday, June 11, enter:
:STREAM JOBFILE; AT=8:00
* To introduce JOBFILE at 8:00 pm, Monday, June 10, enter:
:STREAM JOBFILE; AT=20:00
* To introduce JOBFILE in eight hours, at 8:00 pm, Monday, June 10,
enter:
:STREAM JOBFILE; IN=,8
* To introduce JOBFILE in one day plus eight hours, at 8:00 pm,
Tuesday, June 11, enter:
:STREAM JOBFILE; IN=1,8
Sometimes you may enter a stream job intending it to be introduced at a
certain time, but the system interprets your entry differently than your
intentions, as illustrated in the following examples:
STREAM JOBFILE; DAY=MON; Since the time specified (8:00 am) is earlier
AT=8:00 than the current time, JOBFILE will be
introduced at 8:00 am, Monday, June 17.
STREAM JOBFILE; DAY=5 Since the day of the month (5) is earlier than
the current day (8), the next month is assumed.
Since no time was specified, JOBFILE will be
introduced on Saturday, July 6, at 12:00 pm.
STREAM JOBFILE; DAY=31 Since June 31 does not exist, the next month is
assumed. Since July 31 does exist, this is a
legal command. JOBFILE will be introduced on
Wednesday, July 31, at 12:00 pm. If July 31
did not exist, this command would cause an
error.
STREAM JOBFILE; DAY=-2 The -2 means the second to last day of the
month, and since no time was specified, the
current time is used. JOBFILE will be
introduced on Sunday, June 30, at 12:00 pm.
STREAM JOBFILE; DAY=-25 The -25 means the twenty-fifth day from the end
of the month. If one assumes the current
month, that implies June 6, but June 6 is
earlier than the current day; therefore, the
next month is assumed. JOBFILE will be
introduced on Sunday, July 7, at 12:00 pm.
STREAM JOBFILE; Since the specified time is earlier than the
DATE=6/8/87; AT=8:00 current time, this command is not permissible,
and it causes an error.
STREAM JOBFILE; The specified time is later than the current
DATE=6/8/87; AT=20:00 time, so this command is permissible. JOBFILE
will be introduced on Monday, June 10, at 8:00
pm.
Related Commands
ABORTJOB
JOB
LISTSPF
SHOWJOB
STREAMS
MPE/iX 5.0 Documentation