Review of StreamO
by
Shawn M. Gordon
President SMGA

Introduction

In the old days of MPE you had very little options for doing any sort of advanced job stream programming. You could do some trick’s with LISTF, and JCW’s, but in general there was very few options. A number of software packages came along, notable STREAMX from VESOFT, that gave you many options for job stream programming like looping and dynamic parameter replacement. The biggest problem with these packages is that they usually came as part of a more expensive and extensive batch control, or security software package.

Once MPE/iX came along you had some more sophisticated means for making jobs more robust. A variety of built in system variables, the ability to define your own variables, as well as looping constructs. Notably absent however was the ability to prompt for information at job submission time, as well as sophisticated date handling. I don’t know about you, but most of my job problems have to do with dynamic resolution of dates to conform with fiscal periods.

OK, so what does all this have to do with StreamO. Well StreamO is a package who’s purpose in life is to allow you to build intelligent stream jobs, in a very similar manner to STREAMX from VESOFT, but in a stand alone package. I tested the software on my HP 3000 925 running MPE/iX 4.0

Features

As I mentioned, StreamO allows you to do sophisticated job stream programming. Here is a short highlight of it’s features before I get into detail.

* Prompt inline for paramenter replacement i.e., BUILD FILE;DISC=”?How many records<;>?
* Prompt for a set of values until a < null response
* Prompt for embedded passwords with terminal echo on or off
* Library of functions for variable manipulation
* Create smarter and shorter command files
* Assign variables and reference them anywhere in the job
* Upshift or downshift user input and variables
* Edit check input for table of possible values
* Edit check and output dates in virtually any format
* Perform date arithmetic (date – date = number of days between, date + number = future date etc.)
* Define template files, and include them by using $USE
* Edit check for numeric and date responses
* If/Else/Endif blocks
* Run MPE commands
* Display text with optional terminal enhancements
* Create powerful jobs that look and feel like menus
* Reference MPE variables
* Transfer StreamO variables to MPE or load StreamO variables from MPE variables
* Add prefix and/or suffix delimiters to user responses
* Combine MPE and StreamO variables in expressions
* Test a StreamO job without issuing a job number
* Simulate an HP environment by assigning your own value to READ-ONLY variables such as HPJOBNAME.

The best way to describe the product is with a short example. See figure 1 for a sample StreamO job stream, the contents of the temp files created from StreamO, and the actual output from the StreamO job.

Figure 1


$# This is a comment
$'{%HPCLS}
$
$
$' This is a STREAMO job
$' Here is an MPE command:
$MSHOWME
$' The console is on LDEV: {HPCONSOLE}
$ASSIGN LNAME="?What is your last name:?"
$' Your last name has {LEN(LNAME)} characters in it.
$PROMPT STRING FNAME ="What is your first name:"
$ASSIGN FULLNAME=FNAME+" "+LNAME
$IF HPHOUR << 12
$'  Good Morning, {FULLNAME}
$ELSE
$   IF HPHOUR << 18
$      ' Good Afternoon, {FULLNAME}
$   ELSE
$      ' Good Evening, {FULLNAME}
$   ENDIF
$ENDIF
$# The following line will appear in STRMOUT
{TODAY}
$EXIT

LISTFTEMP,2

TEMPORARY FILES FOR MANAGER.SYS,PUB             

ACCOUNT=  SYS         GROUP=  PUB     

FILENAME  CODE  ------------LOGICAL RECORD-----------  ----SPACE----
                  SIZE  TYP        EOF      LIMIT R/B  SECTORS #X MX

STRMLOG            80B  FA           1       1023  10      256  1  * (TEMP)
STRMOUT            80B  FA           1       9000  10      256  1  * (TEMP)


:PRINT STRMOUT

960529

:PRINT STRMLOG

What is your last name:::GORDON 





This is a STREAMO job
 Here is an MPE command:
