STREAM [ MPE/iX Commands Reference Manual Volume I ] MPE/iX 5.0 Documentation
MPE/iX Commands Reference Manual Volume I
STREAM
Spools batch jobs or data from a session or job. The optional
time-related parameters of the STREAM command may be used to schedule
jobs.
The time-related parameters are ignored when the STREAM command is
applied to the DATA command, however.
Syntax
[ {day-of-week }]
STREAM [filename][,char] [;AT = timespec][;DAY = {day-of-month }]
[ {days-until-month}]
[;DATE = datespec][;IN = [days[,[hours][,minutes]]]]
Parameters
filename The Editor (ASCII) file containing the commands of
the job. The first character of the first record
is assumed to be the replacement character for the
expected colon (:) that identifies MPE/iX
commands. The user must have READ and LOCK access
or EXECUTE access.
char Character used in place of colon (:) to identify
MPE/iX commands within the input file. When the
input file is entered on a device configured to
accept jobs or sessions, this character can be any
ASCII special (nonalphanumeric) character except a
colon. Default is an exclamation point (!).
AT Absolute time specification.
timespec Time specification. This is the absolute time of
day in the format
HH:MM where HH is the hour of the day (0<=HH<=24)
and MM is the minutes of the hour (0<=MM<=60).
If DAY and DATE are not specified, then:
timespec < NOW---> JOB LOGON TOMORROW
timespec > NOW---> JOB LOGON TODAY
timespec = NOW---> JOB LOGON IMMEDIATELY
WITH EXPLANATORY MESSAGE
DAY Absolute day specification.
day-of-week Day-of-week. Allowable values are:
SUN[DAY]
MON[DAY]
TUE[SDAY]
WED[NESDAY]
THU[RSDAY]
FRI[DAY]
SAT[URDAY]
day-of-month Day-of-month. The integers 1 through 31. It
indicates the calendar day of the month. If
day-of-month is greater than or equal to the
current day-of-month, the current month is
indicated. If day-of-month is less than the
current day-of-month, the next month is indicated.
An error message is generated if the day-of-month
does not correspond to the month (for example, if
31 is entered for February). If day-of-month is
omitted, the current date is used.
days-until- month Days until the end of the month. The negative
integers -31 through -1. It indicates the calendar
day from the end of the specified month on which
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 a -8 value is
entered, the job is scheduled for the eighth day
from the end of the next month.
DATE Absolute date specification.
datespec Date, specified 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 omitted, the current date
is used.
IN Relative date or time specification.
days Days. A positive integer indicating the number of
days from the current date.
hours Hours. A positive integer (0<hours<=23) indicating
the number of hours from the current time. If
omitted, zero is used.
minutes Minutes. A positive integer (0<=minutes<=59)
indicating the number of minutes from the current
time. If omitted, zero is used.
Operation Notes
The STREAM command allows you to initiate jobs while in an interactive
session by constructing your job from your terminal or by reading records
from a disk or tape file. When the job is read,
MPE/iX spools it onto a disk file, assigns it a job number, and processes
it independently as an entity completely separate from your session. In
the meantime, MPE/iX allows you to continue with your session.
You can initiate jobs in this way only if the system operator, or a user
who has been given operator capabilities, has enabled the
MPE/iX STREAM facility by entering the STREAMS console command. The
STREAMS console command also specifies a streaming device, which to
MPE/iX appears to be the source of your job input, regardless of the
device you actually use for this input. As a result, the listing device
that corresponds to the streaming device (not necessarily your terminal)
displays the job number assigned by MPE/iX and the listing generated by
the job.
When you enter STREAM without an input file (that is, with the terminal
as the default input device) during a session or a job,
MPE/iX prompts you for input by displaying a greater than (>) character.
When you enter STREAM for a device other than your terminal, MPE/iX does
not print the prompt character.
How to Stream Jobs
Begin each job in the input file with the !JOB command and terminate it
with the !EOJ command. Begin all commands with an appropriate substitute
(other than colon) character, as in !JOB. When the input file is spooled
to a disk, MPE/iX replaces the substitute command identifier with a
colon, so that the data files are properly interpreted when executed.
After reading the !EOJ command that terminates the job, MPE/iX assigns
each job a unique job number (JobID). MPE/iX also assigns each job a
preset priority, unless you specify otherwise in the JOB command, and
processes the job independently of the initiating job or session.
Regardless of which device you use to submit the input file, all jobs in
that file are treated as though they originated on the unique streaming
device designated by the system operator (with the STREAMS command). The
listing for each spooled job and the job number are written to the
standard list device that corresponds to the streaming device. You may,
however, use the OUTCLASS= parameter of the JOB command to direct the
listing to another device.
How To Time Schedule Jobs
You may specify the time a job is to enter the WAIT state in absolute or
relative time.
Absolute The user supplies an exact time for the job using
the AT parameter with or without the DAY or DATE
parameter.
Relative The user specifies a time offset from the current
time using the IN parameter.
If the time specified is the same as the current time, the specified job
logs on immediately. If the time specified is earlier than the current
time, and DAY and DATE are not specified, a warning message is generated,
and the job is scheduled for the specified time tomorrow. Otherwise, any
time in the current century can be specified.
If no errors are detected, a JobID is displayed on the user's screen. If
more than one job is included in the inputfile, each job is assigned a
unique JobID, and all of the jobs are scheduled at the same time.
When a job is scheduled for a future time, it enters the SCHED state.
When the specified time is reached, the job enters the WAIT state and is
executed when system variables allow.
Terminating Streamed Jobs
To terminate interactive job input, enter a colon (:). In response, MPE
XL ceases prompting for batch job input and instead prompts you for
another MPE/iX command:
>: ** Denotes end of batch job input **
: ** MPE XL 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 is
returned to the system.
If you make an error while entering the MPE/iX JOB command, you receive
an error message on your job listing device. The system operator,
however, receives no indication of the job or the error.
Terminating Time Scheduled Job
Jobs that have been scheduled for STREAM execution can be terminated with
the ABORTJOB command. Refer to the Introduction to MPE XL for MPE V
System Administrators (30367-90003) for information on using the ABORTJOB
command to terminate time-scheduled jobs.
In order to STREAM a file, you must have READ and LOCK access or EXECUTE
access to that file. However, READ and LOCK access would allow general
users to obtain security information within the file, such as passwords
and lockwords. To allow general users to STREAM the file without giving
them access to secure information, you may allow EXECUTE access only.
NOTE Scheduled jobs survive a START RECOVERY. Any other type of system
startup causes scheduled jobs to be deleted. If a job is scheduled
for introduction earlier than the system startup, the job enters
the WAIT state and executes when the system parameters allow it to
execute.
If the system is brought down for any reason, first execute a
SHOWJOB command to show the scheduled jobs. Then reschedule the
jobs when the system is brought back up on anything other than a
START RECOVERY.
A scheduled job uses an entry in the JMAT table. Because of the
limited recoverability of scheduled jobs, it is recommended that
jobs be scheduled no more than a few days in advance.
If a user specifies a day or date for a job, but does not specify a
time, the job does not enter the WAIT state at midnight on the
specified day. Instead, it uses the time that the STREAM is
executed, and enters the WAIT state at that time on the specified
day.
Use
This command may be issued from a session, job, program, or in BREAK.
Pressing Break aborts the execution of this command and any partially
streamed job.
Examples
To stream a job from a disk file, you must name the input file in the
STREAM command:
STREAM ABC
If you use a character other than an exclamation point (!) as the
substitute command identifier in your job input, you must identify that
character in the STREAM command. Because you enter this character as the
second positional parameter in this command, you must always precede it
with a delimiting comma, even when you omit the input file name (the
first parameter). In the following example, an asterisk (*) is used as a
substitute command identifier:
STREAM ,*
>*JOB USER.TECHPUBS
>*FORTGO MYPROG
*EOJ
*#J74
*>:
:
If your job input file contains subsystem commands, such as commands
directed to the editor, do not enter any command identifier character at
the beginning of these commands. For instance, when using the editor,
enter the subsystem commands as follows:
STREAM EXAMPLE
!JOB WXYZ,WRITER.TEC
!EDITOR
TEXT ABC
n
EXIT
!EOJ
#J87
:
In the preceding example, the job input file is EXAMPLE which initiates
the job WXYZ. WXYZ invokes the editor subsystem where the file ABC is
referenced. The EOJ command terminates the job and #J87 is the job
number assigned by MPE/iX.
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 in the MPE/iX JOB command. Enter:
STREAM
>!JOB USER.TECHPUBS;OUTCLASS=12
The following section contains additional examples of using the STREAM
command. For these examples, assume that the current date and time are
Monday, June 8, 1987, 12:00 p.m. Also assume the job file contains a
valid STREAM job.
STREAM JOBFILE will be introduced immediately.
JOBFILE
STREAM JOBFILE will be introduced at 8:00 a.m., Tuesday, June 9.
JOBFILE;
AT=8:00
STREAM JOBFILE will be introduced at 8:00 p.m., Monday, June 8.
JOBFILE;
AT=20:00
STREAM JOBFILE will be introduced in eight hours, at 8:00 p.m.,
JOBFILE; Monday, June 8.
IN=,8
STREAM JOBFILE will be introduced in one day plus eight hours, at
JOBFILE; 8:00 p.m., Tuesday, June 9.
IN=1,8
STREAM Since the time specified (8:00 a.m.) is earlier than the
JOBFILE; current time, JOBFILE will be introduced at 8:00 a.m.,
DAY=MON; Monday, June 15.
AT=8:00
STREAM Since the time specified (8:00 p.m.) is later than the
JOBFILE; current time, JOBFILE will be introduced at 8:00 p.m.,
DAY=MONDAY; Monday, June 8.
AT=20:00
STREAM Since the day of the month (9) is later than the current
JOBFILE;
DAY=9;
AT=20:00
day of the month (8), the current month is assumed.
JOBFILE will be introduced on Tuesday, June 9, at 8:00 p.m.
STREAM Since the day of the month (5) is earlier than the current
JOBFILE; day (8), the next month is assumed. Since no time was
DAY=5 specified, JOBFILE will be introduced on Saturday, July 5,
at 12:00 p.m.
STREAM Since there is no June 31, the next month is assumed.
JOBFILE; Since there is a July 31, this is a legal command. JOBFILE
DAY=31 will be introduced on Friday, July 31, at 12:00 p.m. If
there were no July 31, this would result in an error.
STREAM The -2 means the second to last day of the month, and since
JOBFILE; no time was specified, the current time is used. JOBFILE
DAY=-2 will be introduced on Sunday, June 29, at 12:00 p.m.
STREAM The -25 means the twenty-fifth day from the end of the
JOBFILE; month. If one assumes the current month, that implies June
DAY=-25 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 p.m.
STREAM Since the specified time is earlier than the current time,
JOBFILE; this command is not legal and results in an error.
DATE=6/8/87;
AT=8:00
STREAM The specified time is later than the current time, so this
JOBFILE; command is legal. JOBFILE will be introduced on Monday,
DATE=6/8/87; June 8, at 8:00 p.m.
AT=20:00
Related Information
Commands JOB, STREAMS, SHOWJOB
Manuals Performing System Operation Tasks (32650-90137)
MPE/iX 5.0 Documentation