Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

DECUServe Journal February 1995

2 views
Skip to first unread message

Brian McMahon, Info-VAX Refugee

unread,
Feb 14, 1995, 5:56:50 PM2/14/95
to

The DECUServe Journal
=====================
February, 1995

From the Editor's Keyboard
==========================

Need a one-word description of February in Iowa? Try COLD. Your
ever-faithful editors have recently been enjoying crisp, clear days
(single-digit highs) and warm thoughts of the coming spring. We had
a taste of warmer weather a while ago, just long enough to remind us
of what we were missing, and then it was back into the deep freeze.

At a time when ever extra bit of heat counts, we're doubly pleased
to extend a warm welcome to Curtis Reid (REIDC on DECUServe) as an
Assistant Editor. Expect to be seeing more of Curtis in the future,
as he lends an able and most welcome hand in the production of the
Journal. (Who knows, maybe we'll even be on time, for a change!)
The DECUServe Journal February, 1995 Page 2
Table of Contents


Table of Contents
=================

CONTENTS

From the Editor's Keyboard . . . . . . . . . . . . . 1
Table of Contents . . . . . . . . . . . . . . . . . 2
Installing a Sharable Image . . . . . . . . . . . . 3
Device Names and the Queue Manager . . . . . . . . . 8
ALL-IN-1 Tuning Tips . . . . . . . . . . . . . . . 23
Assigning Sequence Numbers . . . . . . . . . . . . 38
AppleTalk vs. Parallel . . . . . . . . . . . . . . 53
Printing Duplex to HP LaserJet 4 . . . . . . . . . 57
ISDN for "Permanent" Connections . . . . . . . . . 61
About the DECUServe Journal . . . . . . . . . . . 69
Contact Information . . . . . . . . . . . . . . . 69
The DECUServe Journal February, 1995 Page 3
Installing a Sharable Image


Installing a Sharable Image
===========================

There is a topic in the VMS conference titled "Shareable Image
Questions", which has become home to a number of interesting threads
over time. (Such a nice, generic title seems to attract questions.)
Earlier last year, it woke up for a while with the following
discussion of INSTALLing images with privileges.

Participants: Harry Flowers, Jamie Hanrahan, Larry Kilgallen, Anna
Kresh, Jean-Francois Mezei, Ray Whitmer.


Note 757.42, 3-Mar-1994
Kresh: Mixing INSTALLed, un-INSTALLed shareable images?
-------------------------------------------------------
We are in the process (hopefully) of converting a library of 50+
object modules to shareable images and need some information on
calling/INSTALLing of privileged shareable images.

Scenario:
Image A (which *DOES NOT* need privileges)
calls object module B (which *DOES NOT* need privileges)
which calls object module C ( which *DOES* need privileges )

All of the above call many other non-privileged object modules (D,E,F...)
in the same object library. We would like to convert all the object
modules (or most) to shareable images for ease of future maintenance.

An LNM$SYSTEM/EXEC logical name pointing to the directory containing all
the executables has been defined in SYS$SHARE as with all our other appls.
(which call non-privileged shareables), but because C needs privileges
neither B nor C can be found at run-time unless we INSTALL A, B, and C
with privs. No problem -- if these 3 are the only ones that need to be
INSTALLed (although I thought SYS$SHARE would take car of that for us).
------------------------------------------------------
Done. But now VMS tells me that every other shareable image called by
A, B or C (i.e., D, E, F...) must also be INSTALLed -- and we obviously
don't want to install 50+ shareable images because of one single image.

There's got to be a better way...

Is there a way to call vanilla shareable images D, E, F... from
privileged, INSTALLed images A, B, C without INSTALLing the whole
library?

Note 757.43, 3-Mar-1994
Mezei: Some non-authoritative thoughts
--------------------------------------
As I recall, there is no way to give privileges to a single installed
shareable image.

The DECUServe Journal February, 1995 Page 4
Installing a Sharable Image


You have a few options: provide the executable image with the privs.
This should propagate the privs to the shareable images while the image
is running. (I say should because I am not sure).

Or, I believe that with version 6 of VMS, the new security features
may allow you more flexibility with such an application.

Note 757.44, 3-Mar-1994
Flowers: A RTL would work
-------------------------
> Scenario:
> Image A (which *DOES NOT* need privileges)
> calls object module B (which *DOES NOT* need privileges)
> which calls object module C ( which *DOES* need privileges )

In this scenario, Image A would need to be privileged because module
C needs the privs. To avoid this, you'd have to make C into a RTL.
I'm assuming that image A is the executable one. You do *not* have
to install B and C with privs (it serves no purpose), just install
them.

> All of the above call many other non-privileged object modules (D,E,F...)
> in the same object library. We would like to convert all the object
> modules (or most) to shareable images for ease of future maintenance.

> An LNM$SYSTEM/EXEC logical name pointing to the directory containing all
> the executables has been defined in SYS$SHARE as with all our other appls.
> (which call non-privileged shareables), but because C needs privileges
> neither B nor C can be found at run-time unless we INSTALL A, B, and C
> with privs. No problem -- if these 3 are the only ones that need to be
> INSTALLed (although I thought SYS$SHARE would take car of that for us).

Actually, this is not the case. You just need to install B and C; no
privileges will be granted when the routine is called because of the
way it was installed. Again, you'd need to make a run-time library
instead of a shareable image to get this to work the way you want.

> Done. But now VMS tells me that every other shareable image called by
> A, B or C (i.e., D, E, F...) must also be INSTALLed -- and we obviously
> don't want to install 50+ shareable images because of one single image.

Possibly true. What about putting more than one object module into the
image? You could possibly have all 50 object modules in the one image...

> Is there a way to call vanilla shareable images D, E, F... from
> privileged, INSTALLed images A, B, C without INSTALLing the whole
> library?

Only if you make at least the ones that need privs RTL's instead, so
that you don't install the program with privs. This may also give you
better control over what is done with those privs.

The DECUServe Journal February, 1995 Page 5
Installing a Sharable Image


Note 757.45, 3-Mar-1994
Hanrahan:
----------
What on earth are you talking about, Harry?

Just what do you mean here by an "RTL"??

Note 757.46, 3-Mar-1994
Hanrahan: install/priv the execs, and install the shareables
------------------------------------------------------------
Re the original question:

You can't install an ordinary shareable image with privileges. Um, well,
you can, that is INSTALL will accept it, but it won't do any good. ie
the specified privs won't be granted to callers of the routines in the
shareable image. You can install executable images with privileges,
and that's it.

And, yes, once you've done that, any shareables called from such executables
must be installed.

My advice would be to lump all of the object modules into as few shareable
images as possible and go ahead and install them. Installing them is not
expensive in terms of resources used, and at worst the effect at run-time
will be nil; usually there will be some performance gains and memory savings.

Terminology issue: The above makes people wonder "then what IS a privileged
shareable image", because they've often heard of such things. What they're
usually thinking of is more officially called a *protected* shareable image,
which is a shareable image containing user-written system services. This
DOES allow you to provide code that does privileged things without granting
the privs to either the user or to the executable that's doing the calls,
but it's a bit more complex to write than a typical shareable image, and
it's quite complex to write in such a way that its privileges can't be
exploited for purposes not originally intended.

Note 757.47, 4-Mar-1994
Kilgallen: That's why linguists get the big bucks :-)
----------------------------------------------------
> Terminology issue: The above makes people wonder "then what IS a privileged
> shareable image", because they've often heard of such things. What they're
> usually thinking of is more officially called a *protected* shareable image,
> which is a shareable image containing user-written system services. This

I am not sure that the term "protected shareable image" is "more official",
since DEC has used both. Terminology in this area has a history of being
fuzzy, but what do you expect from an operating system which has both
"shareable" images and "shared" images and some which are both :-)

The DECUServe Journal February, 1995 Page 6
Installing a Sharable Image


Note 757.48, 5-Mar-1994
Whitmer: Subsystem ACLs
-----------------------
I have enough experience with this to just be dangerous...

You may use VMS 6.0 new features to better manage this privilege
situation. I have not actually used 6.0 new features to accomplish
this, and only discussed it theoretically with DEC engineers, so my
terminology may be wrong as well. This will get a bit technical, and
you have to be careful when doing something like this, so the solution
may not be for you. But as I remember:

You can make a simple user-written system service which grants privs --
potentially a huge security risk -- but be careful to only grant
privileges unless a certain ACL is present. You may also wish to
redundantly protect the image containing the user system service so it
can only be accessed by a process possessing the ACL.

Then you use the new VMS 6.0 subsystem ACLs to grant that ACL to any
process running the system-manager-approved executable which needs to
directly or indirectly call the RTL which needs to call upon the user
system service to get privs it needs.

You have replaced the need to grant privs to the calling executable
with the need to grant a subsystem ACL. This gives the advantage that
the ACL itself is not _as_ easy to abuse as the privs.

I hate installing images with directly-enhanced privs because the main
image has to be modified to immediately disable any privs that only
came from the image, and you have to be certain that it never calls any
owned or RTL routine which might innocently turn the privs back on via
a standard SYS$SETPRV call. In the case of writing, for example, a
foreign mail protocol RTL for VMSMAIL which may need to access
protected mail areas, Joe Programmer has no way to modify VMSMAIL to
make certain it removes any privs he may have to grant to the main
executable so it will have them authorized when it calls his protocol
RTL. Fortunately, VMSMAIL seems to properly diminish its privs to take
care of this specific case.

As has been pointed out, a user system service could be appropriate,
but many I have seen are improperly written and can be abused, because
the program cannot easily do everything in executive mode that it has
to do to be a well-written system service from verification that the
call is appropriate to last use of the enhanced privs. Someone puts
something in that causes LEF state in executive mode, and lots of
important-but-less-than-executive-mode blocking ASTs fail to fire (and
control-Y is not delivered, etc.), and processes start hanging all over
the place -- just one bad thing that can happen with too much code in
executive mode. But neither granting enhanced privs or granting a
subsystem ACL to an executable can give you the nice effect that a true
user system service does -- routines that can be called from any
by any privileged or non-privileged user's private program and
never abused if properly written.

The DECUServe Journal February, 1995 Page 7
Installing a Sharable Image


If you can make your program take advantage of the subsystem ACL rights
directly instead of via a protected RTL which is protected by the ACL,
you might be able to get away with not installing any image, since the
granting of the subsystem ACL is not (as I have heard) done via
install, so it might not make the image activator go into paranoid
mode (a term I borrow from VMS source code, which means it refuses to
activate non-installed images or follow non-executive-mode logicals).
But I don't know how it could be secure without going into paranoid
mode anyway, so on second thought, it probably does, or any user could
just make a logical and activate their favorite personal RTL from any
program with the subsystem ACL.

Then, I have never done anything with subsystem ACLs other than talk
about them, so feel free to shoot me down or question my logic.

Note 757.49, 9-Mar-1994
Flowers: RTL = Run-time Library
-------------------------------
Re: .45

I mean a run-time library. At a long past DECUS symposium, I attended
a session on writing a RTL, one of the advantages of which was you
could use privileges without installing the calling image with them
(like calling LIB$SET_LOGICAL to set a supervisor-mode logical). I
don't remember much of the talk now, so I don't remember *how* to set
it all up.

Alternately, if you can isolate the priv parts, you could go with a
user-written system service (which may be better documented). This
would give you better control, esp. if your image happens to need a
priv like SYSPRV, where you'd need to turn it off in your main program
and just turn it on in the routines that need it. Otherwise, innocent
things like output file specifications can get you in big trouble (like
a user specifying SYS$SYSTEM:SYSUAF.DAT or SYSUAF: as the filename for
a report).

The new sub-systems may help depending on what you're trying to do; we
haven't upgraded past 5.5-2 yet, so I don't have any experience with
them.

Note 757.50, 9-Mar-1994
Hanrahan:
----------
> I mean a run-time library.

That's what I thought. You've got your terms crossed. No, you mean a
protected shareable image containing one or more user-written system services.

There are just three ways on VMS to provide code which can be "linked against"
when you're linking an executable: Object libraries (which can't use any
The DECUServe Journal February, 1995 Page 8
Installing a Sharable Image


privs that the executable or the user doesn't have), shareable images
(same restriction), and protected shareable images.

Under VMS, the term "run-time library" refers not to a way of collecting such
code (ie "run-time library" is not another point on the same axis with object
libraries and shareable images and protected shareable images) but rather to a
specific set of collections of code that are provided with VMS. The VMS RTLs
encompass the LIB$, STR$, etc., routines, and are supplied in both shareable
image and object library form.


Device Names and the Queue Manager
==================================

The behavior of the queue manager when a device name changes (after
renaming a disk, e.g.) was the topic of much debate on the VMS
conference recently. The resulting discussion produced several
useful technical tips and tidbits.... Participants: Richard Black,
Bruce Bowler, John Briggs, Jim Campobello, John Cason, Dale Coy,
Scott Harrod, Terry Kennedy, Larry Kilgallen, Jean-Francois Mezei,
John Osudar, Keith Parris, John Vottero, Ray Whitmer.


Note 2441.0, 11-Dec-1994
Mezei: Effect of changing disk names on Queue Manager
-----------------------------------------------------
I today changed the hardware config for my system. the disk formerly
called DUB1: is now called DUA2. (same physical disk, same files). It
used to be called logically $DISK2 and is also called $DISK2 now.

The queue manager maintains pointers to FILE-IDs, right ? But it must
also have a pointer to the device name since FILE-IDs do not contain a
device name.

As a result, I had to re-submit all the jobs that were pending after
the device change since they no longer pointed to a valid device name.
(seems that disk logicals are translated by the queue manager)

I had to delete each of these entries and resubmit them.

I was wondering if there were better ways of doing this, or to have the
queue manager keep the logical disk names instead of translating them.


Note 2441.1, 12-Dec-1994
Osudar: nope, it's broken and it won't be fixed
-----------------------------------------------
You've discovered one of the major defects of VMS's queue management
system. It's been there forever, and appears unlikely to ever get
fixed. They did file access by file-ID because spool files (and other
temporaries) have only a file-ID but no legitimate filespec. A better
The DECUServe Journal February, 1995 Page 9
Device Names and the Queue Manager


way to handle it would have been to flag those files as being
by-file-ID and allow other files to be by-filespec (or make it an
option on a per-queue basis).

Note 2441.2, 13-Dec-1994
Kilgallen: The problem is not in the file id
--------------------------------------------
File IDs are fine for changing the disk names. The real problem is that
VMS uses a physical rather than logical name in the queue file. They have
not followed the instructions given with VMS V2.0 for making your programs
be independent of physical device names.

Effective with V5.0, MOUNT /SYSTEM always gives a logical name which
corresponds to the volume label (in addition to any other logical name
you may specify). I believe this was done to support RMS journaling,
but the queue system should be changed to take advantage of it.

Note 2441.3, 13-Dec-1994
Osudar: clarification
---------------------
You're right, I didn't make myself clear in my reply:

It's not the file-ID part that's really the problem. It's the fact
that they don't ever do it by filespec, combined with the violation of
logical name usage that you point out. (Just having the logical name
won't fix the problem either, if the file ID will be different on a
new copy of the same volume.) If they had decided to use the full
filespec of the original file, *and* not break the logical name rules,
then there wouldn't be a problem. (Ironically, the full filespec is
stored in the queue entry anyway, although it's stored with the
physical device name instead of the logical volume name as it ought to
be. But the filespec isn't used for anything by most symbionts.)

Note 2441.4, 13-Dec-1994
Bowler: Are you sure?
---------------------
I was under the impression that the filename was used as a sort of
"security check". If the name of the file at the specified FID doesn't
match the name specified, error...

Note 2441.5, 13-Dec-1994
Osudar: don't think so
----------------------
Maybe it was at one time -- but it certainly doesn't do that now. You
can rename the file and it'll still print it (and delete it if asked).

The DECUServe Journal February, 1995 Page 10
Device Names and the Queue Manager


As far as I can tell, the only real purpose to having the filespec stored
in the queue entry is to display it in a SHOW command. (By storing the
filespec string instead of regenerating it, entries referring to files
on currently unavailable disks can be listed.)

Note 2441.6, 13-Dec-1994
Whitmer: The file-id access is a security feature, not a bug.
-------------------------------------------------------------
Here is my understanding of it from browsing the VMS sources of
versions from 3.1 to 6.1.

The file ID was the security check. For many versions of VMS (all of
4.x and 5.x, at the very least), it would be entirely possible to print a
file, put the entry on hold, delete the original file,
$ SET FILE/ENTER=FILE PROTECTED.FILE, and the symbiont is trivially
tricked into printing the otherwise-protected file, because there is no
other security mechanism build in once the job has been queued. But
since the file is opened by file ID, which is practically unforgeable
(because every time a file header is reused the version in the header
is incremented, thus changing the file ID for the next 65535 or so
re-uses), this trick is hampered.

