Re: Moving from 2200 to A-series - CANDE and Schedule Sessions



I have been working in the "CANDE" world since college, and while there
are certainly excellent editors for working with "large" source files,
CANDE still does some things that I haen't seen in either
SYSTEM/EDITOR, or PW. One of these is what I will call Column range
editing (specifying a certain action take place only in given columns).
Maybe there is a way and I just missed it. The other "neat" feature
is the use of SCHEDULE sessions to "DO" things in logged CANDE
sessions.

Here I post a short paper I did for an "internal" portal.

The Schedule Session - Your forgotten friend

During my college years, specifically my senior year, I was introduced
to the wonderful world of the TD830, CANDE and the Burroughs B6700.
There were three TD830s and a TC4000 in the Math department that
juniors and seniors in the computer science program could use. Of
course, prior to that, all I had ever know was card deck input and the
few paltry WFL statements one needed to compile and run a program on
the system. But CANDE changed all that.

One of the issues we few upperclassmen (and women) had was that the IT
department that "owned and operated" the system, did not feel that
we should be given access to the WFL documentation so that we could
write useful workflows that could then be used to manage our programs.
But they did give us the CANDE manuals. And being good little sponges
- we read them cover to cover. Now this was in 1977-78, so full page
editing was a bit of a kludge, but we managed. We stumbled on the
"DO" command and saw what it could accomplish. And then we found
"the schedule". Our own little poor man's workflow, but with
better input!

You see, anything you can DO, you can SCHEDULE. Get a file, make some
changes, save the results, run a program, input from the screen, output
to the screen, communicate with the "outside world" - all from a
list of commands in a file, that is processed in its own "session".
And, you could tell it all to start at an appointed time, and even
reschedule itself! And as an extra bonus, your "session" results
were written to their own CANDE editable file, your SCHedule OUTput, or
SCHOUT file. This allowed you to see what was done, what worked and
what didn't. It was your "log" of events.

This worked so well that one of my classmates, who was hired on with
Burroughs at the same time as, for the same project as me, used the
SCHEDULE and DO functionality in our first big project:. We were hired
to do a medium to large systems conversion in Forsyth County, NC. He
wrote a scanner program which would read a COBOL source, looking for
offending constructs, build one or more DO files to actually perform
the changes, and then build a SCHEDULE file, which then "did" those
files. In effect, CANDE was our conversion tool. And, it was all
logged for us in the SCHOUT file. It was customizable (we could change
the DO files or add to them). And if it messed up, we could just
repeat the process.

So, nowadays, I'm not so much into "mass conversions", although
there are some efforts out there that were waiting to be uncovered.
However, in the world of installations and upgrades, I often find it
necessary to do simple tasks where I want to either see certain
information (a file command with a given set of parameters), or build a
list of names, or do just whatever - and I use the SCHEDULE to do
this.

In order to do a schedule under CANDE, you must first enable a session.
This is done with the ?SCHEDULE LIMIT=<#> where the <#> is the
concurrent number of SCHEDULE sessions you want to allow. Typically
this will be 1. Once this is set, you can then make a SEQ file in
CANDE, and then SCHEDULE it. You don't even really have to save the
file. Witness:

MAK MY/SCHED
#WORKFILE MY/SCHED: SEQ
10 FILES :1
SCH
#UPDATING
#SCHEDULE #00001 RUNNING
OUTPUT FILE IS (NAU)SCHOUT/MY/SCHED ON DISK.
LINE WIDTH IS 72
#
?SCH
#SCHEDULE LIMIT=1 NO USERLIMIT
FILE SCHOUT/=
(NAU) ON DISK
.. SCHOUT
.. . MY
.. . . SCHED : SCHEDULEFILE

The output file is automatically named SCHOUT/MY/SCHED, as you can see.
Doing just a LIST of the file you get:

#SCHEDULE #00001 COMPLETED
SESSION(S): 03858.