USER: #S2,MANAGER.SYS,PUB       (IN PROGRAM)
RELEASE: B.40.00   MPE/iX HP31900 B.30.45   USER VERSION: B.40.00
CURRENT: WED, MAY 29, 1996,  1:26 PM
LOGON:   WED, MAY 29, 1996, 12:04 PM
CPU SECONDS: 1         CONNECT MINUTES: 82
$STDIN LDEV: 20         $STDLIST LDEV: 20
 The console is on LDEV: 20
What is your last name:GORDON
 Your last name has 6 characters in it.
What is your first name:SHAWN
 Good Afternoon, SHAWN GORDON

END OF PROGRAM
PRESS < TO CONTINUE <;>

:

==========================================================================

First off the dollar sign ($) prefaces all StreamO commands, like the ! is an MPE command in a regular job. It needs to be the first character on the line, however anything after that can be freely indented. The pound sign (#) indicates a comment, which is much easier to use than “!COMMENT”, however these are comments inside the job file, and will not appear in the STDLIST of the job when it is streamed.

The single quote ‘ or double quote ” act’s as an ECHO directive, any text after that character will be displayed to STDLIST when you STREAMO the job. This is a nice shorthand for ECHO, but it isn’t intuitive. Variables are resolved within the curly braces ({}). The {%HPCLS} is an example of using a predefined variable, and dereferncing it, in this case we are going to cause the terminal to do a “home and clear”. For some reason you have to use the % in front of only some of the predefined variables. Apparently this is a hold over from an early implementation, hopeful it will be made more consistent in the near future.

The next command is the “M”, which indicates to execute the next command as an MPE command. You will notice that you can also reference standard MPE variables inside curly braces to dereference and display them as well.

Next we are going to show a couple of different examples of obtaining input from a user. First we can use the “?string?” to prompt for anything, within any context. In this case we are going to ask for a last name and ASSIGN the value entered into the variable LNAME. We could just have easily prompted for a record width within a build command i.e.,

BUILD MYFILE;REC=?What record size do you want?,1,F,ASCII

The next line is a good example of some of the standard functions that are available to you, in this case LEN will return the length of the string inside the variable LNAME. There are also functions available for formatting strings, left, right, up, and downshifting, as well as some standard math type functions and conversions between string and integer types of data. Not to mention a huge number of date manipulation functions which I will get into later.

Next is one of the more powerful commands in StreamO, the PROMPT command. This allows you to prompt for a value to assign to a variable, check for valid data, and display an error if the value does not match the check specifier;

PROMPT INTEGER PRI="Enter priority between 1 and 14: "; &
                 CHECK=(PRI<;>=1 AND PRI<<=14); &
                 CHECKERROR="The priority must be between 1 and 14"

This is just a simple example, there is also very sophisticated date formatting and checking you can do. Name a date style, and I believe StreamO can handle it.

Next in figure 1 is an example of concatenating three strings to create on variable, in this case we are going to add FNAME to a single space and then add LNAME, giving us a variable that contains the entire name, nicely formatted. The rest of the example pretty much builds on what we have alread learned at this point.

StreamO contains a wealth of functions for getting and manipulating dates. You can get the last day of the month, the day of the week, the first day of the year, the date of the last day of the week, julian dates, the list goes on and on. You can format dates as MDY, DMY, YMD, YYYYMMDD, etc. As I said earlier, I doubt you could find a date format that you wanted to do that StreamO didn't handle.

One of the more fascinating aspects of StreamO is it's ability to directly do Image call's for you. This allows you to easily do things like retrieve passwords for applications, or pass input do programs. You are limited to DBFIND and DBGET basically, I would have liked to have seen a DBPUT, as this would have let you put in a simple audit process into your jobs. Maybe JD Labs will add that feature later.

There is a neat little trick you can do which is to ASSIGN HPJOBNAME to another variable and fake out the job to think it was another job. You also have access to the original MPE variable HPJOBNAME, so there are two of them available if you want/need them.

StreamO let's you take advantage of a USE file that contains input for a program, now this is nice, but it also allows you to build this input on the fly. Why would you want to do this? Well say you have a job that run's a few different programs, but you need the same list of input for all the programs, and the list changes every time you stream the job. The command is called CAPTURE and basically it will create a file for you, and prompt until the user hit's return to exit, then the file is available to you. Here is an example;

!JOB EMPRPT,HUMAN.RESOURCE,PUB
$#  Prompt for a list of employee numbers and save in Capture file
$#
$'  Please enter a list of employee numbers,
$'  Press < when done entering.
$'
$CAPTURE EMPLIST
$?~Enter Employee Number:
$ENDCAPTURE
!RUN HR001.PUB
$USE EMPLIST
!RUN HR002.PUB
$USE HR002.PUB
!EOJ

This is a good example of mixing the StreamO and MPE batch directives. As this job is processed through StreamO it will create a file that contains all of the user responses, then read them back into the job stream before it submits it. You could end up with a job that is a couple hundred lines long based on this short job stream. This is a very powerful, and useful function.

There are of course other features that I haven't touched on, but editing constraints require that I try to stay concise. There are many options available in StreamO to make your batch programming life easier, and more efficient.

Usability (also installation)

The software is very easy to use. Basically you can either copy their command file into a path that you already use command files from, or add their group and account to your path. Once this is done, it is pretty much seamless to use the software. Learning the syntax may take you a while to get use to because of all the shortcuts, but with all the documentation and examples, I doubt you will have much trouble.

Installation was a pretty basic restore and stream a job kind of deal - everything worked as expected.

Reliability

Well the software worked quite nicely. All of the commands I tried, including the database access commands, worked correctly. I couldn't find anything that aborted, or didn't work; all in all a very solid package.

Performance

Keep in mind that you are basically running a language interpreter with StreamO. Even without considering that, StreamO performs quite nicely. There is no real noticeable CPU impact from using the program either. If you were to use a very large USE file, then you might see a hit, but otherwise don't worry about it.

Supportability (including Doc)

The documentation is easy to read, and is chock full of examples. The index at the back makes it easy to look things up, and the flow of the manual is almost done as a tutorial, so it is very easy to get up to speed with the product quickly.

The support I got was very quick, correct, and responsive. JD Labs offer's a couple of different support options. You can get the e-mail support which is cheaper, or for a little more you can purchase the phone in support option. You will have to decide which is best for you.

Summary

There are very few negatives to StreamO, but here are a couple of features that I would like to see. First is the ability to set up default configuration files, at least a global one, and preferably the ability to set up multiple ones that would be evaluated from the HPPATH variable. The second enhancement I would like to see is the ability to redefine the StreamO directive character ($). This could be critical for people that are using various packages, or doing embedded stream commands. I mentioned both of these to JD Labs, and they were very receptive, it wouldn't surprise me if these features showed up by the time you read this review.

I am always impressed by a good expression parser, and StreamO has done a very nice job. I believe it was written in COBOL, which just reinforces my opinion that COBOL can do anything that you want. But I am not going to get on that soap box here.

StreamO is a nice little package, it handles all the different scenarios that I would find useful, the inclusion of certain predefined variables makes it even more convenient to use. I like the data base access features, and the ability to build dynamic include files especially. All and all this is a very solid product, with many useful features. It could easily pay for itself in the time you would save in automating your batch environment. I can recommend this product for almost any shop that is using batch jobs.

At-a-Glance box

StreamO version 4.0
JDLabs
25422 Trabuco Rd. #105-222
Lake Forest, CA 92630-2797
714-837-8611

Call or write to get a free demo. Software is $1,295 regardless of CPU size with price breaks for multiple CPU's, with annual support varying from $299 to $449 depending on the support option selected. Includes one 60 page indexed manual.