Operating System - OpenVMS
1753943 Members
9505 Online
108811 Solutions
New Discussion юеВ

ip address out of printer into a symbol

 
SOLVED
Go to solution
Hans Dubiez
New Member

ip address out of printer into a symbol

Does anybody know a simple way to get the ip address of a printer from a print queue into a symbol?
I could not find the solution in f$getqui.
And i am not smart enough (vaiable numer of digits) to get an stable answer while struggeling with the output from the "show que/device" command.

Greetings from a rainy (1 time in 6 weeks)
Holland.
m(..)m (this is a humble bow)
A man's gotta know his limitations
5 REPLIES 5
Bojan Nemec
Honored Contributor
Solution

Re: ip address out of printer into a symbol

Hans,

Try with this:

$ ipandport = f$getqui("DISPLAY_QUEUE","DEVICE_NAME",queue_name)
$ ipandport='ipandport'
$ ip=f$element(0,":",ipandport)

You must set queue_name to the queue name you want. The $ ipandport='ipandport' is to get rid of the extra bracess you get.

Bojan
Hans Dubiez
New Member

Re: ip address out of printer into a symbol

Dear Bojan,

Thanks for your very quick response.
I tried it and it did the job perfectly.
You are a truely expert

m(..)m

You deserve this huble bow.
A man's gotta know his limitations
Jan van den Ende
Honored Contributor

Re: ip address out of printer into a symbol

Hans,

to begin with:
Welkom bij het VMS forum :-)

Please be aware, that Bojan's solution gives you what it requests: the DEVICE_NAME of the queue. If you have specified a (host-, DNS-name) as the device (which I strongly favor!) then what you wil get back is _NOT_ the IP address, but the NAME associated with that address.
This might or might not be what you wish.

Proost.

Have one on me.

jpe
Don't rust yours pelled jacker to fine doll missed aches.
Hans Dubiez
New Member

Re: ip address out of printer into a symbol

Ha die Jan,

Thanks for welcoming me.
In de past i visit this site many times searching for solutions for te problems i had.
This was the first time i couldn't find an answer.
So i jumped into the cold water, and found out it's realy warm.
In short time 2 great answers.

And you're right, one has to prefer names instead of numbers ;=)

But in my situation there are on two different clusters (in seperated networks)with hundres of queue's using the same printers.
Not all of them are on both systems.
And no, they are not named but numbered.
If they were named i could perform lookups by name.(show host)
The coal is to match them and to get rid of missing and obselete ones.

Keep up the good things!
Hansley Dubieson.

A man's gotta know his limitations
Hans Dubiez
New Member

Re: ip address out of printer into a symbol

Bojan Nemec's solution did the job.
A man's gotta know his limitations