#LX100:1234 CANDE SSR 51.1 (51.190.8011) AT RAMSEYLEMCP
#YOU ARE "SCHED#000"(159)
#SESSION 3858 23:57:35 Thursday, August 10, 2006 (EST)
#
FILES :1
(NAU) ON DISK
.. BD
.. NM
.. GEN : DATA
.. WFL
.. WLB
.. ARTO : DATA
.. BOOK
.. LINE : DATA
.. CANDE
.. GAMMA : DATA
.. GAMMA
.. MYOBJ : CONTAINERDATA
.. PDUMP
.. WRAPS : CDATA

This is just first page, but you see this appears as though someone
logged in with the NAU user, and did a FILES : 1 command. I will use
this very simple type of SCHEDULE to produce lists of files for copies
or to put into WFLs, etc. One thing to remember: a SCH will not
schedule over top of an existing SCHOUT file. So if you are doing the
same SCH over, you can either remove the SCHOUT file or do SCH AS
<name> and a SCHOUT will be created for that name.

Now, remember, just like with DO files, you could GET a file, do all
sorts of funky REPLACE commands, or FINDS which produce output files,
and let this run in the background. And, you have the SCHOUT listing
to see what happened, if that is important. You can also, RUN
programs, and START jobs if necessary. Your ?MSG setting is inherited
from your USERDATA settings, so if you are running something or copying
files, or whatever, the output messages will depend on that being set
properly.

You can also RUN programs which require REMOTEFILE input. For example,
here I run Makeuser, list a user, enter a user and quit:

NEXT+ ....*....1....*....2....*....3....*..
00000010r *system/makeuser
00000110$SET LIST IGNORE
00000210USER NAU;
00000310+USER NEWUSER MAxPW=1 PASSWORD=STUFF;
00000410QUIT;
#DISPLAY COMPLETE

I SCH this file, and as you would expect, things run as they are told:

#SCHEDULE #00004 COMPLETED
SESSION(S): 03874.

#LX100:1234 CANDE SSR 51.1 (51.190.8011) AT RAMSEYLEMCP
#YOU ARE "SCHED#000"(159)
#SESSION 3874 00:25:54 Friday, August 11, 2006 (EST)
#
r *system/makeuser
#RUNNING 3875
#?
*SYSTEM/MAKEUSER 51.190 Friday, August 11, 2006 00:25:53
$SET LIST IGNORE
<< $OK
USER NAU;
<< Examined
USER = NAU
MAXPW = 1 MINPW = 1
PASSWORD = ?
PU
SYSTEMUSER
COMSCONTROL

+USER NEWUSER MAxPW=1 PASSWORD=STUFF;
<< Entered
USER = NEWUSER
MAXPW = 1
PASSWORD = ?


QUIT;


*SYSTEM/USERDATAFILE ON DISK [000500]:
Created Mon, Mar 4, 1996 Rewritten Fri, Sept 19, 1997
Index Modulus = 11
Index Blocksize = 1 segment
Version Number = 1
Number of Security Administrators = 0
Usercode index has 130 (90%) entries remaining
Remote usercode index has 140 (97%) entries remaining
Remote USERID index has 143 (100%) entries remaining
Kerberos index has 143 (100%) entries remaining

There are some "control" type commands which are used in SCHEDULE
sessions when running programs to do various things:

?EOL ?NORESTART ?NUMBERED ?REPORT ?RESTART
?RESUME ?UNNUMBERED ?% (COMMENT)

Of particular note, for long running sessions are the ?RESTART and
?NORESTART commands which tell what is to be done should the system
reboot and have to bring things back up. The ?RESUME command is used
to recover in session when you have "errors" in your commands or
syntax. This is taken straight from the manual:

The ?RESUME command is valid only from a schedule station. Any error
detected in CANDE syntax, editing, compilation, or abnormal termination
of execution causes the remainder of the input lines to be skipped
until a ?RESUME command is found. If no ?RESUME command is found, the
session is aborted. If an unsaved work file exists at that time, a
recovery file is generated and can be recovered in an interactive or
schedulesession. (An explicit or default BYE, found with an unsaved
work file, causes such error action.)

Also of note is the ?REPORT command. This will send a custom message
(via CANDE) to anyone signed on with the usercode that spawned the
session. This is very handy to put at the end of a schedule file that
might take a while to process, and you want to be alerted when it is
finished.

