Printer Selection (SCO UNIX/Filepro)

Brian K. White brian at aljex.com
Wed Jun 14 17:10:43 PDT 2006


----- Original Message ----- 
From: <Frank7767 at aol.com>
To: <filepro-list at lists.celestial.com>
Sent: Wednesday, June 14, 2006 7:17 PM
Subject: Printer Selection (SCO UNIX/Filepro)


> Situation  SCO Unix System/Filepro     55 active  printers...
>  I want to give the office staff a choice of three of the printers.. 
> Other
> than the [-pq]
> menu option or writing individual menus for each document, How can  this 
> be
> done?

We did it by first writing a centralized print routine, and then adding a 
gosub, which includes call, to all input tables.
This also required adjusting everything that prints so that it always prints 
to a file, then calls the print routine.
That was painful of course, but now life is bliss.
And it's not as painful as you might think. You F8 copy in a big gosub that 
does most of the work for you setting up a good unique temp file name to 
print to, setting the printer type, pre-creating the file with open 
permissions, setting a bunch of variables to sane defaults, etc... then 
wherever you used to have a form, you just insert one gusub before the form, 
and another after. Optionally you set a few of those variables the first 
gosub set to sane defaults just before calling the 2nd gosub.

Now you pack in all the fancy stuff you want into the centralized routine.
Including a per user lookup for printer choices based on a filepro file like 
your (presumably) existing control file.

Talk to Tom about our destprint. It's fairly stand-alone so we can probably 
give or sell it to you.
You would have to add the per user printer list to it as we don't have that, 
but this gives you a single place to work on instead of doing the same thing 
everywhere.


A dirtier hack would be to give each user their own fp config file in their 
home directory, and have their .profile set PFCONFIG=$HOME/fpconfig
define only what printers you want them to see, then put -pq everywhere.

Maintenance nightmare but you won't change any code anywhere.


A less horrible maintenance nightmare version of the dirty hack would be to 
have a single template config file, maybe the actual fp/config, have no 
printers defined, then have a small number of little files that just had the 
printer definitions in them. Then you have the app start script concatenate 
the main file + one or more printer files to a unique temp name and set 
PFCONFIG to that temp name.

This way when you make changes to the main file, you don't have to manually 
change each users own file, similarly when you add or remove printers you 
only have to edit one of the small print def files which is one file per 
printer set, like per office or location or work group etc.

You'll still have to edit something in each users profile to set a variable 
that the start script can look for to know which printer set to add to the 
temp config.
But that's a lot less and a lot simpler than keeping 50 full fp config files 
in sync but with different printers, and, you still don't have to edit any 
fp code anywhere other than to add -pq


A central, top-level application login written in filepro would allow you to 
maintain everything in filepro instead of snips of text files and users 
.profile files and writing some tricky shell script, but writing a login app 
is a whole job of it'own.
If you already have something like that (an rclerk process, not a menu) that 
you should do the work there for sure.


Brian K. White  --  brian at aljex.com  --  http://www.aljex.com/bkw/
+++++[>+++[>+++++>+++++++<<-]<-]>>+.>.+++++.+++++++.-.[>+<---]>++.
filePro  BBx    Linux  SCO  FreeBSD    #callahans  Satriani  Filk!



More information about the Filepro-list mailing list