Web Services Council

Enterprise Applications
User Guide


Advantages to Streamx

Many procedures, run interactively at a computer terminal, could be deferred or STREAMED to run at night. Procedures run interactively during the day are in competition with other processing and thus may take many hours to run. If the same procedures are deferred they can run at night or on a weekend when few other procedures are running:

Deferred procedures do not tie up terminals. Once a job is Streamed the terminal is free for other uses, such as using programs which must be run interactively.

Human resources can be used more effectively because a stream job, unlike an interactive procedure, does not require monitoring by your department.

Output from a deferred job will be available to your personnel about as quickly as output from an interactive job. For example, if a procedure is deferred to run after office hours, its output will usually be available at Production and Reporting by 8:00 am the next day. Since the same procedure run interactively may run most of the day, its output is often unavailable or unused until the next working day.

Because the types of procedures suited to deferred processing often demand large amounts of computer resources they often steal time from necessarily interactive programs and thus slow down processing throughout the university.

Procedures That Can Be Streamed

Quiz reports, form letters, mailing labels, and programs that require special interactions by the Computer Center operator are candidates for streaming. (For more information refer to the QEDIT section of this manual for reating, modifying and keeping files to be streamed.) Following is a Qedit file that can be Streamed to run a Quiz:
. . . (QUIZ program commands)

Explanation of the above Qedit commands:

!A prompt that replaces the : prompt used during an interactive session. It must precede stream commands.

JOB - This replaces the HELLO of an interactive log-on.

JOBNAME - The name that identifies the program. For ease of identification, JOBNAME should be identical to the stream job file name.

{HPUSER} and This instructs the computer to use the same client and account names as the client's logon.

{HPACCOUNT} They must be entered exactly as shown.

INPRI=n This tells the system that this job is to be run according to input priority specified. See below for the valid input priorities. The Input Priorities are:
0 - Previous job on a work order has aborted. Do not run this job without computer support analyst approval.
1 - Low priority, overnight processing.
2 - Check work order for special instructions. Used for tape jobs, letterhead paper, etc.
3 - Low priority that can be run during the day or night.
4 - Run after backup but before 7:00 a.m.
7 - Run individual jobs one at a time during day or night. Should an abnormal end occur processing should not continue.
8 - Normal priority run during the day.
Never use a priority greater than 8.

QUIZ An MPE/iX command that causes the job to enter Quiz. Quiz program commands do not use the ! prompt. (Refer to the section on QUIZ elsewhere in this guide for an explanation of Quiz commands.)

EXIT - A Quiz command which returns the job to the MPE/iX Operating System.

EOJ - This replaces the BYE command. It means end of job and will log the job off the computer.

Submitting the Procedure for deferred execution:

STREAMX jobname The command STREAMX instructs the computer to accept the named file as a deferred job. Once the procedure has been accepted by the computer, a job number will be displayed on the terminal in this format: "#Jnnn" where "n" represents a digit between 0 and 9. Record this job number as it is the easiest way for the job and output to be identified by Production and Reporting.

Streamx Prompts

For a Quiz report which selects data based on a certain value (e.g. a date), Streamx can be used to prompt the client for the required value.

SELECT IF EXAMPLE-DATE EQ "?Please enter example date - mm/dd/yy?" .
. . .

In the above example, Streamx prompts the client with a statement found between the question marks, giving the client the freedom of entering a value at the time the stream command is issued instead of using QEDIT to physically key a value into the job each time it changes.

If it became necessary to also print the prompted date, the Quiz job needs two prompts; one for the select statement and one for the report statement. So as not to prompt twice for the same date, Streamx offers the ability to propagate answers to a prompt via the prompt command.

Syntax ::PROMPT STRING variablename ="Question";[option] (The double colons are a required syntax of streamx.) PROMPT is the command.

String Determines the variable type (a string of characters); others are INTEGER and DATE

Variable name The name by which the client response is referenced

Question An interrogative statement which will prompt the client for the 'variablename' value.

::PROMPT STRING DEPT="Enter dept name "
::PROMPT INTEGER AGE="Enter age (in years) "
::PROMPT DATE NOW="Enter today's date (mm/dd/yy) "

CDATEMDY MM/DD/YY format of date required
CDATEYMD YY/MM/DD format of date required (default)
CDATEDMY DD/MM/YY format of date required (default)
CHECK logical expression by which the input is to be checked
CHECKERROR "message" lets the client specify their own error message
NOECHO does not display the client's response (handy for password prompts or other secure information)
DEFAULT= value used if none is entered

::PROMPT STRING DEPT="Enter dept name ";DEFAULT="Arts & Sciences"

To use the value that is prompted for or assigned (see below for ::ASSIGN), it must be referenced by a variable name, in braces, like this: {AGE}. For example, to select the spring semester in a Quiz, prompt for a value at stream time as shown in the code below:

::PROMPT STRING SEMESTER="Enter the semester"

in Quiz)


Streamx will insert the value entered at the prompt into the variable named SEMESTER, and will substitute it each time it finds {SEMESTER}. The quote marks are necessary for Quiz's usage.

Other Commands
::ASSIGN assigns values to existing variables or defines new ones.
:ASSIGN NEW_AGE=40 (Use underscore instead of hyphen for spacing.)

::ECHO displays information to the terminal at STREAMX
::ECHO Hello there!
::WHILE...ENDWHILE repeated execution
do some stuff
do more stuff
::IF...ENDIF conditional execution
::IF AGE < 40
do some stuff
do other stuff for age > 40

!JOB jobname,{hpuser}.{hpaccount};INPRI=1
::PROMPT DATE EXDATE="Please enter example date"
PAGE HEADING TAB 10 "Examples of dates equal to - {EXDATE}"
... etc.

By using the ::PROMPT option, the person streaming the job is asked to enter the date only once. Streamx then automatically replaces all subsequent variable name in braces {EXDATE} statements with the date supplied for the initial request. Multiple variables can be asked for and propagated throughout the stream job by entering ::PROMPT with differing variable names.