Prior to VMS 4.0, as I recall, the security was provided another way.
The symbiont changed mode to kernel, loaded the UIC of the submitter,
and tried to open the file. I was very happy when the method changed
in 4.0. Before 4.0, it was impossible to print a file only accessible
via privileges, because when the symbiont changed UIC, it had no way of
knowing which privileges were turned on when the user submitted the
job, so access was denied. So "SET PROC/PRIV=BYPASS" followed by the
printing of a file would invariably fail. The SET UIC trick a little
harier in 4.x. Not only were there now ACLs which also affected file
accessibility, but the symbiont was multithreaded, making it trickier
to reload the UIC without affecting other threads. So the security
check was abandoned altogether in favor of having a secure submission
mechanism $SNDJBC, combined with file ID communication.

Non-DEC symbionts have been written since that time which open files by
the file name instead of the file ID. Each one is a security breach,
to the best of my understanding.

In VMS 6.0 or 6.1, there is additional security checking added to the
file accessing, which I have not fully investigated. I do not know how
that affects the picture.

Note 2441.7, 14-Dec-1994
Kilgallen: File ids should be maintained
----------------------------------------
The file id on the new disk will be the same so long as BACKUP/IMAGE
was used to make the copy.

The DECUServe Journal February, 1995 Page 11
Device Names and the Queue Manager


If it was not, many other things can break as well.

Note 2441.8, 14-Dec-1994
Mezei: So, how do you work around that bug ?
--------------------------------------------
Ok, so there is a "bug/feature" in the queue manager.

So, when you change disk names, do you manually resubmit all the job on
behalf of the users ? Or are there programs that can do that ?

Since I have a small system, it is not a big thing. But if I had to do
that on a large cluster with hundreds of jobs, I would want to have
some automated way of rebuilding the queue manager entries with correct
pointers.


Note 2441.9, 14-Dec-1994
Mezei: In my case, DISKs didn't change at all.
----------------------------------------------
Well, in my case, the file IDs were the same because the disk wasn't
changed at all. It was just the controller that was "moved" from DUB to
DUA and the SCSI adresses that were changed. The physical data was not
moved. Same HDAs.

Note 2441.10, 14-Dec-1994
Coy: How frequently would this occur?
-------------------------------------
> Since I have a small system, it is not a big thing. But if I had to do
> that on a large cluster with hundreds of jobs, I would want to have
> some automated way of rebuilding the queue manager entries with correct
> pointers.

On such a cluster you "never" CHANGE the disk drives -- most often you
ADD disk drives. I'm not trying to minimize the effects of this when
it DOES occur -- but in practice it happens SO seldom that writing an
automated way to do it would seldom be worth it.

Note 2441.11, 14-Dec-1994
Vottero: Use Logical Names ?
----------------------------
> You've discovered one of the major defects of VMS's queue management
> system. It's been there forever, and appears unlikely to ever get
> fixed.

It's a feature not a bug. Lots of application software would break if
the queue manager processed the most recent version of a file rather
than the version which was submitted/printed.
The DECUServe Journal February, 1995 Page 12
Device Names and the Queue Manager



As for the change from DUA1 to DUB1. Did you try:

$ DEFINE/SYSTEM/EXEC DUA1 DUB1


Note 2441.12, 15-Dec-1994
Kilgallen: The problem is in the physical name
----------------------------------------------
> It's a feature not a bug. Lots of application software would break if
> the queue manager processed the most recent version of a file rather
> than the version which was submitted/printed.

No reasonable application software would break if the queue manager tracked
logical names rather than physical names. Doing that and continuing to use
file ids would do the trick.

> As for the change from DUA1 to DUB1. Did you try:
>
> $ DEFINE/SYSTEM/EXEC DUA1 DUB1

Even if the queue manager would honor that, there is tremendous potential
to damage applications which in some cases honor logical names but not in
others. Also consider what happens after the second instance, if you end
up with a circular definition.

DEC should fix the bug, and somebody should raise the issue at Advanced
Q&A this afternoon.

Note 2441.13, 15-Dec-1994
Campobello: Infrequent but tedious
----------------------------------
> I'm not trying to minimize the effects of this when
> it DOES occur -- but in practice it happens SO seldom that writing an
> automated way to do it would seldom be worth it.

It happens to me about once a year, due to various individual disk moves,
and it happened globally this year when we replaced all our RA's with
SCSI drives. We're a very small shop, but it's still annoying to have
to resubmit each job. And the first time I performed a disk move, I
wasn't aware of this behavior, so several production jobs failed to run.

Note 2441.14, 15-Dec-1994
Osudar: what about incremental restores?
----------------------------------------
> The file id on the new disk will be the same so long as BACKUP/IMAGE
> was used to make the copy.

Is that still true if you do BACKUP/INCREMENTAL to restore incrementals
The DECUServe Journal February, 1995 Page 13
Device Names and the Queue Manager


done after the image backup? (I'm asking because I don't know the
answer, not to start an argument :-)

Note 2441.15, 15-Dec-1994
Osudar: version is part of filespec
-----------------------------------
> It's a feature not a bug. Lot's of application software would break if
> the queue manager processed the most recent version of a file rather
> than the version which was submitted/printed.

Irrelevant -- the version number is part of the filespec.
If you say PRINT FOO.BAR it still stores the full filespec
(e.g. DISK$JUNK:[MYDIR.XYZ]FOO.BAR;12345) so it wouldn't "process the
most recent version" even if it used the filespec and not the file ID.

Note 2441.16, 15-Dec-1994
Kilgallen: Incrementals need not apply
--------------------------------------
> Is that still true if you do BACKUP/INCREMENTAL to restore incrementals
> done after the image backup?

It would not be true, but I presumed people were mainly considering the case
were a separate backup (usually disk-to-disk) was done for the purpose of
changing disks.

Note 2441.17, 16-Dec-1994
Whitmer: Special handling for logical name, how about volume name?
------------------------------------------------------------------
> No reasonable application software would break if the queue manager tracked
> logical names rather than physical names. Doing that and continuing to use
> file ids would do the trick.

I do not think it is quite that simple. Perhaps, if (stating the
obvious) only privileged/system-wide logical names were left
untranslated (or you have security problems again). The actual device
field supplied to the symbiont process is a DVI field, which most
applications just shove into the NAM block DVI field along with the FID
to do the open. The queue manager would have to convert it back into a
valid physical DVI before supplying it to the symbiont.

Other OSs seem to be getting away from physical names altogether in
favor of using volume names which remain unchanged when the driver
connection or even the physical drive changes. I think that it
would be a more forward-looking solution if the DVI information were
altered to reflect volume information rather than physical device,
where appropriate, in a way which did not break existing applications
which might have old DVIs stored on disk. This would solve the problem
not just for queue manager, but for all other apps which find it
The DECUServe Journal February, 1995 Page 14
Device Names and the Queue Manager


essential to store DVI/file ID of files on disk.

Note 2441.18, 16-Dec-1994
Osudar: why doesn't system do what applications are supposed to?
----------------------------------------------------------------
Using the logical volume name -- which is an exec mode, concealed and
terminal system logical name, and is always present when a volume is
mounted -- would be an adequate solution. In fact, if the system would
honor the "concealed" and "terminal" attributes the way it expects
applications to do, things would make a lot more sense.

Note 2441.19, 16-Dec-1994
Briggs: LOGVOLNAM not trustworthy
---------------------------------
Things aren't quite that simple. LOGVOLNAM is not always exec mode
and is not always in LNM$SYSTEM. For a disk mounted /GROUP, it's
a supervisor mode logical name in LNM$GROUP_xxx. Group mounted volumes
are currently supported by the batch/print system.

It is reasonable for the batch/print system to circumvent the "concealed"
and "terminal" attributes the way it does. It's up against an issue that
most user programs never face. Files are submitted to the batch/print
system in user context using one set of logical names. They are then
accessed by the symbiont/server/batch stream in a different context with
(possibly) a different set of logical names. The easiest way around this
problem is exactly what is currently done -- use physical device names.

For volumes mounted /SYSTEM, things could (and perhaps should) be done
as you describe.

Note 2441.20, 16-Dec-1994
Mezei: Keep logical device names.
---------------------------------
Hey, to be the devils advocate:

If folks are concerned that if you change device names, the queue
manager should not follow the change by using logical names, then what
about:

Disk names change. Queue manager retains pointer to the old disk name
which happens to now be a different drive. That "new drive" also has a
Hence, you could arrange to mount a disk with the same physical name as
the one before, but with your own trojan horse located at FILEID used
by a job to be runned under account SYSTEM.

The point ? You are better off giving the system manager an easy time
by having the queue manager use logical device names. This way, the
manager can worry about security when such a change occurs.
The DECUServe Journal February, 1995 Page 15
Device Names and the Queue Manager



If you force the system manager to resubmit each job individually, you
waste his time and he won't have time to check the security aspects.

Note 2441.21, 17-Dec-1994
Whitmer: How about specifically allowing for replacement?
---------------------------------------------------------
Another solution might be a new privileged queue manager command:
/REPLACE_PHYSICAL_DEVICE=(ORIGINAL=DUA0,REPLACEMENT=DK200)
command which makes a quick pass through the database, replacing the
old DVI with the new, leaving the rest of the functionality unchanged,
and works as long as the file ids have not changed. But in any case,
the system manager must be smart about what he is doing or security may
be breached.

Note 2441.22, 17-Dec-1994
Coy: Thanks, Larry
------------------
> DEC should fix the bug, and somebody should raise the issue at Advanced
> Q&A this afternoon.

Larry _did_ raise the issue, and the panel of VMS "high rollers" seemed
to appreciate the logic and took notes. I would anticipate a fix in
some future release.

Note 2441.23, 23-Dec-1994
Black: Resubmit Utility needed
------------------------------
I humbly disagree that a utility to resubmit print/batch jobs is not
worth the trouble to write. Having a cluster with hundreds of jobs to
manually resubmit is a very time consuming task. In previous version
of VMS the Queue Manager has been corrupted several times at our site.

In each case our on call person had a lot to do and not much time to do
it. A utility that could salvage as much as possible would be a very
useful. From the little I known about the new Queue Manager, it is not
exempt from corruption and does not provide options for recovery.

Note 2441.24, 24-Dec-1994
Coy: OK, I agree
----------------
I stand corrected -- obviously it would be worth it to you to write a
resubmit utility.

When you write it, please post it here and/or contribute it to the SIG
Tape.
The DECUServe Journal February, 1995 Page 16
Device Names and the Queue Manager

Note 2441.25, 24-Dec-1994
Mezei: ANA/QUEUE/OUTPUT=temp.com *
----------------------------------
Actually, what might be interesting is a utility to take a snapshot of
the queue system and output it as a command procedure that can resubmit
all these jobs with the same attributes. That generated command
procedure would also have the commands to re-initialise the
queue-system


Note 2441.26, 24-Dec-1994
Kennedy: How about...
---------------------
> Actually, what might be interesting is a utility to take a snapshot of
> the queue system and output it as a command procedure that can resubmit
> all these jobs with the same attributes. That generated command
> procedure would also have the commands to re-initialise the
> queue-system

Didn't the upgrade procedure in V5.something (when the new queue manager
was introduced) have a utility like this? CONVERT_QUEUES.COM or something?
Perhaps that would serve as a start.

Note 2441.27, 24-Dec-1994
Harrod: FIXQUE.COM ?
--------------------
A few years ago - pre VMS V5.5 days - I saw a procedure like that. As
I recall it was called FIXQUE.COM and came (I think) from CSC.

It basically did a SHOW QUEUE/FULL and parsed the output. The
SHOW QUEUE output format change at VMS V5.5 broke the procedure.

It tried to get the form and queue definitions as well as the job
information. It wasn't a "salvage all you can from a corrupt queue"
file sort of thing, though.

I did use it a couple of times to resubmit jobs when we moved some
users to different disks. I changed the device name in the .COM file
generated by FIXQUE.COM and made a few other minor changes. It helped,
but I still lost some jobs.

Note 2441.28, 24-Dec-1994
Coy: Some alternatives
----------------------
FIXQUE.COM is here in the VMS Conference, Topic 1318 (around reply
_.21/.22).
The DECUServe Journal February, 1995 Page 17
Device Names and the Queue Manager



With the advent of the new queue system, there are much better ways to
get a "snapshot" of the queue files. I did a fair bit of research on
this, and posted a "how to" procedure also -- but that doesn't exactly
address the needs stated here, because it's goal was to "snapshot" the
queue files. It DOES, however, address the question of how to protect
against "queue file corruption".

An update of FIXQUE.COM might do what is requested here. However, it
might be much easier to do using the more-recent Queue lexical
functions.

Note 2441.29, 27-Dec-1994
Cason: Klugey Hack, but it works!
---------------------------------
Well, this might me a start in the right direction. This is a bit of a hack ;-)
(actually I write pretty poor and not so efficient DCL, but this gets the job
done for me), so I hope it helps. Just run the procedure and it will put a
file in your SYS$LOGIN called que_rebuild.com. I run it every couple of hours
cause I have been bit and am paranoid.

John

---------------------------------------
$! -------------------------------------------------------------------------
$!
$! This command procedure will scan through all queues on a system and will
$! creeate an output file that will re-enter all jobs into a new que file.
$! This procedure should be run quite often.
$!
$! 07/09/93 John D. Cason
$!-----------------------------------------------------------------------------
$ SET NOON
$ WSO:= WRITE SYS$OUTPUT
$ WOF:= write outfile
$ OPEN/WRITE OUTFILE SYS$SCRATCH:QUE_REBUILD.COM
$ WOF "$ SET PROC/PRIV=CMKRNL"
$ TEMP = F$GETQUI("")
$QLOOP:
$ QNAME = F$GETQUI("DISPLAY_QUEUE","QUEUE_NAME","*","WILDCARD")
$ IF QNAME .EQS. "" THEN GOTO EXIT
$ QTYPE = F$GETQUI("DISPLAY_QUEUE","QUEUE_BATCH",-
"''QNAME'","WILDCARD,FREEZE_CONTEXT")
$ XXX=0
$ JLOOP:
$ NOACCESS = F$GETQUI("DISPLAY_JOB","JOB_INACCESSIBLE",,"ALL_JOBS")
$ IF NOACCESS .EQS. "TRUE" THEN GOTO JLOOP
$ IF NOACCESS .EQS. "" THEN GOTO QLOOP
$!
$ IF XXX.EQ.0
$ THEN
$ IF QTYPE.EQS."FALSE"
The DECUServe Journal February, 1995 Page 18
Device Names and the Queue Manager


$ THEN QTYPE = "Non-Batch"
$ ELSE Qtype = "Batch"
$ ENDIF
$ XXX=1
$ ENDIF
$!
$ JNAME = F$GETQUI("DISPLAY_JOB","JOB_NAME",,"FREEZE_CONTEXT,ALL_JOBS")
$ ENTRY = F$GETQUE("DISPLAY_JOB","ENTRY_NUMBER",,"FREEZE_CONTEXT,ALL_JOBS")
$ USER = F$GETQUI("DISPLAY_JOB","USERNAME",,"FREEZE_CONTEXT,ALL_JOBS")
$ LOGSPEC=F$GETQUI("DISPLAY_JOB","LOG_SPECIFICATION",,"FREEZE_CONTEXT,ALL_JOBS")
$ RESTART = F$GETQUI("DISPLAY_JOB","JOB_RESTART",,"FREEZE_CONTEXT,ALL_JOBS")
$ FORM = F$GETQUI("DISPLAY_JOB","FORM_NAME",,"FREEZE_CONTEXT,ALL_JOBS")
$ NOTI = F$GETQUI("DISPLAY_JOB","JOB_NOTIFY",,"FREEZE_CONTEXT,ALL_JOBS")
$ LOG_DEL = F$GETQUI("DISPLAY_JOB","JOB_LOG_DELETE",,"FREEZE_CONTEXT,ALL_JOBS")
$ LOG_PRINT= F$GETQUI("DISPLAY_JOB","JOB_LOG_SPOOL",,"FREEZE_CONTEXT,ALL_JOBS")
$ COPIES = F$GETQUI("DISPLAY_FILE","FILE_COPIES")
$ PRIO = F$GETQUI("DISPLAY_JOB","PRIORITY",,"FREEZE_CONTEXT, ALL_JOBS")
$ ERR =F$GETQUI("DISPLAY_JOB","JOB_ERROR_RETENTION",,"FREEZE_CONTEXT,ALL_JOBS")
$ JOB_TIME = f$getqui("display_job","after_time",,"all_jobs,freeze_context")
$!
$ JOB_TIME = F$EXT(0,11,JOB_TIME)+":"+F$EXT(12,11,JOB_TIME)
$ !
$ ! Get PID for job
$ JOB_PID = f$getqui("display_job","job_pid",,"all_jobs,freeze_context")
$ JOB_STATUS=""
$ !
$ ! Determine job status
$ if f$getqui("display_job","job_timed_release",,"all_jobs,freeze_context") -
then job_status = "Holding Until ''job_time'"
$!
$ Z=1
$ FILE_LOOP:
$ FILES=F$GETQUI("DISPLAY_FILE","FILE_SPECIFICATION")
$ FD = F$GETQUI("DISPLAY_FILE","FILE_DELETE",,"FREEZE_CONTEXT")
$ IF FD .EQS."FALSE"
$ THEN
$ FD = "No"
$ ELSE
$ FD = "Yes"
$ ENDIF
$!
$ IF FILES .NES. ""
$ THEN
$ FILE'Z'="''FILES'"
$ Z=Z+1
$ GOTO FILE_LOOP
$ ELSE
$ Z=Z-1
$ ENDIF
$!
$ IF LOGSPEC.NES.""
$ THEN
$ ENDIF
$ X=1
The DECUServe Journal February, 1995 Page 19
Device Names and the Queue Manager


$ PLOOP:
$ PARAM'X=F$GETQUI("DISPLAY_JOB","PARAMETER_''X'",,"FREEZE_CONTEXT,ALL_JOBS")
$ param'X=F$EDIT(param'x,"TRIM")
$ IF PARAM'X .EQS. ""
$ THEN
$ GOSUB OUT_PUT
$ GOTO JLOOP
$ ENDIF
$ X=X+1
$ IF X.EQ.9 THEN GOTO JLOOP
$ GOTO PLOOP
$!------------------------------------------------------------------------
$! SUBROUTINES
$!------------------------------------------------------------------------
$!
$ OUT_PUT:
$ if Qtype.eqs."Batch"
$ then
$ WOF "$! "
$ WOF "$! "
$ WOF "$ SUBMIT/QUE=''qname' -"
$ WOF " /USER=''user' -"
$ WOF " /PRIO=''prio' -"
$ IF LOG_DEL .EQS."FALSE" THEN WOF " /KEEP -"
$ IF JOB_STATUS .NES.""
$ THEN
$ WOF " /AFTER=''JOB_TIME' -"
$ ENDIF
$ IF RESTART.EQS."TRUE" THEN WOF " /RESTART -"
$ GOSUB PARAM_OUTPUT
$!
$ IF LOGSPEC .NES."" THEN WOF " /LOG=''LOGSPEC' -"
$ IF LOG_PRINT .EQS. "FALSE" THEN WOF " /NOPRINT -"
$ IF NOTI.EQS."TRUE" THEN WOF " /NOTIFY -"
$ IF ERR.EQS."TRUE" THEN WOF " /RETAIN=ERROR -"
$ FILE1=F$EXTR(1,F$LEN(FILE1),FILE1)
$ WOF " ''FILE1'"
$ ELSE
$! NON-BATCH WORK HERE.
$ WOF "$! "
$ WOF "$! "
$ WOF "$ PRINT/QUE=''QNAME' -"
$ WOF " /USER=''USER' -"
$ WOF " /PRIO=''prio' -"
$ WOF " /FORM=''FORM' -"
$ IF JOB_STATUS .NES.""
$ THEN
$ WOF " /AFTER=''JOB_TIME' -"
$ ENDIF
$ GOSUB PARAM_OUTPUT
$ if copies.gt.1 then WOF " /COPIES=''COPIES' -"
$ IF NOTI.EQS."TRUE" THEN WOF " /NOTIFY -"
$ IF ERR.EQS."TRUE" THEN WOF " /RETAIN=ERROR -"
$ A=1
The DECUServe Journal February, 1995 Page 20
Device Names and the Queue Manager


$!
$ IF Z.EQ.1
$ THEN
$ OUTSTRING=FILE'A
$ OUTSTRING=F$EXT(1,F$LEN(OUTSTRING),OUTSTRING)
$ WOF " ''OUTSTRING'"
$ ENDIF
$!
$ NEXT_FILE:
$ IF Z.GT.1
$ THEN
$ IF A.LT.Z
$ THEN
$ OUTSTRING=FILE'A
$ OUTSTRING=F$EXT(1,F$LEN(OUTSTRING),OUTSTRING)
$ WOF " ''OUTSTRING' + -"
$ A=A+1
$ GOTO NEXT_FILE
$ ELSE
$ OUTSTRING=F$EXT(1,F$LEN(OUTSTRING),OUTSTRING)
$ OUTSTRING=FILE'A
$ WOF " ''OUTSTRING'"
$ ENDIF
$ ENDIF
$ ENDIF
$!
$!
$ RETURN
$!
$!
$!
$ PARAM_OUTPUT:
$!
$ Y=1
$ PARAM_COUNT_LOOP:
$ IF PARAM'Y .NES. ""
$ THEN
$ Y=Y+1
$ GOTO PARAM_COUNT_LOOP
$ ELSE
$ NUM_PARAMS=Y-1
$ ENDIF
$!
$ IF NUM_PARAMS.EQ.1 THEN WOF " /PARAM=(""''PARAM1'"")"
$ IF NUM_PARAMS.GT.1 THEN WOF " /PARAM=(""''PARAM1'"", -"
$ IF NUM_PARAMS.EQ.2 THEN WOF " ""''PARAM2'"") -"
$ IF NUM_PARAMS.GT.2 THEN WOF " ""''PARAM2'"", -"
$ IF NUM_PARAMS.EQ.3 THEN WOF " ""''PARAM3'"") -"
$ IF NUM_PARAMS.GT.3 THEN WOF " ""''PARAM3'"", -"
$ IF NUM_PARAMS.EQ.4 THEN WOF " ""''PARAM4'"") -"
$ IF NUM_PARAMS.GT.4 THEN WOF " ""''PARAM4'"", -"
$ IF NUM_PARAMS.EQ.5 THEN WOF " ""''PARAM5'"") -"
$ IF NUM_PARAMS.GT.5 THEN WOF " ""''PARAM5'"", -"
$ IF NUM_PARAMS.EQ.6 THEN WOF " ""''PARAM6'"") -"
The DECUServe Journal February, 1995 Page 21
Device Names and the Queue Manager


$ IF NUM_PARAMS.GT.6 THEN WOF " ""''PARAM6'"", -"
$ IF NUM_PARAMS.EQ.7 THEN WOF " ""''PARAM7'"") -"
$ IF NUM_PARAMS.GT.7 THEN WOF " ""''PARAM7'"", -"
$ IF NUM_PARAMS.EQ.8 THEN WOF " ""''PARAM8'"") -"
$ RETURN
$!
$EXIT:
$ WOF "$ exit"
$ CLOSE OUTFILE
$ SET FILE/VER=3 SYS$SCRATCH:QUE_REBUILD.COM
$ EXIT

Note 2441.30, 27-Dec-1994
Mezei: Effect of changing job numbers ?
---------------------------------------
Thanks for the procedure posted in .-1 ! I am sure it will come
in handy.

Here is a question I never thought about:

When rebuilding queues and resubmitting the jobs, the actual job
numbers will be different. Could this affect any software that might
keep track of the job numbers it has submitted ?

In other words, does anyone know of software that would be affected by
having its jobs renumbered without its knowledge ?

Note 2441.31, 27-Dec-1994
Coy: Could be
-------------
> In other words, does anyone know of software that would be affected by
> having its jobs renumbered without its knowledge ?

Of course! For instance, the ForWords indexing jobs on DECUServe could
be affected (as an example of batch queue stuff).

If the software captures $ENTRY and intends to use it later, it is
going to be "surprised". And, of course, it might be unlucky enough to
get an entry number that is "re-used". Doing a delete/entry=nnn in
that case would have really mysterious results.

Note 2441.32, 28-Dec-1994
Parris: FIXQUE.COM for V5.5 and up now available
------------------------------------------------
Re: .27/.28

I wrote FIXQUE.COM at the CSC in the days of 5.0-1 and 5.0-2, specifically to
help recover from corrupted queue files. It also turned out to be quite handy
The DECUServe Journal February, 1995 Page 22
Device Names and the Queue Manager


in the 5.4-x days with all the problems we had then. Since V5.5, things seem
to have mostly settled down. A few folks have used it as new system managers
to get a snapshot of what their predecessor(s) had done to/for their queue
file, just in case. It does look like it'd be an easy way to change the device
name for queue entries.

At the tail end of topic 1318, I've posted the version which works with V5.5
and later versions. I'm sorry that folks didn't get a copy earlier; I
submitted it in an article for DSNlink about 1991, but it must not have made it
there.

Re: .29

When F$GETQUI was introduced with V5.2, I was tempted to use it instead of
parsing the SHOW QUEUE listing, but didn't because:
1) I was lazy and already had code doing it the other way
2) Using F$GETQUI would prevent use of the procedure on versions prior to V5.2
3) I didn't feel confident at the time that F$GETQUI would work reliably when
given a corrupted queue file. I retained the option for folks to edit the
SHOW QUEUE listing if it contained some junk, and then run it through the
grinder again if necessary.

John Cason's procedure is nice work, though. Looks like today it should be the
first line of attack, and call FIXQUE.COM in for reinforcement as necessary.

Note 2441.33, 15-Jan-1995
Black: Slight patch for Que Rebuild
-----------------------------------
John Cason,

Thanks for posting your procedure. I had a problem with it where it
got stuck in an endless loop giving JBC-E-NOQUECTX, no queue context.
I finally got a little time to debug it, and found out that I had a
process logical with the same name as a queue. It seems that a
NOQUECTX error causes the wildcard part of the QNAME code to reset and
you keep getting the same queues checked over and over. I made the
following small change which will let you know which queue is having
the problem.

Replace the SET NOON with and ON ERROR THEN GOTO ERR_RTN. Add the
ERR_RTN right before the EXIT: label.

$ON ERROR THEN GOTO ERR_RTN
.
.
.
$ERR_RTN:
$ SHOW SYMBOL QNAME
$ WOF "$! Error with Queue: ''QNAME'"
$EXIT:

Once again, Thanks for procedure. It works well and fairly quick,
The DECUServe Journal February, 1995 Page 23
Device Names and the Queue Manager


about a minute for a cluster with over a hundred queues (most empty
when I ran it).

Note 2441.34, 23-Jan-1994
Black: Que Rebuild needs a dash for PARAM1
------------------------------------------
I found one other problem with Que Rebuild. Batch jobs that have only
one parameter will not work with the current procedure because the
continuation mark "-" is missing at the end of the line. To fix this
find the label PARAM_OUTPUT: and look for the following line:

IF NUM_PARAMS.EQ.1 THEN WOF " /PARAM=""''PARAM1'"")" ! Change it to
IF NUM_PARAMS.EQ.1 THEN WOF " /PARAM=""''PARAM1'"") -"

It works fine after adding the dash to the end of the line. Once
again, Thanks for the procedure John.

ALL-IN-1 Tuning Tips
====================

There are people (more than a few) who believe that "ALL-IN-1" and
"performance" do not belong together in the same sentence. The
degree of truth in that opinion is the stuff of which holy wars are
made. Be that as it may, ALL-IN-1 is like any other software
product in one important respect: it runs better if it's tuned
properly. The following discussion took place in the ALL-IN-1
conference a few months ago, and covers a wide range of tips and
tricks to improve performance.

Participants: David Butterworth, David Campen, Dale Coy, Al Hull,
Jean-Francois Mezei, Lynda Peach, Pat Scopelliti, Don Vickers.


Note 1042.0, 19-Sep-1994
Butterworth: Fine Tuning an ALL-IN-1 System
-------------------------------------------
performance on our ALL-IN-1 system has slowed to the point that we've
decided to call in the big guns to do some system tuning/reallocation
(our SDAF.DAT is up above a million blocks, i believe!). my question
is shd we have the folks at digital take care of this, or do people
have better experiences with third-party troubleshooters (we are in
the philadelphia area, by the way)? our biggest concern is that we
don't get someone who doesn't know what they are doing.

The DECUServe Journal February, 1995 Page 24
ALL-IN-1 Tuning Tips


Note 1042.1, 19-Sep-1994
Mezei: Check what is left at DEC's local office
-----------------------------------------------
Well, ask Digital who they would be sending, and ask for their
credentials. With the "restructuration" at DEC, it is possible that
local offices may have had to let loose their ALL-IN-1 gurus because of
the reduced headcount goals. If you are in good terms with the local
office, they may refer you to those former DEC employees if they
started their own consulting company.

Also, I believe that you may find a couple of companies here on
DECUSERVE who may be able to help you out. (Don, do I get a commission ?)

Note 1042.2, 19-Sep-1994
Vickers: Use DECUServe to save money and time
---------------------------------------------
JF,

Thanks for the plug (I guess ;').

My advice to db is to get as much help as you can from your friends
here on DECUServe before paying big money for some 'expert' to come in.
Generally, good ALL-IN-1 housekeeping practices will avoid having
horrible ALL-IN-1 performance problems.

It sounds like your site has not performed a great deal of housekeeping
work. Do you perform the normal housekeeping jobs at all? The most
important are EW, RSF, RSD, & TRM. See the Management Guide for
details.

You should also optimize the FDL settings for the key files and be sure
that you have global buffering set on the files as described in the
Management Guide. You should check to see if the OA$MTI_LOG file is
renamed on a routine basis so that you aren't having to 'carry' a huge
file on every mail message send operation.

Since the only clue you have given us about your performance problem is
the size of your SDAF it may be that you would be well advised to run
one of the varieties of 'Cleanmail' utilities that delete old mail
messages. Many SDAF problems can be solved (or significantly improved)
by deleting mail messages.

There are a variety of factors that affect performance. Many of them
have been discussed in this conference so you might want to use
ForWords to search for ALL-IN-1 performance or just do a directory of
the conference for performance.

I also suggest that you supply more details here and you will receive
all sorts of help (along with some varied and opposing viewpoints, I
bet ;').

Digital has eliminated many fine folks and does not appear interested
The DECUServe Journal February, 1995 Page 25
ALL-IN-1 Tuning Tips


in these sorts of services so I suspect that you'll have some
difficulty in getting someone really good from them. I mean no
disrepect to the many great folks left at Digital (this week) but
Digital does not have a good track record for providing 'excellence' in
the services area these days. Just last week-end I received half a
dozen phone calls from a Digital 'expert' on site doing an upgrade
asking some really basic (and dumb) questions. Al Hull is the last
remaining person I know at Digital who knows ALL-IN-1 and does good
services. He'll come along here and see your note (and mine, too :').
If you can get your Digital rep, if any, to assure that Al leaves
Detroit to help you then you'll be well served. Otherwise my money
would be against using Digital (and I am a stockholder).

I am a third party who does this sort of thing for a 'living'
(fortunately I have tons of Digital stock to sell :') so my view point
can be biased. You will be well served by helping yourself as much as
possible but getting help from third parties is USUALLY a happy
experience. Obviously, your mileage may vary. Performance issues tend
to result in opposing viewpoints and approaches. My advice is to get
an understanding of the various rationales and reasons for each
approach presented. Learning just to pull strings is not nearly as
effective as understanding what the string does and why.

There is a large company near you called Ioele, Griggs, and Associates
who do this sort of thing. If you need to go beyond what you can get
from us here on DECUServe for free you might want to contact them.
They had an 'ad' around here somewhere. I am sure you can find it.

Let us know more details and I am sure you'll get some great help.

Note 1042.3, 21-Sep-1994
Butterworth: OK ... but don't laugh
-----------------------------------
we are running ALL-IN-1 v3.0 under OpenVMS 5.5-2. we have about 1,900
accounts established, 300-400 of which are used regularly (i.e., log in
at least once a month). the number of simultaneous users has recently
averaged out at about 30/day.

we run the EW housekeeping job daily, and the ROF job over the weekend.
the former takes between 1-1.5 hours, and the latter about 13 hours! we
periodically run a modified CLEANMAIL program that deletes mail older than
30 days from INBOX and CREATED folders only, but are considering going the
whole hog and including READ and OUTBOX too. we do *not* run the RSF, RSD
and TRM jobs (why? i don't know). when we did attempt to reorganize the
system files recently it did all the files it was supposed to do fine, but in
doing the SDAF got numerous "record out of sequence" errors and, approximately
1% "duplicate index errors." we suspect that most of the "out of sequence"
errors were just objecting to each record after the misplaced one, e.g., in
the sequence abcdzefghi flagging e, f, g, h, i, but it wd be nice to confirm
this. how we can delete or reorder the z record, for example?

we use the default ALL-IN-1 VMS resource quotas--is that right or should
The DECUServe Journal February, 1995 Page 26
ALL-IN-1 Tuning Tips


we change them, and if so, in what way? the biggest problem is the ALL-IN-1
initialization. it takes about 30 seconds to load on a good day (i.e., from
the time you type "$ allin1" to the time the main menu displays. how can we
speed that up? are there data files for things that we don't use, like
calendaring for example, that contain record(s) for every user that is/are
checked every time they get into ALL-IN-1? can we make those files empty or
stop ALL-IN-1 accessing them at all? is there code in OA$MAIN that we don't
use and is there any easy way of cutting it out if there is any quantity of it?

also, we currently have 20 shared areas but these fill up quickly. as an
example, those established 8/5 are already "full" (>128 blocks) by DEC's
criteria. we do not usually make new ones until they are "overfull," since
in our experience (e.g., when we created these ones we went from 6 of about
900 blocks each without any noticeable improvement in performance) it makes
no difference.

hope this sheds some light on our predicament. please don't tell me 30
seconds on a good day is "normal"! thanks much.

Note 1042.4, 21-Sep-1994
Mezei: What about once image is activated ?
-------------------------------------------
Even my microvax II is capable of launching ALL-IN-1 in less than 30
seconds ! (then again, I am the only user:).

Make sure that you examine the ALL-IN-1 startup procedure log carefully
(if you run it as a batch job, it will be all in the .LOG file) for any
errors. ALL-IN-1 may not install completely and you may get critical
files that are not installed and therefore shared.

Also, you will have to check for disk fragmentation. If your system
files such as PENDING.DAT and SDAF.DAT etc are fragmented, you will get
hit with poor performance.

You mentioned slow activation of ALL-IN-1. What about once you are in
it, is it very slow too ?


Note 1042.5, 21-Sep-1994
Hull: I second Don's comments
-----------------------------
Don - thanks for the compliment! 8^) Of course, now that you'd said
I'm one of the few left, I'm cursed! 8^)

David - your Cleanmail-runs against just the Inbox and Created folders
aren't going to gain you much compared to getting the Read and Outbox
folders. In fact, I've never heard of running against the Created
folder... In any case, the READ/OUTBOX is where everyone leaves all
their mail and forgets about it. You would be well-advised to
immediately begin running against those two additional folders for the
next month on a weekly basis - informing your users in advance, of
The DECUServe Journal February, 1995 Page 27
ALL-IN-1 Tuning Tips


course.

You need to also stay on top of the shared directories as far as size,
number of files, etc. Make 10-20 new subdirs as soon as the current
area fills up. Do you use only 1 mail Area (DAF_E?), or do you run
multiple areas (DAF_A -> DAF_E, etc) to spread out the I/O load and DAF
file sizes, etc?

As far as boot-up time into A1, what kind of VAX systems are you
running on (VUPS)? How much memory? How many concurrent logins, etc? All
these things add to the workload, and affect/delay the time to fire it
up. I'm no performance guru, but there are too many variables involved
to just blindly say that 30 seconds is unreasonable for a given site.

My recommendations: Get Cleanmail going full blast ASAP. Get the
other housekeeping runs that Don listed going. Once you get over the
first big hurdle, aggressive housekeeping and some possible
restructuring of your mail system will keep it humming right along!


Note 1042.6, 21-Sep-1994
Vickers: Notes entry clash with Al - similar thoughts/questions
---------------------------------------------------------------
30 seconds to start ALL-IN-1 goes far beyond normal. In fact, it's
beyond Abby Normal as well. The SDAF and shared areas have small
impact on image activation so let's defer that for a bit and
concentrate on things that can affect image activation.

The factors that typically affect image activation are CPU and I/O.
Paging is affected by both and of these and the activation of OA$IMAGE
is a paging frenzy.

What is your hardware configuration? What size CPU and memory? Is
OA$LIB on the system disk? What are the average and peak utilization
values for CPU and paging? It would also be good to observe the I/O
rate on the OA$LIB disk as well.

What are the settings on Global Buffering on the data files? I assume
that you have done the steps described in chapter 15 of the Management
Guide? Following these SHOULD provide better activation than 30
seconds. Global buffers on the data files is the best way to improve
image activation on that score. Eliminating things like TM has
absolutely no effect. Digital tried that years ago.

The corrupted SDAF is a big concern. Running with a corrupted file is
not a good idea at all. It is likely to become more corrupt and
eventually fail altogether. The CSC has some tools to correct most
SDAF corruption problems and I would suggest calling them to see if
they can help. Given that you have a single SDAF which is on the huge
side it might be a good idea to close it and start a new SDAF, like in
OA$SHARD, for all users. This will stop new records from being added
to the corrupt and large SDAF. This will make it less likely that
you're left in the situation of having to inform your clients that any
The DECUServe Journal February, 1995 Page 28
ALL-IN-1 Tuning Tips


mail sent since the SDAF failed (when it finally does) is lost.
Clients tend to have little 'humor' when it comes to lost mail. (':

Cleanmail utilities are most effective when they 'clean' the READ and
OUTBOX folders. These folders tend to be the places that contain the
vast majority of 'stuff'. I have seen systems that have over half of
the shared area in old documents in these two folders alone. Granted,
this is rare but my guess is that you will see some good value in
'cleaning' these two folders.

Let us know more about your configuration and I suspect that we'll be
able to make your system a bit more reactive.

Note 1042.7, 21-Sep-1994
Butterworth: more dirt...
-------------------------
OK. we have a VAX6310 with 4 RA92 2GB disks and 2 HSC50 intelligent
disk controllers. the CPU is a single processor with 160MB of memory.
OA$LIB is *not* on the system disk. all of the ALL-IN-1 files, and
the majority of our users, are on the same, but separate disk.

> What are the average and peak utilization
> values for CPU and paging?

we're looking into it. the understanding right now is that we have
to upgrade our users' working set SYSUAF parameters. we are using
approx. 40000 pages in the page file at peak times. the pagefile is
126000 blocks total.

> It would also be good to observe the I/O
> rate on the OA$LIB disk as well.

as mentioned above, OA$LIB is on DSK2$, as are most of our users. we
recently added another disk, and this is where the shared areas now
reside (as they seemed to want contiguous space), as well as new users
we do regular refreshes of these disks, BTW.

> What are the settings on Global Buffering on the data files?

don't know. but i do believe we need to fix these, as they're likely to
be set for 15 simultaneous users. sounds like this shd be one of our
first courses of action?

> Do you use only 1 mail Area (DAF_E?), or do you run
> multiple areas (DAF_A -> DAF_E, etc) to spread out the I/O load and DAF
> file sizes, etc.

we just have the one mail area right now. our concern was that transitioning
to more than one would be problematic because of the need to balance users
between them. right, or wrong?

and yes, the need to run CLEANMAIL for READ and OUTBOX is pretty obvious
The DECUServe Journal February, 1995 Page 29
ALL-IN-1 Tuning Tips


at this point. maybe we'll catch some of that stuff dating back to 1998!

Note 1042.8, 21-Sep-1994
Peach: Check shared directory file # and size
---------------------------------------------
Just another thing that delays ALL-IN-1 startup for a user is Count
Tasks and Display Tasks field set to "Y" when the user doesn't use
Action Items (Tasks).

Default has those set to Y so I suspect your users
accounts are set that way.

There is a limit how many files should be in a Shared directory.
And a limit how big be no more than 500.
For example,the file number in a [.SHAREx] should be no more than
500 files in that directory.

If you do a DIR/SIZE on disk:[xxx] that contains your [.SHAREx]
directories, you should not size more than 127 blocks for any
directory. If you do, close those down immediately and create new
ones.

It also sounds like you should investigate opening up a new Mail Area
and closing OA$SHARE. This has probably already been suggested but I
haven't had time to read the above notes in detail.

Note 1042.9, 21-Sep-1994
Vickers: More advice
--------------------
Having the client files on the same disk as ALL-IN-1 (or the operating
system) is the best design for speed and efficiency. This creates a
very significant peak load on the spindle (and heads). My guess is
that moving the client files off of the ALL-IN-1 disk will result in a
noticeable improvement.

Performance tuning is trying to have CPU, I/O, and memory all run out
at the same time. The goal is to move each bottleneck farther out
until all three resources become exhausted at the same time. You must
determine the status of the resources of your system in order to
perform tuning. My advice is to start with the MONITOR utility. The
most direct way to observe the system is to just do $ MONITOR SYSTEM
command and just watch as folks start ALL-IN-1. This allows you to see
the CPU and memory activity. There are a set of tools in
SYS$EXAMPLES:*MON*.COM which provides a nice little 'system' for
gathering more complete data. Take a look at those files for more
details on how to setup the 'system'.

I suspect the next step is to increase the working set UAF parameters.
The actual values you select depend upon the amount of free memory you
have in a 'normal' load. If you have quite a bit of free memory then
The DECUServe Journal February, 1995 Page 30
ALL-IN-1 Tuning Tips


increase the WS settings. I prefer to have WSDEF=600, WSQUO=1024, and
WSEXTENT=4096. These are open to debate and subject to adjustment. My
rationale is to keep the ALL-IN-1 process in a memory rich environment
as much as possible.

Global buffering can have a positive effect but it is secondary or
tertiary to the factors above.

I doubt that you'd get any benefit from having more than one mail area
open at a time. You don't have enough spindles to support multiple
mail areas. The idea of having multiple mail areas is to allow
different areas to be on different spindles. I suggest that you create
one additional mail area and close the existing one. You can then run
the BMA (Balance Mail Area) job to move all your clients to the new
area. It's simple and painless to do.

Note 1042.10, 21-Sep-1994
Coy: Is this helping?
---------------------
> increase the WS settings. I prefer to have WSDEF=600, WSQUO=1024, and
> WSEXTENT=4096. These are open to debate and subject to adjustment. My

Some debate follows - IMO, there is little to be gained (with recent
versions of VMS and ALL-IN-1) by setting WSEXTENT=4096. A much larger
value (say 16384 or something) is not going to hurt anything. Of
course, the Pagefile has to be big enough - but that's true for 4096
also.

I don't recall that the current values of the UAF parameters have been
given yet. If they are posted here (particularly the WS parameters,
including the ones from SYSGEN, too) then we might have more advice.


Note 1042.11, 21-Sep-1994
Mezei: More debate
------------------
Also, deleting stuff from CREATED doesn't help much on a system-wide
basis since CREATED documents are not shared (usually) and reside in
the user's file-cabinet.

You might wish to reorganise each user's file cabinet. You may find
that their DOCDB and DAF.DAT files are bigger then necessary.

Also, if you monitor your system, check out if there isn't anything
else that would hog the system thus making response-time worse.

Also, check your sysgen parameters to make sure that UAF parameters are
not overwritten by SYSGEN (eg: if WSMAX in sysgen is set to 1000,
giving 5000 to users will only give them 1000).

The DECUServe Journal February, 1995 Page 31
ALL-IN-1 Tuning Tips


Note 1042.12, 21-Sep-1994
Scopelliti: Whilst you're at it...
----------------------------------
While you're gathering data...

In a typical user's account, do a SHOW WORK to see the actual working
set limits in use.

Did you post total system memory?

Also, get into the MANAGER user in ALL-IN-1, type A1CONFIG then enter
A1BASE in the Language field. Post the contents of the first four
location fields: File, Data, Site File, Site data. Do the same for
language = ENGLISH. These control where your ALL-IN-1 system files go.
Do you have many customizations? Do you support more than one
language?

I strongly echo Don's comments about SDAF - get it fixed! Remember the
response from the man who fell out of the Empire State Building. When
asked how things were as he passed the 40th floor: "So far, so good."

OK.. I know.. enough! I need a said-a-give anyway ;-}

Note 1042.13, 21-Sep-1994
Peach: More suggestions
-----------------------
I agree with Don that opening more than one mail area at a time doesn't
really buy you anything in performance. I run two (I have 5000 users
in one cluster). My SDAF for that area approaches 780,000 blocks --
but I run RSF every other weekend and it comes down to 650,000.

*NORMALLY* I would be closing that area -- but we are moving to our new
Alphas in mid-November and I don't want to deal with mixing 'old'
references in OA$SHARE with the new.

Under most circumstances I'd just close D and re-open E.

Other things to check--- what is the size of your MTIERR.LOG and
MTILOG.LOG in your [ALLIN1.MGR] area? I suspect they are huge. simply
do a $ REN MTILOG.LOG MTILOG.BAK. Do the same with the ERR. That
alone will help performance.

Also -- make sure your users who are captive are not blaming ALL-IN-1
for bad performance on a 'captive' login file. You'd be astonished at
what I've seen people put in SYLOGIN.COMs or some 'community'
LOGIN.COM. Some sites are really good about putting stuff in -- but
lousy at getting stuff out.

I've found Mobilizer being activated for *EVERY user. Not bad --
except Mobilizer had been installed for a test the previous YEAR and
never removed. The files were there and SYLOGIN faithfully executed
everything -- even the stuff the users never were going to use.
The DECUServe Journal February, 1995 Page 32
ALL-IN-1 Tuning Tips



Users sit down to log into ALL-IN-1. From the moment they enter their
password, they count the time against the ALL-IN-1 login.... perception
becomes their reality.

Another thing to check in user accounts is -- do they have the ALL-IN-1
password set? Unless it is a multiple ALL-IN-1 account to one VMS
account, remove it.

Are your users opening old form libraries that aren't used? Do they
even need USER.FLB? I doubt it. Remove it entirely unless they are
going to actually use it.

Of course, where you are going to improvement your performance the most
is cleaning up your mail, opening a new mail area, and all the other
things that have been pointed out to you. The above just shows that
after you have done that -- there are still a few more things that a
Manager can do to help ALL-IN-1 init faster.

Note 1042.14, 22-Sep-1994
Mezei: The all mighty EVIL SET TERM/INQUIRE
-------------------------------------------
If the 30 seconds for ALL-IN-1 activation is calculated at login time,
you should also check that ever time consuming "SET TERM/INQUIRE"
command in SYLOGIN.COM, LOGIN.COM and any other command procedure that
is called. I once saw a system where SET TERM/INQUIRE was called 4
times before the actual image was begun.... I chopped off 10 seconds by
removing extra SET TERM/INQUIREs.


Note 1042.15, 23-Sep-1994
Butterworth: advice well taken...
---------------------------------
i should reiterate. 30 seconds is running ALL-IN-1 cold from the $ prompt.
no captive command procedures. no inquires. nothing. and, again, that's
on a *good* day (sometimes it's up there in the 2.5 min. range!).

we upgraded UAF parameters for a test user to the numbers don suggested
and it didn't make any difference (cd something be overwriting these?).

we were surprised to find global buffers set to 0 on the key data files.
how cd this be? when we first installed ALL-IN-1 (v2.2) we specified the
number of simultaneous users as 15. the mgt. guide suggests n+1 where
n is the number of simultaneous users. what have people's experiences
been with this? be cautious, or set it higher than necessary? we need
to be around 30.

i think we will create a new mail area less for performances reasons and
more to close out access to our corrupted SDAF--comments in that area are
well taken. we do see some delays in creating a message, and whilst in
the editor, but the longest, most frustrating delay is start-up time. how
The DECUServe Journal February, 1995 Page 33
ALL-IN-1 Tuning Tips


much of an effect do the suggested housekeeping procedures, deleting of
unwanted mail, establishing new shared areas, etc., have on *that*?

Note 1042.16, 23-Sep-1994
Peach: Try these as son as you can
----------------------------------
You are directly affected by the Profile fields (i.e. opening and
counting tasks, opening form libraries) at ALL-IN-1 startup. It's also
possible that if your accounts are that old that each user's .PST file
is full of 'junque'. I've found in ours at Eglin permanent symbols
stored for applications that no longer exist. Try blowing the .PST
file away for a test login. (ALL-IN-1 creates a new one at login).
Definitely set to N the tasks fields if a user isn't utilizing them.

The global buffers are really hurting you -- fix those as soon as
possible. The I suspect the problem occurred because of an error in an
_.FDL file [p[not an error that causes the system not to start]. Create
new ones.

You are seriously being hurt by the lack of housekeeping and not
reorganizing the users' file cabinets.

ALL-IN-1 is quite a nice 'beast" -- it will continue to run even when
not 'fed and watered' properly but eventually it lets you know about
the neglect with severe performance problems.

Oh -- you didn't say whether or not you had renamed the MTILOG.LOG and
MTIERR.LOG files in [ALLIN1.MGR]. That will help too.

Note 1042.17, 23-Sep-1994
Coy: Maybe
----------
> we upgraded UAF parameters for a test user to the numbers don suggested
> and it didn't make any difference (cd something be overwriting these?).

Did you check the corresponding SYSGEN parameter(s)? I believe that JF
mentioned that.

What does total memory utilization look like in the busiest period?
[Alternative question - what _else_ is running that takes a lot of
memory or CPU resources?]

Note 1042.18, 23-Sep-1994
Mezei: ALLIN1/DEV=INQUIRE can further slow down activation
----------------------------------------------------------
Try creating a new account from scratch and see how long it takes to
start up ALL-IN-1. A new account should not have any
corrupted/fragmented files in his own file cabinet.
The DECUServe Journal February, 1995 Page 34
ALL-IN-1 Tuning Tips



As well, you may wish to do the following from a very privileged
account:

SET WATCH FILE/CLASS=ALL
ALLIN1
SET WATCH FILE/CLASS=NONE

Those are the files you'll need to worry about first.

Also, you may wish to run of of the DECUS fragmentation analysis
programs on the disk that contains the ALL-IN-1 files (OA$DATA) to see
if there isn't any really big fragmentation problems.

And take note of every file it tries to access while activating.
Then go into install and make sure every image/shareable image is
installed properly.

Back in the days when I ran standalone WPSPLUS, I was able to reduce
image activation time on my Microvax II with a then lone RD54 disk for
everything from 15-20 seconds down to 8 seconds, and that supported
about 10 users. This was accomplished by making sure every file
ALL-IN-1 accessed was installed, the set term/inquires removed etc etc.

You may wish to try ALLIN1/DEVICE=VT200, or put your terminal in
display control mode to see if ALLIN-1 isn't doing an inquire.
(ALLIN1/DEVICE=INQUIRE), perhaps your CLD file has the /DEV=INQUIRE as
default).


Note 1042.19, 23-Sep-1994
Vickers: Look at OpenVMS first - need those metrics to know
-----------------------------------------------------------
Have you obtained any of the system performance metrics I have
mentioned? It is almost certain that your biggest problem has to do
with OpenVMS tuning and setup than with any of the ALL-IN-1 things.
Global buffers will, at most, improve system response to a client by
20%. You need 10 times that sort of improvement - or more. 2.5
minutes for ALL-IN-1 startup is absolutely obscene.

My guess is that you have more than a bottleneck. My guess is that you
have a deadlock on one of more critical components of the system. The
various performance metrics I have asked about a few times in this
topic will help you and us determine which of the three critical areas
(CPU, memory, and I/O) are the (biggest) culprit.

It MAY be that your ALL-IN-1 disk is so heavily loaded that it is
unable to provide sufficient response. It may be that you have
exhausted memory due to paging or memory structures. You need to get
the system metrics from MONITOR or other source to determine where the
bottleneck or deadlock is.

The problem may have to do with a shortage of dynamic memory, system
The DECUServe Journal February, 1995 Page 35
ALL-IN-1 Tuning Tips


paging, or other OpenVMS internal structures. Unless there some sort
of weird record locking going on during ALL-IN-1 startup I am almost
certain the problem is not internal to ALL-IN-1. The corrupted SDAF
MAY be the culprit but I doubt it.

The global buffers and file cabinet optimization will most certainly
help but they will not eliminate the HUGE startup time you have. We
must find and correct your bottleneck first. All the rest will add
further improvements but that's all.

Eliminating the Display Tasks and Count Tasks at startup will have a
bit of improvement but if your clients don't use TM then searching
these files should be almost of no duration. 'Purging' the PST will
have zero effect on startup time unless they are thousands of blocks in
size which is rare on this particular planet.

If you obtain the OpenVMS performance metrics it will help determine
what is going on.

Note 1042.20, 23-Sep-1994
Campen: I vote for external factors.
------------------------------------
> i shd reiterate. 30 seconds is running ALL-IN-1 cold from the $ prompt.
> no captive command procedures. no inquires. nothing. and, again,
> that's on a *good* day (sometimes it's up there in the 2.5 min. range!).

I know nothing about ALL-IN-1 but the fact that the startup time is so
highly variable would indicate to me a strong likelihood that factors
external to ALL-IN-1 are the culprit.

Note 1042.21, 23-Sep-1994
Butterworth: metrics forthcoming...
-----------------------------------
> Have you obtained any of the system performance metrics I have
> mentioned? It is almost certain that your biggest problem has to do
> with OpenVMS tuning and setup than with any of the ALL-IN-1 things.
> If you obtain the OpenVMS performance metrics it will help determine
> what is going on.

i will get this information and post here. unfortunately i know
*something* about ALL-IN-1 and *nothing* about OpenVMS, and getting
that data from our systems programmer is proving a little tricky
(coz i'm trying to translate a lot of this stuff as i go!).

thanks for bearing with me...

The DECUServe Journal February, 1995 Page 36
ALL-IN-1 Tuning Tips


Note 1042.22, 23-Sep-1994
Mezei: File access conflict ?
-----------------------------
Another possibility:

You should measure if there is any difference between ALLIN1/REENTER
and ALLIN1 without it. If users share file cabinets (or share
profiles), and there is a user already signed on and locking the
current file cabinet document, ALL-IN-1 will wait for a while before
giving up and searching for another document to become "current".

You could also try ALLIN1/NODIR to see how much quicker it gets.

As well, ALLIN1/NOINIT should get you almost instant response into the
ALLIN1> prompt. On my Microvax II, it takes less than 4 seconds. So on
a normal and loaded vax, you should get less than a second. If you
don't then you have a problem with the images , not the data files.

Again, please check the log for the startup job. Run it interactively
if you have to. If half the files are not installed, then you will run
into a simple problem: each user will have its own copy of everything
and that will cause a huge amount of memory to be wasted, resulting in
excessive paging. As well, just activating the image will cause A1 to
have to read everything from scratch.

The installation procedure can easily "skip parts" and yet A1 manage to
work for user, albeit very slowly.

Make sure that the A1CONFIG records are valid and that there aren't any
superfluous records (for languages which may not be installed etc etc).


Note 1042.23, 23-Sep-1994
Scopelliti: One more vote for Don.
----------------------------------
I'm also with Don. 2 1/2 minutes is bad! And most of the file stuff
won't make that much of a difference.

Did we ask or post what else is running on this system?

Silly request: Hit CTRL/T, write down the values of CPU, PF, IO and
MEM. Then start ALLIN1, hit CTRL/T, and calculate the differences for
CPU, PF and IO.

Please post the three differences and the value of MEM. This should
give us an idea of how much effort is needed to start ALL-IN-1 on your
system and also how much memory is actually being used.

Oh.. if you crank global buffers, be ready to bump sysgen parameter
GBLPAGFIL - you'll probably see the infamous "unable to map global
section" (or something like that...) when you invoke ALL-IN-1.

The DECUServe Journal February, 1995 Page 37
ALL-IN-1 Tuning Tips


Note 1042.24, 27-Sep-1994
Hull: Check disks, too.
-----------------------
..and while you're checking all the various VMS parameters, how
fragmented is your A1 disk? When was the last time you compressed the
disk? Severe fragmentation can also add a lot to the overhead on a
system.

This thread has certainly generated a lot of traffic. You ought to be
able to pin down your major problems by following all the good advice
here. Not much else I can add at this point.


Note 1042.25, 29-Sep-1994
Butterworth: Performance Update
-------------------------------
> You should measure if there is any difference between ALLIN1/REENTER
> and ALLIN1 without it. If users share file cabinets (or share
> profiles), and there is a user already signed on and locking the
> current file cabinet document, ALL-IN-1 will wait for a while before
> giving up and searching for another document to become "current".

our users do not share file cabinets, so this shouldn't apply.

> As well, ALLIN1/NOINIT should get you almost instant response into the
> ALLIN1> prompt. On my Microvax II, it takes less than 4 seconds. So on
> a normal and loaded vax, you should get less than a second.

it takes about 3 seconds. maybe our users should be accessing ALL-IN-1 in
NOINIT mode! :-)

> Again, please check the log for the startup job. Run it interactively
> if you have to. If half the files are not installed, then you will run
> into a simple problem: each user will have its own copy of everything
> and that will cause a huge amount of memory to be wasted, resulting in
> excessive paging. As well, just activating the image will cause A1 to
> have to read everything from scratch.

yep, we got some errors here. couldn't find MEMRES.FLC (!!!) for starters
(which could explain a thing or two).

> Silly request: Hit CTRL/T, write down the values of CPU, PF, IO and
> MEM. Then start ALLIN1, hit CTRL/T, and calculate the differences for
> CPU, PF and IO.

(DCL) CPU=00:00:02.64 PF=1050 IO=267 MEM=445
OA$MAIN CPU=00:00:04.29 PF=1967 IO=313 MEM=1273

..although these numbers were much closer together when i tried it a
little while later.

thus far we have increased the UAF parameters, applied global buffering
to the data files, and turned off some user profile flags. things do
The DECUServe Journal February, 1995 Page 38
ALL-IN-1 Tuning Tips


appear to be getting better, but we still seem to be having some IO
problems on our system disk. thanks for all the input to date. this is
more feedback than i've gotten to all my previous posts combined!

Note 1042.26, 29-Sep-1994
Peach: Memres needs an FLC
--------------------------
Compile that MEMRES.FLC library. Also to see if OAFORM and SITE
libraries have FLC -- and it they are recent. I.e., the date/time
stamp on the .FLB and .FLC should be too far apart. More like hours
and not days.

And see if the SITE form libraries have ever been compressed.

Note 1042.27, 29-Sep-1994
Mezei: Don't waste time... compile that monster !
-------------------------------------------------
If you do not have the .FLC file for a form library, ALL-IN-1 will
pre-compile all the forms in it whenever it first opens the library
(usually at image activation). This takes forever, especially for a big
forms library such as MEMRES.

As well, by not having MEMRES.FLC, ALL-IN-1 won't install the global
sections that map it into memory and are shared between users, and this
means that every user must 1-compile the whole thing, 2-have its own
copy of the compiled monster in its own memory ---> more paging.


Assigning Sequence Numbers
==========================

Although this next discussion is from the ALL-IN-1 conference, you
may find it useful (or at least interesting) even if you don't run
that product at all. The problem: Given a multi-user database of
some sort in which item numbers are assigned sequentially, how do
you avoid gaps in sequence numbers from aborted transactions, system
crashes, and so on?

Participants: Bill Bochnik, John Briggs, Roger Bruner, Dale Coy,
Mike Lampson, Jean-Francois Mezei, Don Vickers.


Note 1085.0, 12-Jan-1995
Bruner: Determining the next available number (revisited)
---------------------------------------------------------
I know we discussed this somewhere previously, but I don't know where.
So let me start from scratch.

The DECUServe Journal February, 1995 Page 39
Assigning Sequence Numbers


I believe it was Don Vickers and/or Al Hull who suggested storing the
highest record number in use in a file rather than doing a FOR loop on
the data set and incrementing the highest number.

I have a case where I want to follow that suggestion. But what I now
realize is this (we're talking about Records people creating boxes):

Sherian starts to create a box and grabs the number from the
highest record number file and increments it. The old number (say,
000060) is replaced by the new number (000061). Sherian continues
entering box information.

In the meantime, Edie comes along and creates a box, too. She
picks up on the new highest number (000061) and increments it (000062),
and the old highest is deleted and the new highest is written to that file.

Now, Sherian cancels the creation of her box (000061). If we don't
mind wasting a box number, all is okay, because Edie's number is
definitely the highest number in use, and Sherian's is still lower than
Edie's.

But is there any practical way to avoid wasting box numbers? We
don't plan to reuse them, but...

The only thing that has come to mind is this:

These box numbers are temporary numbers and have a PREFIX of 'TMP'.

What if Sherian's box creation deletes the highest TMP record as
soon as she increments it? Then Edie gets a message when she attempts
to create a box (because there is no TMP highest number) saying
something like "Try again shortly. Next available number cannot be
determined." If Sherian cancels, the original high number is
restored. If she completes, the new high number is put into the
high-number file, and Edie can work again just as soon as Sherian's
lock is released.

While I doubt that our Users would object to this locking (especially
with a more meaningful message than the one above), and while I doubt
that very many people will ever see it, is this the best way to handle
the situation?

Note 1085.1, 12-Jan-1995
Coy: No way
-----------
Let me try to save some time here:

> But is there any practical way to avoid wasting box numbers? We
> don't plan to reuse them, but...

No. There is no way to avoid it.

The DECUServe Journal February, 1995 Page 40
Assigning Sequence Numbers


Note 1085.2, 12-Jan-1995
Vickers: My approach of storing and scanning
--------------------------------------------
I always hate to disagree with Dale. I suspect that I don't know
exactly what he meant by "No". (';

A couple of years ago I developed an incident tracking system for a
power transmission company and each incident must have a sequential
incident number. These incidents occur at a high frequency (but not
higher than 60 hertz :') during severe weather. As far as I am aware,
there have not been any 'holes' in the sequence numbers.

The approach I took to track the highest incident number was to keep
the last assigned incident number in a dataset with the key of the year
number, since incidents numbers start over each year. The key to
eliminating 'creation holes' is to restore the previous 'highest
incident number' to the year record on an aborted creation, ignoring
the possibility that another higher number may have been used.

The creation logic takes the number from the year dataset as the
starting place for determining the next available incident number. It
reads the incident dataset checking to see if the incident number is in
use (incident number is an alternate key). When an unused incident
number is found, it is used as the 'next' incident. To be more
conservative, you could subtract a number from the former highest
number so that you allow for a bigger 'window'.

Note 1085.3, 12-Jan-1995
Bruner: Thanks!
---------------
Thanks to you both!

Dale's was the response I expected, and -- Don -- I've printed yours so
I can digest it offline. Thanks again!

Note 1085.4, 12-Jan-1995
Coy: How about duplicate numbers?
---------------------------------
Let me explain a bit.

Assuming that the number-using system is asynchronous (that is, that
you can have more than one number being "created" at the same time, by
different people and/or processes), then:

It would be required for you to _guarantee_ that a number, once
reserved, is _always_ "resolved", and that the resolution is either
Used, or
Available (returned to the pool).

In classical terms, this requires at least a "two-phase commit"
The DECUServe Journal February, 1995 Page 41
Assigning Sequence Numbers


technique.

Otherwise, one or more mechanisms is required:
An "atomic" operation that reserves, uses, and removes the item.
Or perhaps an operation that returns the item to the pool, in every
case, regardless of software OR HARDWARE errors, even if the system
crashes, etc.

There are "always" windows of opportunity where these schemes can fail.
For instance, a commonly-tried technique is to wait until "commit" time
to get the incident number. [This has programming disadvantages,
because you often want to put the incident number internally in the
information you are building, but nevermind...] So, anyway, at commit
time, you MUST:
1. Grab the next incident number, AND
2. Post the incident information to the incident database.
If the machine crashes between steps 1 and 2, you have "lost".

It's possible to invent more and more complex schemes, and to do more
and more "cleanup" operations. There are "always" a few holes, but you
can make them tinier and tinier.

There's nothing wrong with getting "close". And it often makes
management very happy to have "very few" lost numbers.

Footnote: You can also try a system that is synchronous -- that is,
only one incident number is "open" at a time, and therefore the first
transaction must be completed before another one can be started (by
anybody). This scheme almost always ends up having a "window" that
allows more than one incident to have the SAME number. This is usually
considered worse than having "unused" numbers.

Footnote 2: If you assume that the software is perfect, and that
nobody will ever "kill" a process, and that the hardware never crashes,
then the "problem" becomes easier.

Note 1085.5, 12-Jan-1995
Briggs: More trouble than it's worth, but not difficult
-------------------------------------------------------
> The approach I took to track the highest incident number was to keep
> the last assigned incident number in a dataset with the key of the year
> number, since incidents numbers start over each year. The key to
> eliminating 'creation holes' is to restore the previous 'highest
> incident number' to the year record on an aborted creation, ignoring
> the possibility that another higher number may have been used.

If a process dies with an incident number "checked out", you've got
a hole in the sequence.

If multiple processes start incident creation in one sequence
and abort incident creation in another sequence, the final incident
number in the "number file" won't be as low as you'd like it to be.
The DECUServe Journal February, 1995 Page 42
Assigning Sequence Numbers

> The creation logic takes the number from the year dataset as the
> starting place for determining the next available incident number. It
> reads the incident dataset checking to see if the incident number is in
> use (incident number is an alternate key). When an unused incident
> number is found, it is used as the 'next' incident. To be more
> conservative, you could subtract a number from the former highest
> number so that you allow for a bigger 'window'.

This approach is open to a race condition in which duplicate incident
numbers are created. (It's checking and storing as separate operations
rather than as one atomic operation).


To be fair, Don didn't claim that this approach was bulletproof, only
that it works.

I believe that a scheme like this can be made as reliable as the
underlying database/RMS file:

Make sure your database enforces uniqueness on incident number
(Make it a unique key).
At commit time, look up the supposed next sequential incident.
Attempt to store your incident with that number.
If it fails because that number is in use, increment and try again.
Increment the successfully committed incident number and record it
in your next-number file.

Or, if your database doesn't have an atomic operation that supports
a uniqueness test, impose a critical section.

[ start critical section ]
Get the (unreliable -- it could be low) next number
Verify that it's not in use (increment until it's OK)
Store the incident
Increment the number
Store the (reliable at this point) next number
[ end critical section ]

Note 1085.6, 12-Jan-1995
Coy: It depends...
------------------
> -< More trouble than it's worth, but not difficult >-

I agree with at least the first part...

The "difficult part" comes because of some other restrictions that are
USUALLY viewed as requirements:

1. Non-blocking. That is, the fact that one transaction is being
worked should not cause another transaction to be delayed. [The
requirement comes from the "what if the first transaction is hung or
The DECUServe Journal February, 1995 Page 43
Assigning Sequence Numbers


delayed forever..." question]

2. The transaction data that is posted must CONTAIN its own
incident number. That is, if you look in the transaction "database",
you must be able to tell the number of the transaction. That makes a
lot of sense -- it's the only simple way to keep "sanity".

The result of the above two things is that:

> At commit time, look up the supposed next sequential incident.
> Attempt to store your incident with that number.
> If it fails because that number is in use, increment and try again.
> Increment the successfully committed incident number and record it
> in your next-number file.

You can't wait until commit time to get a "unique number". And you
can't block other transactions. Hmmm...

In any case, I personally believe that the "right answer" is that, by
allowing "holes" for aborted transactions, you can have an application
that is:
1. EASY to build -- no extra code to handle the non-problem.
2. Straightforward to "prove" that you can't get duplications.

Unfortunately, you will then spend the rest of your life explaining to
management "what happened to those lost numbers".

Note 1085.7, 12-Jan-1995
Bruner: Wow!
------------
Even though you wonderful folks have been talking about some things I
had never before been introduced to, this has been one of the most
informative discussions I have seen in this conference. I will
download and digest and be a bit wiser for your help, no matter what
approach I end up using.

In the example of my application, the existence of holes in the
numbering is not really so critical. The numbering allows up to
999,999 boxes to be created, and when they are placed in the system by
the records folks, the boxes so numbered are deleted as they are
renamed to more relevant prefixed id numbers. But I did want to avoid
reaching 999,999 any sooner than necessary! Ha! Ha! And, of course,
we can always manually reset the number to 000000 when we reach that
point in time, which will probably never come.

Note 1085.8, 13-Jan-1995
Mezei: Use a server that talks to MBA devices
---------------------------------------------
I do not know how interactive this has to be, but I look at how Eaasy
Sabre gets you confirmation numbers:
The DECUServe Journal February, 1995 Page 44
Assigning Sequence Numbers

You create your itinerary with flights. When you confirm it, it is
stored without any flight confirmation numbers. Then, in the
"background" (probably a batch job or IMS transaction), the affected
airlines are notified of the itinerary and each will give back a
confirmation number that is stored back in the Eaasy Sabre passenger
record.

The user can then come back to consult the record and find out the
actual real confirmation numbers for each flight in the itinerary.

So, coming back to your problem:

How about storing a blank incident number and sending a request to a
single server to fill that spot with a number ?. The server can then
update that record and the "highest number" in an atomic fashion. No
need to worry about transactions that are canceled and holes.

With the TEXT commands, you can talk to a MAILBOX (MBAnnn) which could
feed stuff to the server that assigns numbers.

Note 1085.9, 13-Jan-1995
Mezei: Use and ARG form, get a SCRIPT to WRITE ADD
--------------------------------------------------
Here is another way:

Your form is not an ENTRY form but an ARG form. the /POST calls a
script that has the logic to write the fields to the real entry form,
and at the same time, get the incident number, write it along with the
other fields and display it on the screen as a confirmation.

Then you do not need to worry about canceled transactions/holes because
you can put in logic to ensure that the /POST code only gets called if
the WRITE needs to be done.

(You'll also have to deal with UPDATEs without getting a new record
number)

Note 1085.10, 13-Jan-1995
Coy: You can get close
----------------------
> How about storing a blank incident number and sending a request to a
> single server to fill that spot with a number ?. The server can then
> update that record and the "highest number" in an atomic fashion. No
> need to worry about transactions that are canceled and holes.

In most "incident tracking" applications, you tend to want to give
someone the "incident number" at the time it is entered. Like maybe
you are calling a help desk, and they give you the "call number" so
that you can follow up later.
The DECUServe Journal February, 1995 Page 45
Assigning Sequence Numbers

Also, if something fails in the process (like a crash), you can get one
OR MORE records that have a "blank" number.

> Your form is not an ENTRY form but an ARG form. the /POST calls a
> script that has the logic to write the fields to the real entry form,
> and at the same time, get the incident number, write it along with the
> other fields and display it on the screen as a confirmation.
>
> Then you do not need to worry about canceled transactions/holes because
> you can put in logic to ensure that the /POST code only gets called if
> the WRITE needs to be done.

There are _several_ windows in this scheme that, given a machine crash
and/or process problem, can result in problems. Depending on the order
in which you do things, you can either
(1) Still end up with holes, or
(2) End up with duplicate numbers

Even in a SINGLE LINE of a script, it is possible for a failure to
occur during execution of the line. Unless you know the _real_ order
that things are processed within the line, it's hard to predict what
might be the result.

Note 1085.11, 13-Jan-1995
Bruner: Still thinking...
-------------------------
Fortunately in the case of my application, things don't move very fast
and aren't very critical; equipment and/or software failure is not an
overly big consideration.

J-F's idea has some merit, I believe, in that the number would appear
on the menu (or index) from which the box was being created. Since it
wouldn't be seen until the process was complete, anyhow, perhaps the
number wouldn't have to be there until the ARG form was processed by a
positive keystroke.

Up to this point, however, I have tended in this type of application to
lock on to the number by creating an otherwise blank record using the
next available number and then deleting the record if the User
canceled. I will rethink this approach.

You all still have me thinking. This really has turned out to be more
interesting to deal with than I had originally anticipated. Obviously
some of you have programming experience OTHER than ALL-IN-1. Mine
otherwise is quite limited. But the principles certainly apply.

The DECUServe Journal February, 1995 Page 46
Assigning Sequence Numbers


Note 1085.12, 13-Jan-1995
Lampson: a small little trick ...
---------------------------------
Another trick you can use for getting the highest number in use in
your file is to create a secondary key using an FDL file. Make
the Length and Position identical to the primary key and make the
Type "dstring" and change the key name to something such as DKEY.

Then you can do:

GET #HIGH=DATASET:DKEY.%FIRST[""]

In this way, you don't have to worry about a stored number somehow
getting out of sync with the contents of the file.

You'll still need to use a method like JF's ARG form to make sure
there are no holes or lockout conditions.

Note 1085.13, 13-Jan-1995
Briggs: Hmmm. Maybe I should be posting to algorithms
------------------------------------------------------
> The "difficult part" comes because of some other restrictions that are
> USUALLY viewed as requirements:
>
> 1. Non-blocking. ...
> 2. The transaction data that is posted must CONTAIN its own [number]...
> incident number.
..
> In any case, I personally believe that the "right answer" is that, by
> allowing "holes" for aborted transactions, you can have an application
> that is:

I agree with you with respect to the "right answer".

But this is a fun problem so...

Let's try to satisfy the auxiliary requirements. We're going to
play havoc with another possible requirement -- that sequence numbers
are allocated in sequential order. But that's unavoidable given
the other requirements we're trying to meet.

Assume the existence of a lock manager. (Other synchronization primitives
might be used instead). Assume that locks are reliably released when
systems crash or processes blow up.

Assume that we've got some reliable list-processing routines
and we're smart enough to be able to insert or remove from
lists atomically. We can do the lists in memory or on disk.
If done in-memory, we'll have to rebuild them after a crash
or power failure.

Assume that we want to avoid deadlock and we want to avoid waiting for
The DECUServe Journal February, 1995 Page 47
Assigning Sequence Numbers


another process's "think time" but that we aren't concerned about
the possibility of "starvation". (Starvation occurs when one
or more processes aren't deadlocked but still can't access a desired
resource because of a continuing sequence of unfortunate events).

We'll try to maintain a list of "holes" in the number sequence
and back-fill them as new incidents are created.

As each transaction is initiated, it will "check out" a sequence number
and guarantee its uniqueness. We'll maintain three sources from
which such sequence numbers may be drawn:

1. The maximum checked-out sequence number + 1.
2. A list of sequence numbers that have been checked out and then
checked back in due to an aborted transaction.
3. A list of sequence numbers currently checked out -- but the owning
process may have died.

Start transaction:
Grab from list 3:
Acquire lock on sequence number
Verify that sequence number doesn't match list 1.
Verify that sequence number hasn't been committed already.
Check list 2 and remove it if found there.
Leave it on list 3

or Grab from list 2:
Acquire lock on sequence number
Put it on list 3 (watch for dups). ! A
Remove it from list 2

or Grab from list 1:
Acquire lock on sequence number
Put it on list 3 (watch for dups). ! B
Increment number on list 1

* note that a crash at A or B can leave a number on two lists.
That's what some of the seemingly silly sanity checks above watch for.

Abort a transaction:
Put your sequence number on list 2 ! C
Remove it from list 3
Unlock your sequence number

* note that a crash at C can leave a number on two lists.
But we're already watching for that possibility, so it's OK.

Complete a transaction:
Commit your change to the database !D
Remove your sequence number from list 3
Unlock your sequence number

* note that a crash at D can leave a committed number on list 3.
But we're already watching for that possibility so it's OK.
The DECUServe Journal February, 1995 Page 48
Assigning Sequence Numbers

Note 1085.14, 13-Jan-1995
Coy: It's fun to get very close
-------------------------------
> I agree with you with respect to the "right answer".
>
> But this is a fun problem so...

Yep. :-)

It's also a very practical problem. Management "knows" that it's
"really easy" to do this manually. Why, old Fred has been just keeping
a logbook and passing out numbers for years...

..or the way we used to do it was to have pre-numbered forms, and we
never lost one...

..or, for auditability, we must have a record of what happened for
EVERY number -- even if what happened is that we canceled the
transaction [This is the "if you have holes, how do you prove that
nobody deleted something" theory].

Note 1085.15, 13-Jan-1995
Mezei: you can use .IF to make sure it works
--------------------------------------------
While I agree that in theory, you do have problems when multiple users
use the same software and there might be instances where you read the
next number before the other guy has time to increment it, in practice,
on an ALL-IN-1 system, the likelihood of that happening in a group is
not very high.

In a system doing multiple transactions each second, then the odds of
these conditions are high enough to require that extra code to make
sure that there are no ways for the same number to be given to 2
processes.

In the case of the ARG form, the advantage is that you can call a
script to do the post-processing and assignment of the number.

You could do it this way:

.LABEL1
GET #NEWNUM = EVENTS.NUMBER["bla bla"]
INCREMENT #NEWKEY
WRITE CHANGE EVENTS %KEY="bla bla",NUMBER=#NEWKEY
GET NUMBER_FIELD_NAME = #NEWKEY ! displays number on screen

Check to make sure a record doesn't yet exist in the database
.IF DATABASE.%KEY[#NEWKEY] NES "" THEN .GOTO LABEL1
WRITE ADD DATABASE %KEY=#NEWKEY,FIELD1=value etc etc
The DECUServe Journal February, 1995 Page 49
Assigning Sequence Numbers

Note 1085.16, 13-Jan-1995
Vickers: Record locking is required for solid performance
---------------------------------------------------------
The clever code in .12 and .15 will work if there is no chance of
interference. However, the code allows for both duplicate and missing
numbers under heavy activity levels.

The code I mentioned way back in .2 does successfully handle heavy
activity levels. The code I did may not be perfect or clever but it has
proven to meet the needs of the client's system which is virtually a
real time incident reporting system. It has not had a missing number.

The big problem with the code in .12, .15, and others in the stream is
that there is no interlock. The code I wrote uses the DATA_FILE
function to maintain locking on the dataset record that controls the
next number. This assures that there is no duplication of a given
number. I have already described how 'creation holes' are avoided.

I can load the code up here if anyone cares.

Note 1085.17, 16-Jan-1995
Bruner: Yes, Please!
--------------------
I'd like to see it, please!

Note 1085.18, 16-Jan-1995
Vickers: Look for TEXT_FILE in DR_NUM_UPDATE.SCP
------------------------------------------------
!+
! DR_NUM_UPDATE.SCP Update the last/next Incident Number
!
! This script uses the value of the #DR_INCIDENT_NUMBER symbol to determine
! whether it should return the next sequential Incident Number (Input is
! blank) or reset the last assigned number (input not blank).
!
! Input
!
! #DR_INCIDENT_NUMBER Blank if next number should be returned
! Non blank means number should be 'returned'
!++002
! #DR_DR_NUM_UPDATE If set to OA$Y then the DR_NUMBERS dataset
! is updated with the new number
!--002
!
! Output
!
! DR_NUMBERS.NUMBER[year] Set to next number if input is blank
The DECUServe Journal February, 1995 Page 50
Assigning Sequence Numbers


! Decremented if same as input number
!
! DR_NUMBERS.USER[year] OA$USER
!
! DR_NUMBERS.NBS_DATE[year] #DR_CREATION_NBS
!
!+
_.LABEL START
!
! Access the Numbers dataset and prepare for action
!
GET #DR_YEAR = OA$DATE_NBS:4
GET #DR_TRIES = 0
DATA_FILE OPEN DRS DR_NUMBERS/READ/WRITE
.IF OA$STATUS EQ 1 OR OA$MSG_TEXT <=> "already open"
.THEN
OA$MSG_PURGE
GET OA$STATUS = 1
.ELSE
GET OA$STATUS = 0
.END_IF
.IF NOT OA$STATUS THEN .GOTO FAILURE
.IF DR_NUMBERS.%KEY[#DR_YEAR] EQS "" -
THEN -
WRITE ADD DR_NUMBERS YEAR=#DR_YEAR,NUMBER="0"
.IF NOT OA$STATUS THEN .GOTO FAILURE
!
! Determine the action, if any, required based on input
!
GET #DR_NUM_FUNC = ''
GET #DR_DO = ''
.IF #DR_INCIDENT_NUMBER EQS ''
.THEN
GET #DR_NUM_FUNC = 'INCREMENT'
.ELSE
GET #DR_DN = -
FN$TRIM(FN$ELEMENT(0,"-",#DR_INCIDENT_NUMBER))
GET #DR_DO = DR_NUMBERS.NUMBER[#DR_YEAR]
.IF #DR_DO EQ #DR_DN THEN -
GET #DR_NUM_FUNC = 'DECREMENT'
.END_IF
!
! Quit if the number is no longer the maximum number assigned
!
.IF #DR_NUM_FUNC EQS '' THEN .GOTO FAILURE
!
! Access and lock the correct record with retries
!
_.LABEL TRY_FOR_RECORD
DATA_FILE LOCATE DRS #DR_YEAR/EQS
OA$MSG_PURGE
.IF OA$STATUS THEN .GOTO GET_RECORD
INCREMENT (#DR_TRIES)
.IF #DR_TRIES GT 3 THEN .GOTO FAILURE
The DECUServe Journal February, 1995 Page 51
Assigning Sequence Numbers


.GOTO TRY_FOR_RECORD
!
! Get the information for the record
!
_.LABEL GET_RECORD
!
DATA_FILE GET_NEXT DRS
.IF NOT OA$STATUS THEN .GOTO FAILURE
DATA_FILE GET_FIELD DRS NUMBER #DR_T_N
.IF NOT OA$STATUS THEN .GOTO FAILURE
!
! Take action based on the input if it looks safe
!
.IF #DR_DO NES '' AND #DR_T_N NE #DR_DO THEN .GOTO FAILURE
GET OA$FUNCTION = #DR_NUM_FUNC " (#DR_T_N)"
!
! If we're adding a new top then be sure it's virgin
!
.IF #DR_DO NES '' THEN .GOTO UPDATE_RECD
GET #DR_TRIES = 0
GET #DR_REIEM = 300
!
_.LABEL TRY_AGAIN
GET #DR_DNT = FN$FILL(#DR_T_N,3,"0",1) "-" #DR_YEAR
.IF DR_HEADING_ENTRY:INCIDENT_NUMBER.%KEY[#DR_DNT] EQS '' -
THEN -
.GOTO UPDATE_RECD
INCREMENT (#DR_T_N)
INCREMENT (#DR_TRIES)
.IF #DR_TRIES LT #DR_REIEM -
THEN -
.GOTO TRY_AGAIN
!
! Update the dataset
!
! 2-Dec-1993 Skip the update - let the form do it - ddv
!++002 Skip based on #DR_DR_NUM_UPDATE
_.LABEL UPDATE_RECD
.IF #DR_DR_NUM_UPDATE NES OA$Y THEN .GOTO UPDATE_RECD_DONE
!--002
DATA_FILE PUT_FIELD DRS NUMBER #DR_T_N
.IF NOT OA$STATUS THEN .GOTO FAILURE
DATA_FILE PUT_FIELD DRS USER OA$USER
DATA_FILE PUT_FIELD DRS NBS_DATE OA$DATE_NBS
.IF NOT OA$STATUS THEN .GOTO FAILURE
DATA_FILE UPDATE DRS
.IF NOT OA$STATUS THEN .GOTO FAILURE
!
! Show failure on too many retries
!
.IF #DR_TRIES GE #DR_REIEM THEN .GOTO FAILURE
!
! Return the number if that's the deal
!002
The DECUServe Journal February, 1995 Page 52
Assigning Sequence Numbers


_.LABEL UPDATE_RECD_DONE
DATA_FILE UNLOCK DRS
.IF #DR_INCIDENT_NUMBER EQS '' -
THEN -
GET #DR_INCIDENT_NUMBER = FN$FILL(#DR_T_N,3,"0",1) "-" #DR_YEAR

GET OA$STATUS = 1
.GOTO FINI
!
_.LABEL FAILURE
!
DATA_FILE UNLOCK DRS
OA$MSG_PURGE
GET OA$STATUS = 0
!
_.LABEL FINI
!
.EXIT
_.EXIT

!
! Author: Don Vickers, Excellent Office Systems, Inc. 904-326-2873
!
! Copyright (c) 1993, 1994 Excellent Office Systems, Inc.
!
! You may copy this software and use in any way you wish as long as the above
! statement of ownership is included. If you purchased this software from us,
! you have a lifetime warranty on the software.
!
! Keep the faith and be Excellent to one another.
!
! Modified by: | Date: | Reason:
!-----------------------------------------------------------------------------
! Don Vickers | 09-Sep-1993 04:56pm | Element created, please state
! | | modifications down here
! | |
!002 | 08-Jul-1994 03:32pm | Use #DR_DR_NUM_UPDATE as
! | | update flag
! | |
!
! [End DR_NUM_UPDATE.SCP]

Note 1085.19, 18-Jan-1995
Bochnik: how about 2 keys
-------------------------
> It's also a very practical problem. Management "knows" that it's
> "really easy" to do this manually. Why, old Fred has been just keeping
> a logbook and passing out numbers for years...
>
> ...or the way we used to do it was to have pre-numbered forms, and we
> never lost one...
>
The DECUServe Journal February, 1995 Page 53
Assigning Sequence Numbers


> ...or, for auditability, we must have a record of what happened for
> EVERY number -- even if what happened is that we canceled the
> transaction [This is the "if you have holes, how do you prove that
> nobody deleted something" theory].

But Old Fred is an example of having the numbers assigned via one
person (using the assign number at commit time metaphor)

Pre numbered forms either
1 - blocks waiting for Fred to come back from vacation to hand out
new forms
or
2 - Means someone takes some forms, someone else takes others, and
the numbers are NOT guaranteed to be in order with the order the reports
come in

What about a per user and a global number scheme? The user of the
system has a 3 or 4 digit letter or number prefix and a sequence number
for themselves and a sequence trailer for the rest (i.e. mary gets
0000-0001 while john gets 0001-0001 as a starting point). This number
can be used to retrieve the docs later.

A FIFO system picks up the jobs and provides a "real" in order sequence
number. Either of these numbers can be used to look up the doc (the
first is convenient to give to the caller a.s.a.p., while the global
number can be used to prove no records have been deleted.

This sounds complicated, but might be useable.

Note 1085.20, 18-Jan-1995
Bruner: Sounded good at first...
--------------------------------
Actually, Bill, that is not a bad idea. Not exactly the way you said
it, but kind of. If we create an artificial prefix based on certain
parts of the Users' names and then sequence from there. Unfortunately,
when the User "sends" the box, the prefix is changed from 'TMP' to
'XTM' but keeps the same sequential number (which would create
different problems with you suggestion). It is not until the Records
Center then physically receives the box and checks it in through this
application that a "meaningful" [permanent] box number is assigned,
with the prefix based on where it is to be stored.


AppleTalk vs. Parallel
======================

For the overwhelming majority of sites, "it ain't all DEC any more."
System managers have to cope with a wide variety of hardware,
software, and protocols. This next stream, taken from
HARDWARE_HELP, concerns relative printing speeds over a LocalTalk
The DECUServe Journal February, 1995 Page 54
AppleTalk vs. Parallel


(the original AppleTalk) network versus a Centronics parallel port.

Participants: Shawn Allin, David Campen, Bob Hassinger, Terry
Kennedy, Jean-Francois Mezei, David Mischler.


Note 1806.0, 9-Jan-1995
Allin: Which is faster? Appletalk or Parallel
---------------------------------------------
We have a QMS 860 printer here that has a serial, Centronics parallel
and Appletalk interface on it.

Right now, we're running it through the serial connection at 19.2K.
I'm now considering either hooking up the appletalk port to ethernet
via a Dayna E/Z print box, or the parallel port via some printer server
such as Lantronix or Emulex.

Question: If we just talk interfaces, which one is faster, the
Appletalk or the (non-bidirectional) Centronics parallel?

Note 1806.1, 9-Jan-1995
Campen: Bitronics not as fast as I would have expected.
-------------------------------------------------------
I am using a Lantronix EPS Bi-tronics to an HP Laser 4+. I switched to
this from using 19.2 Kbps serial. I was suprised to find that switching
to the parallel port gave me less than one order of magnitude increase
in transfer speed. With the Lantronix parallel port to the HP it takes
about 1 minute to transfer about a 1 Mbyte file.

I am not sure where the bottleneck is. I tried using a parallel port on
someones PC to transfer to the HP but this was even slower and so
proved nothing.

Note 1806.2, 9-Jan-1995
Hassinger:
-----------
How fast do you expect the printer to be? I know in the Mac world you
normally send Postscript and you actually end up being limited by the
speed of the Postscript engine in the printer.

Note 1806.3, 10-Jan-1995
Mezei: Appletalk for Postscript
-------------------------------
Appletalk is over 20kpbs as I recall. (I should say LocalTalk since
Localtalk is the actual physical twited pair media, Appletalk is the
protocol which can run on Ethernet or Localtalk).

Appletalk gives you the advantage of a networked printer whereas the
The DECUServe Journal February, 1995 Page 55
AppleTalk vs. Parallel


Centronics dedicated the printer to your CPU (unless your CPu acts as a
router/print spooler.

When printing postscipt, there is a bidirectional exchange. For
instance, the Mac can interrogate the printer to find out which fonts
are loaded in it at the moment. Centronics cannot allow that.


Note 1806.4, 10-Jan-1995
Kennedy:
---------
> When printing postscipt, there is a bidirectional exchange. For
> instance, the MAC can interrogate the printer to fiundout which fonts
> are loaded in it at the moment). Centronics cannot allow that.

Actually, if both the printer and the host support "Bitronics", it can.

Note 1806.5, 10-Jan-1995
Allin: More details
-------------------
When we used to print postscript files that were of a reasonable size
(Mass-11 on Vax, etc), I wasn't concerned about the line speed,
because, as mentioned in -.whatever, the engine speed was the limiting
factor. However, now that people have discovered the joys of embedded
600 DPI graphics in WPW documents, etc. I think the "pipe size" is
becoming an issue.

Most of the users will be printing from PC's running Pathworks, so I'm
going to be feeding the printer from an VMS/AXP queue. If I go
Appletalk, I'll set up a PathWorks/Mac (on one of our VAXes) to feed
it, else I'll feed it via LAT through a NetQue or Lantronix equivalent
box. I'm not too concerned about the feedback issue. We're using
Scriptserver and I can tell the symbiont which fonts are resident. Any
more comments on which might be faster? I saw an estimate for
Apple/Localtalk (20Kbs), but I didn't see any comments on the parallel
port speed.

Note 1806.6, 10-Jan-1995
Hassinger:
-----------
I think in theory the parallel connection could transfer bits faster.
But again, you will only move bits as fast as the source system can
provide them and as fast as the printer will accept them - and that,
rather than the speed of the connection itself, has typically turned
out to be the limiting factor for me.

The DECUServe Journal February, 1995 Page 56
AppleTalk vs. Parallel


Note 1806.7, 10-Jan-1995
Campen: Parallel: 8K bytes/sec.
-------------------------------
> An more comments on which might be faster? I saw an estimate for
> Apple/Localtalk (20Kbs), but I didn't see any comments on the
> parallel port speed.

I get a transfer speed of 8K bytes/sec using a Lantronix EPS1 parallel
port in Bitronics mode to an HP Laser 4+. I assume the value mentioned
above for the Apple/Localtalk is in bits/sec so that would make the
Lantronix/parallel port about 3X faster.

My experience with the Lantronix/parallel port to the HP Laser 4+ is
that the pipe size is the bottleneck. For the typical 800-900 block
file that I send it, it takes 1 min to send the file and then 15 sec
for the print engine to process it.

I use DCPS print queues to feed the Lantronix/parallel port/HP Laser 4+.

Note 1806.8, 10-Jan-1995
Mischler: Better Localtalk Speed Estimate
-----------------------------------------
> I get a transfer speed of 8K bytes/sec using a Lantronix EPS1 parallel
> port in Bitronics mode to an HP Laser 4+. I assume the value mentioned
> above for the Apple/Localtalk is in bits/sec so that would make the
> Lantronix/parallel port about 3X faster.

Apple Localtalk is 230Kbps, but this is like saying ethernet is 10Mbps:
it doesn't say anything about the maximum sustainable rate at which you
can send data to the target device.

Note 1806.9, 10-Jan-1995
Mezei: Pipe may not be used 100% of time
----------------------------------------
Another consideration with postscript:

Itis not a question of downloading the postscript and then asking the
printer to interpret it and print it.

The printer interprets the postscipt as it is being fed. So, if you
have a very complex routine that executes and draws a graph in memory
in the middle of the file, the remainder of the file will be "x-offed"
until that routine finishes, at which point the flow of data to the
printer will continue.

So, you cannot judge that the "pipe is the bottleneck" by looking at
time to "copy" and time between copy-is-complete and
time-paper-spews-out simply because the "copy" operation may not be
continuous because of periods when theprinter is busy imaging.

The DECUServe Journal February, 1995 Page 57
AppleTalk vs. Parallel


Note 1806.10, 11-Jan-1995
Allin: NetQue made quite a difference
-------------------------------------
I realize there are different complexities of PostScript, but once the
size of the print job gets over a certain level, "pipe size" will
definitely be a factor.

FWIW, I hooked up an Emulex NetQue box (using ScriptServer via LAT) to
the printer yesterday and ran exhaustive tests (1 job :-)) on it. An
FreeLance graphic that I happened to find on a PC close by created a
650 block job in the queue when printed. It took over 6 minutes via
serial (19.2Kbs) and under 2 minutes via the NetQue. So, long and
short, I'm happy. I realize with more complex PostScript jobs, the
benefit may be lessened, but overall I think this is a real win for us.
I didn't bother with testing the Apple/Localtalk method via EtherPrint
box and PW/Mac because I prefer the LAT/Scriptserver setup.

Note 1806.11, 24-Jan-1995
Campen: 28,000 bytes/sec over parallel.
---------------------------------------
I can now get 28,000 bytes/sec (1.7 Mbyte/min.) via a Lantronix EPS2
parallel port (in Bitronics mode) to an HP Color LaserJet from a DCPS
Postscript queue. Setting the Lantronix Server Circuit Timer down to 30
msec. from the default of 80 msec. seemed to help.


Printing Duplex to HP LaserJet 4
================================

Speaking of third-party printer issues, this next sequence of notes
comes from the DEC_NETWORKING conference. The topic is
duplex/tumble printing to a Hewlett-Packard LaserJet printer. No
assembly required, but a tiny bit of PostScript is.

Participants: Jim Campobello, Al Lilianstrom, Charlie Luce, Jr.


Note 1141.0, 9-Jan-1995
Campobello: VMS to HPLJ4siMX - problem printing duplex
------------------------------------------------------
We just got a new HP LaserJet4siMX printer, and I'm having a problem
getting duplex and tumble modes for Postscript output. I'm probably
missing something simple in the approach.

Here is the quick question:

How do I use device control setup modules to tell this printer to print
a Postscript file in duplex or tumble mode?

(I understand forms and setup modules in general; I'm just asking about
The DECUServe Journal February, 1995 Page 58
Printing Duplex to HP LaserJet 4


this particular case.)

Here is the long story of what I've tried:

The LJ4siMX can handle both ASCII and Postscript, and automatically
determines the appropriate mode.

I defined ASCII duplex and tumble setup modules, consisting of HP's PCL
escape sequences. Both formats work fine, either when I include them at the
beginning of an ASCII file, or when I invoke them (using a form) as setup
modules. I'm stuck on getting the comparable Postscript technique to work.

The HP manual indicates that the duplex and tumble commands are:

statusdict begin true setduplexmode end
and
statusdict begin true settumble end

Here is how I tried to use them and the incorrect results:

1. I put either of them at the beginning of a Postscript file.

Result: For the duplex command, the output prints in "tumble" mode.
(That is, it prints two-sided pages, but the back of a page is
upside-down compared to the front.) The tumble command has no
effect -- output prints only one-sided.

2. I put each of them in a setup module, and defined a form for each that
invokes the corresponding module. For example:

$ DEFINE/FORM MX_PSDUPLEX 999 /STOCK=STND/LENGTH=66/WIDTH=132 -
/MARGIN=(TOP:0,BOTTOM:0,LEFT:0,RIGHT:0) -
/TRUNCATE /NOWRAP /NOSHEET_FEED -
/SETUP=(PS$DUPLEX) /NOPAGE_SETUP -
^^^^^^^^^^^^^^^^^

Result: When I print a Postscript file and specify that form, the
setup module gets printed first. It just prints out as a standard
text file, rather than being taken as control commands. I get one
page with the "setduplex" command line, then a flag page, and then
the Postscript file (translated correctly, but not printed duplex).

3. I added a setup module to specify Postscript to the printer:

<ESC>%-12345X@PJL Enter Language=PostScript<LF><CR><LF>%! <CR><LF>

I got that command from a co-worker who *says* he had it working for
an HPLJ3D printer, but we don't have that printer connection any more
so I can't test it. What I found in the LJ4siMX manual indicates that
the general approach is correct, and I tried a few variations of it.

I then defined a form to invoke both the "Postscript" module and the
"duplex" module:

The DECUServe Journal February, 1995 Page 59
Printing Duplex to HP LaserJet 4


$ DEFINE/FORM MX_PSDUPLEX 999 /STOCK=STND/LENGTH=66/WIDTH=132 -
/MARGIN=(TOP:0,BOTTOM:0,LEFT:0,RIGHT:0) -
/TRUNCATE /NOWRAP /NOSHEET_FEED -
/SETUP=(POSTSCRIPT,PS$DUPLEX) /NOPAGE_SETUP -
^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Result: When I print a Postscript file and specify that form, nothing
comes out. The queue briefly shows the job as printing, but there's
no output and no error message (in the queue or on the printer).

Here is what the queue looks like:

Terminal queue CC5$HP4MX, idle, on BFVAX3::LTA108:, mounted form LASER66
(stock=STND) /BASE_PRIORITY=3 /DEFAULT=(FEED,FLAG=ONE,FORM=LASER (stock=STND))
/LIBRARY=HPLJ4SI Lowercase /OWNER=[SYSTEM] /PROCESSOR=LATSYM /PROTECTION=(S:E,
O:D,G:R,W:W) /RETAIN=ERROR /SCHEDULE=(NOSIZE) /SEPARATE=(RESET=(RESET))

Additional details:

This printer is connected to the ethernet with a card from XCd, which
works like the standard HP network card but also offers LAT and Macintosh
printing. (This all works fine from a Mac, BTW.) I'm using LAT from VMS.

I'm doing all this from a MicroVAX 3100/90 under VMS 5.5-2H4.

I should add that when I use the printer's control panel menu to specify
duplex or tumble, they work fine. For example, I use the menu to select
duplex mode, then print the same Postscript file that I used above, and
it comes out duplex exactly as expected. (Same for tumble.) There has
got to be a way to do this with setup modules, but I'm missing it.

Does anyone have any idea what I'm doing wrong? Thanks very much.

Note 1141.1, 10-Jan-1995
Campobello: More info, and plea for help
----------------------------------------
I did get a couple additional pieces of information:

1. Postscript forms have to be defined /NOTRUNCATE and /NOWRAP.
I changed mined, but that didn't help.

2. Postscript jobs have to be printed /NOFLAG, because there
is no Lat symbiont postscript flag page.

When I use /NOFLAG, I get the same results as sending the postscript
duplex/tumble command to the printer before the file to be printed -- that
is, duplex jobs come out tumble, and tumble jobs come out one-sided.

I have a call in to XCd, but if anyone has any idea of what else I can try,
please let me know.

The DECUServe Journal February, 1995 Page 60
Printing Duplex to HP LaserJet 4


Note 1141.2, 10-JAN-1995
Luce: Maybe this will help?
---------------------------
I use this script as an input filter in my OSF/1 system for an HP
LaserJet IIIsi with duplexing unit in order to get non-tumbled duplex
printing:

echo "[%-12345X@PJL enter language=postscript"
echo statusdict begin false settumble true setduplexmode end
cat -
echo "[%-12345X@PJL enter language=pcl"

note that the boolean switch is specified _before_ the set command.

I have had very little luck using setup modules with Postscript files
under VMS; I usually end up just editing the file before I print it.

Note 1141.3, 11-Jan-1995
Lilianstrom: My 4SiMX duplex module
-----------------------------------
Here is what I use to get duplex output from our 4SiMX's. We use the HP
JetDirect card and Multinet for the transport. A module in the device
library called PS_DUPLEX is called via /Setup on the $Print command
line. Works fine. Here is the contents of the module.

-12345X@PJL ENTER LANGUAGE = PostScript

statusdict begin true setduplexmode end

Note 1141.4, 11-JAN-1995
Campobello: Bless you, that works!
----------------------------------
Thanks to you guys, it's working. Four days of frustration are over!
Now can you explain why it works differently for me? Here is the story:

This does NOT work:
%-12345X@PJL Enter Language=Postscript
statusdict begin true setduplexmode end

This DOES:
%-12345X@PJL Enter Language=Postscript
statusdict begin false settumble true setduplexmode end
^^^^^^^^^^^^^^^
I have to explicitly tell it "not to settumble", or duplex will print in tumble.
This is contrary to how it's explained in the HP manuals, contrary to what XCd
tech support told me, and contrary to the way it works for Al (note -1).
(Charlie, do you know what happens if you leave out the "false settumble"?)
Anyone have any idea why? At least it's working now, so thanks again.

The DECUServe Journal February, 1995 Page 61
Printing Duplex to HP LaserJet 4


Note 1141.5, 16-JAN-1995
Luce: Cookbook support ;-}
--------------------------
>(Charlie, do you know what happens if you leave out the "false settumble"?)

Actually, no. I think I got the line from examining the Postscript
code produced by the IIIsi MS-Windows driver.


ISDN for "Permanent" Connections
================================

We don't run many articles from the TELECOMMUNICATIONS conference,
but every so often, something there catches our eye. In this case,
the something was a recent discussion on whether an ISDN link could
be used in place of a permanent leased-line circuit. With ISDN
becoming increasingly common (or at least available), it's worth
knowing something about the possibilities.

Participants: Keith Chadwick, Linwood Ferguson, John Gorentz, Matt
Holdrege, Jean-Francois Mezei


Note 115.0, 13-Jan-1995
Mezei: Can ISDN be used to fake a permanent circuit ?
-----------------------------------------------------
The goal:

Bridge an ethernet between 2 sites, about 30km (20 US miles) apart.

Default solution:

Bridge/Router <DSU/CSU>----dedicated-line---<DSU/CSU>---Bridge-Router

The telco wants to charge between $500 to $700 a month for a dedicated
circuit between 64 and 128kbps. (amounts in Canadian dollars).

Now, the telco can provide an ISDN solution for about $150 a month
($300 for the 2 sites) that includes the NT1. They say that ISDN isn't
"designed" for permanent connections, but should work with a few
interruptions here and there. Since it is a local call, there would not
be any holding time charges.

So, I read up on the ISDN FAQ taken from EISNER and got some idea of
what ISDN really does. For the $300 I would not only get a 64kpbs
channel to that downtown site, but could also use the other 64kpbs
channel to dial elsewhere if needed. I am unsure as to the D channel
uses since the D channel is what is used to receive call requests etc
etc (is that correct ?)

Questions:

The DECUServe Journal February, 1995 Page 62
ISDN for "Permanent" Connections


Are there precedents for ISDN lines being used instead of permanent
circuits ? How unreliable are they ?

Are there routers/bridges that connect to an NT1 (B/T bus I think it is
called) ?

If such routers exist, can they be configured to automatically dial
a preconfigured number to establish a connection whenever the
connection is lost ? Or can that be done by sending ASCII to the
D channel to do the call setup ?

Can I route anything over an ISDN line, or does the data need to be
encapsulated to go through the telco-network ?

I would be routing/bridging X.25, then TCP/IP and potentially
Novell's IPX

Here is a schematic:

LOCAL SITE REMOTE SITE

|---bridge---NT1~~~isdn~~~NT1---bridge---|-cisco router to internet
MAC ---| |-X.25 router to SPRINT
VAX ---| |-router to customer (IPX)
| |
ether ether

Questions: if I use routers instead of bridges, could I find
a router at the remote site that would have 4 ports,
1 to ISDN, one to internet (TCP), one to X.25 (sprint) and
1 to the novell net, and can this router route traffic
to/from the ISDN line and internet, ISDN and X.25 and
ISDN and IPX ?


Note 115.1, 14-Jan-1995
Gorentz: Telebit Netblazers & ISDN
----------------------------------
We're planning to do something like that, but just for TCP/IP.

We currently use a pair of Telebit Netblazer routers. One is at our
biological field station, out in the country; the other is at Western
Michigan University in Kalamazoo, MI, where we connect to Merit and the
Internet. We're a local phone call apart. We have using a pair of
regular voice lines on each end, with Telebit 14.4Kbps modems. The
lines are "up" almost all of the time, but the Netblazers take care of
the redialing (if necessary) whenever there are packets that want to
get from one end to the other.

ISDN service became available just before Christmas, and we'll probably
switch to it shortly. At our end, the phone company charges the same
rate for voice or data lines, and there are no metered charges. There's
just a flat monthly rate. For calls that originate in Kalamazoo
The DECUServe Journal February, 1995 Page 63
ISDN for "Permanent" Connections


(in Ameritech's territory) it may be different. I.e. there are
per-call costs and per-minute costs. We plan to rig the system so all
calls originate on our end. And for practical purposes, the network
connection will be "up" all the time, just like it is now.

A sales rep who handles the Telebit stuff once told me they'd have an
integrated router-ISDN modem on the market soon, and at least for
educational institutions, they'd be priced at $1200/each. But they
aren't available yet, and I have no confirmation of that price.

I have a vague recollection from reading the Telebit brochures that
some of the Netblazers can route more than TCP/IP.

The local phone company charges $30 per month per B channel and $10
per month per D channel. (That's their proposed rate -- it hasn't yet
been approved by the state regulators.) I don't know if the Netblazers
can use the D channel.

Note 115.2, 14-Jan-1995
Holdrege: bonding
-----------------
If you get free local dialing with ISDN you are much better off using
it than a dedicated 56K line. Also you can BOND the two B channels
together for a 128Kbps circuit.

A single router can handle all your needs, but there are a lot of
options. For about $2500 (U.S.) you could put an Ascend Pipeline on
each end of the ISDN circuit. They come with Ethernet ports and can
have integrated NT1's. They support the BONDing spec for combining B
channels.

I don't know of a cheap router that supports X.25 and ISDN BONDing, so
you may need another router or go with an expensive model.

Note 115.3, 14-Jan-1995
Mezei: How are outgoing calls established ?
-------------------------------------------
Has anyone used ISDN successfully for a "dedicated" connection ?

As well, what is involved in getting a call through ?

ROUTER <---> [TERMINAL] <-----> NT1 <------ISDN net

Is it the [TERMINAL] that is in charge of establishing the connection ?
Does the terminal have a serial port with which one send AT command (or
equivalent) to establish a connection ? Or are commands sent to the NT1?

I am aware that some equipments come with their own [TERMINAL], and
some also come with their own NT1. But I am concerned more about what
sort of procedures are involved to automatically re-establish the link
The DECUServe Journal February, 1995 Page 64
ISDN for "Permanent" Connections


between the 2 routers/brides are both ends of the ISDN link.

In the FAQ, there is some mention of handling INCOMING calls and
deciding which terminal connected to the NT1 will be handling it. But I
saw nothing about how outgoing calls are made and by whom they are
made.


Note 115.4, 15-Jan-1995
Ferguson: ISDN more attractive if unmetered
-------------------------------------------
Are most ISDN's metered? .-few talked of free local calls. I had
the impression it was always a metered service. I gather it is
either/or.

Which is more common? If free-local, does it usually follow the same
calling area as a regular voice line?


Note 115.5, 15-Jan-1995
Gorentz: Unmetered ISDN may be rare
-----------------------------------
Our local phone company is the one offering unmetered ISDN for local
calls. Local means the same as for regular voice lines.

But this phone company is just a tiny one in the overall scheme of
things. To give you an idea of how small, it's called the
Augusta-Hickory Corners Telephone Company. The Kellogg Biological
Station, where I work, is their biggest customer. I think the parent
company is called TDI, or something like that.

The point is, this isn't likely to be a common service offering that
you'll find in many other places. It would be interesting to know if
anyone else has encountered unmetered local ISDN service, though.

FWIW, Augusta-Hickory's rates for business voice phones (non-ISDN) have
been very high, e.g. $40/month or thereabouts, but they don't charge
the 8.2 cents per call that Ameritech does. If you make a lot of calls
each month, it's a pretty good deal.

I mentioned that the rate structure hasn't been approved by the
appropriate state regulators yet. Call me paranoid, but now I'm
worrying that the Ameritechs of this world won't be happy with their
offering unmetered ISDN, and may try to have something to say about it.


Note 115.6, 16-Jan-1995
Chadwick: Combinet is also a good vendor
----------------------------------------
We have been using ISDN for support of remote conferences, remote
video conferencing, and tele-commuting for over a year. We have a
The DECUServe Journal February, 1995 Page 65
ISDN for "Permanent" Connections


pool of centrally maintained ISDN-Ethernet half bridges (Combinet
CB-400's, being switched to a Combinet CB-900) and the remote site
uses another ISDN-Ethernet half bridge (CB-100, CB-200, or CB-400).

Each Half-Bridge supports 2 B channels in addition to the D channel.
The Half-Bridges are configured to bring up the connection on
one B channel, and add the second B channel if there is sufficient
load.

The big problems have been with the various local Telco's - We are
located in Chicago - and even Ameritech has problems getting ISDN
service up and maintaining it.

> Questions:
>
> Are there precedents for ISDN lines being used instead of permanent
> circuits ? How unreliable are they ?

Quite reliable once the Telco has configured the line correctly...

> Are there routers/bridges that connect to an NT1 (B/T bus I think it is
> called) ?

There are several vendors - Ascend, Combinet, etc. I would suggest
that you "drop into" the Comp.Dcom.Isdn newsgroup to see the
various vendors offerings.

> If such routers exist, can they be configured to automatically dial>
> a preconfigured number to establish a connection whenever the
> connection is lost ? Or can that be done by sending ASCII to the
> D channel to do the call setup ?

Our Combinet's are automatically configured to dial up the link
whenever they see a packet destined to a non-local node. The link
stays up as long as is necessary. When the link is idle for a
(user) defined idle period, the Combinet drops the link. It is
automatically re-established the next time it is needed.

> Can I route anything over an ISDN line, or does the data need to be
> encapsulated to go through the telco-network ?

Data is data.

> I would be routing/bridging X.25, then TCP/IP and potentially
> Novell's IPX
>
> Here is a schematic:
>
> LOCAL SITE REMOTE SITE
<
> |---bridge---NT1~~~isdn~~~NT1---bridge---|-cisco router to internet
> MAC ---| |-X.25 router to SPRINT
> VAX ---| |-router to customer (IPX)
> | |
The DECUServe Journal February, 1995 Page 66
ISDN for "Permanent" Connections


> ether ether


Here is how it works with Combinets:

|--CB400--NT1~~~~isdn B channel 1~~~~NT1---CB400---|
MAC ----| ~~~~isdn B channel 2~~~~ |
VAX ----| |
| |
local ethernet remote ethernet

Note 115.7, 16-Jan-1995
Holdrege: dialing
-----------------
> Has anyone used ISDN successfully for a "dedicated" connection ?

Yes, if it is unmeasured. A Measured call up for 8 hours a day, seven
days per week would cost more than a dedicated circuit.

> Is it the [TERMINAL] that is in charge of establishing the connection ?
> Does the terminal have a serial port with which one send AT command (or
> equivalent) to establish a connection ? Or are commands sent to the NT1?

A terminal adapter can store phone numbers and dial them based on
conditions. The condition could be seeing DTR on its serial port, or
seeing a packet destined for a remote LAN or other schemes. Methods for
remote dialing include RS-366 (commonly used by video conferencing),
V.25bis, or X.21.

Note 115.8, 16-Jan-1995
Holdrege: costs
---------------
> Are most ISDN's metered? .-few talked of free local calls. I had
> the impression it was always a metered service. I gather it is
> either/or.

It depends on the state and the carrier tariff. Here in California, GTE
has residential ISDN that is free for up to 16 miles. Pac Bell (I
think) has this only at night. Business's pay 1 cent per minute for
local ISDN calls after a 4 cent setup. It is priced the same as normal
phone calls.

Note 115.9, 16-Jan-1995
Mezei: How long to establish a call ?
-------------------------------------
How long does call setup actually take ?

If the ISDN link between two ethernets is disconnected, and I get a
The DECUServe Journal February, 1995 Page 67
ISDN for "Permanent" Connections


packet going from one to the other, how much delay am I looking at for
the bridge (eg:Combinet) to establish the connection to the other ?

Seconds, milliseconds, hundredths of seconds ?

(Assuming a local call, same phone company, same city).

Note 115.10, 16-Jan-1995
Holdrege: setup is fast
-----------------------
ISDN call setup is very fast. Less than one second usually. It can even
be noticed with POTS connections to digital switches. I live 15 miles
from work. When I call my voice mail at work from home, the voice mail
answers in less than one second from my finger releasing the last
number.

Although my home phone is analog, it goes to a digital switch near my
house, up digital trunks to the C.O. near work, and over ISDN PRI
trunks to the PBX at work.

To further answer your question, the router sees the destination packet
and initiates the call within a second. In the case of TCP/IP, the
routers should be communicating in less than 2 or 3 seconds. With
bridging and other protocols, it can take longer. However there are
spoofing schemes for IPX and Appletalk to make things smoother. You can
configure how long it will take to disconnect the call after the last
packet is sent.

Note 115.11, 16-Jan-1995
Mezei: Can you confirm this ?
-----------------------------
Can someone please confirm this:

The "logic" to establish the connection, disconnect the connection, and
to determine when to establish and disconnect the connection is part of
the "terminal" in the ISDN terms.

IS that correct ?

And when I get a router/bridge that has an ISDN terminal built in, it
can be configured to provide a seamless connection with a call setup
delay that is acceptable for most networks ?

By the way, I REALLY appreciate your comments. The vendor I talked to
said that they would not allow ISDN to be used between them and me
because they require dedicated connections and ISDN is not tariffed as a
permanent connection.

But if I can convince them that it with ISDN, the connection can be
established with a inconsequential delay, then I can get the appearance
The DECUServe Journal February, 1995 Page 68
ISDN for "Permanent" Connections


of a permanent circuit for half the price.

(and since it seems that out area's ISDN is not metered for local
calls, I can configure the call to sty up for a few hours between
packets).

Note 115.12, 16-Jan-1995
Holdrege: no worries
--------------------
> The "logic" to establish the connection, disconnect the connection, and
> to determine when to establish and disconnect the connection is part of
> the "terminal" in the ISDN terms.

> And when I get a router/bridge that has an ISDN terminal built in, it
> can be configured to provide a seamless connection with a call setup
> delay that is acceptable for most networks ?

There is nothing in any _standard_ to support this. However, most
ISDN routers will establish the connection and disconnect. Since you
said your application protocol will be TCP/IP, you should have no
worries. Even if the connect time was a few seconds, TCP/IP (unlike
LAT) can easily handle the brief latency.


Note 115.13, 16-Jan-1995
Chadwick: ISDN just works (when configured properly 8-).
--------------------------------------------------------
We have run TCP/IP, DECnet, and LAT over our ISDN-Ethernet
(half) bridges.

The only problem which was noticed was due to AppleTalk -
it is a rather "chatty" protocol - and will keep the link
up (only a problem if your tariff is metered ISDN).

IP and DECnet work well.

Note 115.14, 16-Jan-1995
Mezei: Are delays critical to X.25 ?
------------------------------------
OK, so TCP/IP can easily support an ISDN "bridge" between two ethers.
What about having an X.25 router at one end and the Host at the other ?
(I assume that delays would not be critical for X.25, but I better ask,
just in case).

The DECUServe Journal February, 1995 Page 69
About the DECUServe Journal


About the DECUServe Journal
===========================

Publication Information

Topic threads in the DEC Notes conferences on DECUServe are selected
for publication on the basis of strong technical content and/or
interest to a wide audience. They are submitted to the editor from
various sources, including DECUServe Moderators, Executive Committee
members, and other volunteers. Suggestions for inclusion are
enthusiastically solicited. Articles selected for publication are
edited on an OpenVMS VAX system in TPU and then formatted with
Digital Standard Runoff.

Where To Find the DECUServe Journal

Issues are posted to the ARTICLES conference on DECUServe and DCS,
as well as to the DECUS World-Wide Web and Gopher server
(http://www.decus.org/decus/pubs/pubs-index.html) and the
vmsnet.decus.journal and comp.org.decus newsgroups. E-mail
subscriptions can be had by sending the command "subscribe
DECUServe-Journal" to mail...@decus.org.

What's a DECUServe, Anyway?

DECUServe is an on-line conferencing system which is available 24
hours a day, seven days a week. System backups are done on Fridays
from 7:00am to approximately 9:00am Eastern (Daylight/Standard)
Time. Scheduled downtimes for equipment or software maintenance are
announced in advance. The system can be reached worldwide, and
membership is by individual subscription only (no group or company
accounts). The current annual subscription fee is US$75.00.

On-line subscription information is available in the U.S. by
dialing 1-800-521-8950 and logging in with username INFORMATION.
DECUServe and the INFORMATION account can also be reached on the
Internet via telnet connection to decuserve.decus.org or e-mail to
infor...@decuserve.decus.org.

Contact Information
===================

The editors of the DECUServe Journal are Brian and Sherrie McMahon.
They can be reached as follows:

mcma...@decuserve.decus.org or mcm...@ac.grin.edu
mcma...@decuserve.decus.org or grif...@ac.grin.edu
+1 515 269 4901 (normal office hours, U.S. Central time)
+1 515 269 4936 FAX

Assistant Editor Curtis Reid is reachable as
re...@decuserve.decus.org.

0 new messages