Date Last Reviewed:
03/16/2007
One of the most attractive features Superwylbur offers is the ability to run programs from a terminal. This will help you become familiar with programming using Superwylbur.
A program is collected like any other data set and includes the JCL. The JCL begins with the JOB statement, followed by all the other JCL statements you need. Your data set will look something like this:
//jobname JOB ....
//name EXEC ....
//ddname DD ....
//SYSIN DD *
(your program)
/*
//
To run your program, first call it up into working storage. Then submit your program to the operating system by typing RUN. You may append to the RUN command the UNNUMBERED (UNN) and/or FETCH (or HOLD) options. Thus, the full command may look like this:
RUN UNN FETCH The UNNUMBERED option submits your job without Superwylbur line numbers. Some languages, such as SAS or SPSS, must be run without line numbers or errors will be found in your program statements. This option can be abbreviated UNN.
The FETCH (or HOLD) option is a very valuable one and can save a great deal of time and paper. When you submit a program using this option, you can only see (FETCH) your output at a terminal; however, you can have access to it as soon as the job has executed. On days with sluggish turnaround, this can save hours since your job does not have to "await print." Output is normally held for 72 hours (a period called the "FETCH time"). FETCH time may be reduced when there are several hundred jobs in the system. Watch for messages when you log on stating: "DUE TO LARGE NUMBER OF JOBS, FETCH RETENTION HAS BEEN SET TO 90 MINUTES," etc.
After submitting the job, you can find out when it has run and is ready to be fetched by using the LOCATE command:
? RUN FETCH
1234 IS YOUR JOB NUMBER
? LOCATE 1234
JOB 1234 PRT U999 PUN U999 P=1 C=A T=365
To retrieve the job, type FETCH followed by the job number (e.g., FETCH 5074). When Superwylbur responds with the "?" prompt, you have the output of the job in your working storage.
A number of options are available with the FETCH command:
FETCH 5074 ALL
FETCH 5074 CLEAR
FETCH 5074 CC
FETCH 5074 CLEAR TAKE 2000
FETCH 5074 ALL CLEAR SKIP 500 Then you must hunt through the output to find out what happened. Especially helpful in finding the diagnostic messages are commands such as
LIST "ERROR MESSAGE"
LIST "COND CODE"
LIST "IEF"
Output may be difficult to read on CRT terminals since long lines "wrap around." The instruction LIST UNN CC improves its readability.
One of the best ways to debug a program from a terminal involves using a numbered copy of the program (either a previous RUN or a LIST OFFLINE). When you find an error in the program you've fetched, you can record it on your copy and investigate the next error. This method frees you from trying to remember all the corrections necessary. The technique saves much time and temper, since errors (hopefully) can be corrected the first time they're encountered, not in successive runs.
Because Superwylbur allows multiple data sets in working storage, it is convenient to keep the program data set as the default and fetch the output from a run into a temporary. The command for this is:
FETCH TEMPORARY data.set.name job# "TEMPORARY" may be abbreviated "TEMP" or "T". The data set name follows usual naming conventions, but since the temporary data set is probably not going to be saved, it is easiest to give it a short, simple name. For example:
FETCH TEMP RUN1 5074 ALL CC For more information on temporaries see the Superwylbur Text Editing Manual.
This command specifies that the job should be purged (i.e., erased). You can purge only those jobs awaiting execution or those in the fetch queue. This is the command to use when you're still debugging a program because it saves paper and keeps unwanted jobs out of the system. The form of the command is
PURGE job# where "job#" is the number of the job you want purged.
This command automatically routes the specified job from the fetch queue to the line printer. The printed output is then placed in your bin. The form of the command is
PRINT job# where "job#" is the number of the job you want printed.
To get a listing of your working storage data set, use the command
LIST OFFLINE BIN nnnn [UNN] BIN is required; replace nnnn with your bin number. UNN is an option; use it when you want a listing without Superwylbur line numbers.
Other commands that enable you to check on the status of your job or the status of the system are: