Re: [U2] How do you verify windows printer is good before fatal error by PRINTing to a bogus printer.

2014-01-29 Thread Anthonys Lists

On 28/01/2014 20:59, Charles Stevenson wrote:

Anthony pretty much nailed how we're doing it.

But my original question is still unanswered.
I want to make sure it's a valid printer before I start printing to it.
I think I problably need to do something like
EXECUTE DOS /C [some-command] \\MY_PRINT_SERVER\PrinterName 
CAPTURING DOSMSG

IF DOSMSG = [something bad] THEN  . . .

I was hoping someone in this august body had crossed that bridge before.


We never had that problem.

I had a PRINTER subroutine or suchlike that accessed a printers file 
with all the parameters. Any programatic (or user command line) attempt 
to access a printer was via my stuff, that checked this file, and set 
things up accordingly.


So as far as eg accounts was concerned, they had the ACCOUNTS printer. 
Whenever anything changed, I simply changed the ACCOUNTS entry in the 
parameter file. Very useful, because on the odd occasion when a printer 
went down I just made a temporary change to the file and everything got 
diverted :-)


If tyou're interested, let me know and I'll see if I can find the code - 
I know I had it but it's a long time ago ...


Cheers,
Wol
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


Re: [U2] [UV] Programmatic Verification of Globally Cataloged Subroutine

2014-01-29 Thread Ross Ferris
Knowing how many arguments a subroutine is expecting is a good way to 
check/confirm that the call you are about to make isn't going to blow up in 
your face!

Ross Ferris
Stamina Software
Visage  Better by Design!

-Original Message-
From: u2-users-boun...@listserver.u2ug.org 
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Wjhonson
Sent: Wednesday, January 29, 2014 10:15 AM
To: u2-users@listserver.u2ug.org
Subject: Re: [U2] [UV] Programmatic Verification of Globally Cataloged 
Subroutine


I was just trying to think of a reason why I'd want specifically to know how 
many arguments the subroutine has.
That is, why was this particular fact chosen as the returned status code ?



-Original Message-
From: Keith Johnson [DATACOM] keith.john...@datacom.co.nz
To: 'u2-users@listserver.u2ug.org' u2-users@listserver.u2ug.org
Sent: Tue, Jan 28, 2014 3:10 pm
Subject: Re: [U2] [UV] Programmatic Verification of Globally Cataloged 
Subroutine


Hi,

LeRoy Dreyfuss said that you would have to change 52 to 12 for EXIST to work.

The globally cataloged programs have an extra 40 characters put on the front, 
so that would cause a problem.

@RECORD[1,4] is a count of the number of times the program has been used.

@RECORD[5,8] is who cataloged it

@RECORD[13,4] are the date and time (I think)


Regards, Keith



___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users

 
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users