Once you start a SCHEDULE session, you can use the ?SCH command to
check its status. As an example, here is a schedule session that is
sure to "hang:

00000010 COPY *SYSTEM/PRINT/FONTSUPPORT/= AS X/=

sch
#SCHEDULE #00003 RUNNING
OUTPUT FILE IS (NAU)SCHOUT/MY/SCHED ON DISK.
LINE WIDTH IS 72
#
?sch
#00003 SN=4438
#SCHEDULE LIMIT=1 NO USERLIMIT ACTIVE=1

?sch
#00003 SN=4438
#SCHEDULE LIMIT=1 NO USERLIMIT ACTIVE=1

You see the session running but you don't know what is "wrong".
You would have to investigate the mix and see:


---Job--Task-Pri---Elapsed------ 1 WAITING ENTRY
------------------------------
4438\ 4441 50 9:36 (NAU) *LIBRARY/MAINTENANCE

PK500 WAITING ON KEYEDIOII OPEN UPDATE
*SYSTEM/PRINT/FONTSUPPORT/DATA

So, we DS this foolishness and look at the SCHOUT file:

#SCHEDULE #00003 COMPLETED
SESSION(S): 04438.

#LX100:1234 CANDE SSR 51.1 (51.190.8011) AT RAMSEYLEMCP
#YOU ARE "SCHED#000"(159)
#SESSION 4438 10:05:38 Monday, August 14, 2006 (EST)
#
copy *system/print/fontsupport/= as x/=
#RUNNING 4439
#BOT 4440 (NAU)WFLCODE
#BOT 4441 *LIBRARY/MAINTENANCE
#4441 PK500 WAITING ON KEYEDIOII OPEN UPDATE *SYSTEM/PRINT/FONTSUPPORT/
DATA
#4441 GOING
#4441 LIBRARY MAINTENANCE ABNORMALLY TERMINATED
#4441 (NAU)X/DATA NOT COPIED TO DISK
#4441 OPERATOR DSED @ (78630820)
#4441 NO FILES COPIED
#O-DS 4441 (NAU) *LIBRARY/MAINTENANCE
#EOT 4440 (NAU) (NAU)WFLCODE
#
#END SESSION 4438 ET=11:05.5 PT=0.0 IO=0.0
#USER = NAU 10:16:44 08/14/06



Some other items of note:
· The CDATA type (SCHOUT file) is a little like a type DATA file.
However, Programmers Workbench can't "get" the file. You can
re-TYPE the file as DATA if you need to edit it into something else
with Workbench or CANDE.
· There is a definable EOL character for SCH files (see ?EOL
command).
· Only the control-commands listed earlier are valid in a SCH.


Hopefully, this should get you started on finding your forgotten
friend, the SCHEDULE session. It is a very useful tool, and I hope it
can make your installs and upgrades go that much smoother.

.



Relevant Pages

  • Are you australian, I mean, shuting over available peaks?
    ... It will greet the growing cell and reserve it prior to its schedule. ... Plenty of members indirectly sweep the lexical monument. ... Beth never spills until Ikram totals the involved command ... All average violent trusts wickedly ...
    (sci.crypt)
  • AT command
    ... Schedule service is running. ... Specifies a remote computer. ... Cancels a scheduled command. ... Connecting to network drives ...
    (microsoft.public.windows.server.general)
  • AT command
    ... Please can you or anyone else tell me as to what command ... line I should use to schedule a task. ... >redirect output to a file, ... >Connecting to network drives ...
    (microsoft.public.windows.server.general)
  • Re: AT command
    ... It isn't as granular as the at command, as far as I know, but may do ... > line I should use to schedule a task. ... >> Specifies a remote computer. ... >> Connecting to network drives ...
    (microsoft.public.windows.server.general)
  • Re: Win2K Task Scheduler says running but its not
    ... > through scheduled maintence cycles where updates are applied. ... if you search for schedule and/or ... while logged in with different account. ... session with different SessionID than that of my then current TS session, ...
    (microsoft.public.win2000.security)