We use a user setup file with parameters for each user. The id's for the file are the user's login id. We store the users default parameters in the file. We have a program that reads the file when the user logs in for some things and other programs that use other features in the file. The file contains information about the user including their security level on programs, letter signature, department, employee number, what menu comes up when they log in, and which printer they use; among other things. That way it is not hard coded in any program like that below. If a user is added or deleted then the programs that use the information don't have to be modified. They are just added or deleted from the table (actually moved to an inactive user table for historical reference or the off chance they return).

Jerry

----- Original Message ----- From: "Brutzman, Bill" <[EMAIL PROTECTED]>
To: <u2-users@listserver.u2ug.org>
Sent: Thursday, March 15, 2007 11:04 AM
Subject: Spam:RE: [U2] Printing Reports In Universe BASIC


Consider the following Universal UniVerse printer handler...

*---------------------------------------------------------------------------
--------------

*R0  Bill Brutzman  Aug.2006

SUBROUTINE PRINTER.SETUP.R2 ( Mode )

*--------------------------------------
Printer.Setup :

 begin case
       case Mode = 'Portrait'
                  begin case
                        case @logname = 'jimr'     ;  execute 'SETPTR
,80,60,2,0,1,BRIEF,NHEAD,NFMT,NOEJECT,AT PACK_3X'

case @logname = 'lou'      ;  execute
'SETPTR ,80,60,2,0,1,BRIEF,NHEAD,NFMT,NOEJECT,AT DOCK'

case @logname = 'rich'     ;  execute
'SETPTR ,80,60,2,0,1,BRIEF,NHEAD,NFMT,NOEJECT,AT CUST'
                        case @logname = 'karen'    ;  execute 'SETPTR
,80,60,2,0,1,BRIEF,NHEAD,NFMT,NOEJECT,AT CUST'
                        case @logname = 'maria'    ;  execute 'SETPTR
,80,60,2,0,1,BRIEF,NHEAD,NFMT,NOEJECT,AT CUST'
                        case @logname = 'ed'       ;  execute 'SETPTR
,80,60,2,0,1,BRIEF,NHEAD,NFMT,NOEJECT,AT CUST'

          case @logname = 'mike'     ;  execute 'SETPTR
,80,60,2,0,1,BRIEF,NHEAD,NFMT,NOEJECT,AT PCNTRL'
                        case @logname = 'jimc'     ;  execute 'SETPTR
,80,60,2,0,1,BRIEF,NHEAD,NFMT,NOEJECT,AT PCNTRL'
                        case @logname = 'jimt'     ;  execute 'SETPTR
,80,60,2,0,1,BRIEF,NHEAD,NFMT,NOEJECT,AT PCNTRL'
                        case @logname = 'alex'     ;  execute 'SETPTR
,80,60,2,0,1,BRIEF,NHEAD,NFMT,NOEJECT,AT PCNTRL'
                        case @logname = 'wayne'    ;  execute 'SETPTR
,80,60,2,0,1,BRIEF,NHEAD,NFMT,NOEJECT,AT PCNTRL'

case @logname = 'bobs'     ;  execute
'SETPTR ,80,60,2,0,1,BRIEF,NHEAD,NFMT,NOEJECT,AT ENG'

case Mode = 'LandScape'
                  begin case
                        case @logname = 'jimr'     ;  execute 'SETPTR
,132,55,2,0,1,BRIEF,NHEAD,NFMT,NOEJECT,AT PACK.LAND'
                        case @logname = 'bruce'    ;  execute 'SETPTR
,132,55,2,0,1,BRIEF,NHEAD,NFMT,NOEJECT,AT PACK.LAND'

case @logname = 'lou'      ;  execute
'SETPTR ,132,55,2,0,1,BRIEF,NHEAD,NFMT,NOEJECT,AT DOCK.LAND'
                  end   case

case Mode = 'GreenBar'                                      ;
execute 'SETPTR ,132,60,2,0,1,BRIEF,NFMT,AT PR0'
case 1                                                      ;
execute 'SETPTR ,132,60,2,0,1,BRIEF,NFMT,AT PR0'
 end   case

 execute 'RESET.PRINTER'
 PRINTER ON

*--------------------------------------
The.End :

 RETURN
 END

*---------------------------------------------------------------------------
------------------

I suppose that this would be a little more slick to have a UV file with a
table of users and printers.

HTH.

--Bill


-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Kevin King
Sent: Thursday, March 15, 2007 10:06 AM
To: u2-users@listserver.u2ug.org
Subject: RE: [U2] Reports In Universe BASIC


From: MAJ Programming
Like helping the newbies with MV, I can now add this
little tidbit to my mental library of techniques
should the need arise.

Just because one can doesn't mean one should.  In the case of PRINT ON
working properly without a corresponding PRINTER ON, imagine six
months later trying to find all of the programs that are outputting to
the printer.  Not only do we have to search for procs and paragraphs
that start the program with a (P (or LPTR) option, but now in
searching through the BP code we have to search for both PRINTER ON
and PRINT ON.  It's likely that someone will forget one of those
options (and possibly a few others I may have missed in this quick
post) and overlook a program that should have otherwise been found.

As this jihad on upper/lower case has illustrated, there are many ways
to skin this U2 cat.  And the more ways we as a community use, the
harder we make it on ourselves to find something months after the
fact.  I dream of a day when programmers will have a response other
than "who was the idiot who wrote this crap?" when faced with
modifying someone else's program.  But alas, if this latest battle is
any indication, we're no closer to that day today than we were 20
years ago or possibly even 20 years before that.  And then we wonder
why our jobs are being shipped overseas?  It's pretty obvious, when
companies are faced with years and years of obfuscated and
unmaintainable code, why not get the same results from someone
overseas at a fraction of the price?

My intent is not to discourage my friends and esteeemed collegues in
this list, but rather to vent some frustration in the knowledge that
our communal past may be contributing to a negative impact on our
individual futures.  As a reasonably focused community (in contrast to
the millions of programmers in other environments) we have a real
fighting chance at turning this thing around, but if we can't find
some common ground on an issue as existentially meaningless as
upper/lower case then we shouldn't be surprised when the bottom
eventually falls out.

-Kevin
[EMAIL PROTECTED]
http://www.PrecisOnline.com

** Check out scheduled Connect! training courses at
http://www.PrecisOnline.com/train.html.
-------
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/
-------
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/
-------
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/

Reply via email to