25 pts.
 dspdevd
Is there any way to display the printer associated to my device?

Software/Hardware used:
ASKED: June 7, 2012  11:38 PM
UPDATED: June 10, 2012  9:15 AM

Answer Wiki:
WRKJOB OPTION(*DFNA) Then go to 2nd page. It will be on the top of the screen.
Last Wiki Answer Submitted:  June 8, 2012  1:15 pm  by  CharlieBrowne   32,855 pts.
All Answer Wiki Contributors:  CharlieBrowne   32,855 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

The question isn’t totally clear.

A workstation device will have an association with a printer device name. That’s not quite the same as a printer ‘device’ because there doesn’t actually have to be a device with the name associated with a display device it might just be a name. The printer device name is just an attribute that can be used by various programs to use for printing functions.

But to display the value associated with an device, just use the DSPDEVD command and specify the device name that you’re interested in.

But you used “dspdevd” as the question text, so you already know about the command. So you’re asking for something more. Can you explain what you actually want to know?

Tom

 108,055 pts.

 

You are right. I was vague. I’m looking for a listing of devices that show the printer attached to them. I know I can see the printer attached to a user profile but I need to find a needle in the haystack with someone using a display that is printing to the wrong printer. Can’t find it anywhere??? Thank you for following up.

 25 pts.

 

I do not know an easy way, but here is a process you could use.
wrkcfgsts *dev output(*print)
Copy the SPLF to a DB file
write a CL program to read the file and do a DSPDEVD output(*PRINT) every time it finds a line with a device on it.
copy that splf to a db file and lookd for the keyword PRTFILE

 32,855 pts.

 

I figured it would come down to a CL program. Thanks for all the help!

 25 pts.

 

…with someone using a display that is printing to the wrong printer.

That’s a little closer. Now, how can you tell that (1) it’s a wrong printer, and (2) it’s a display device with an incorrect setting rather than a number of other possibilities?

For (1), I’d assume that printouts are showing up on an unexpected printer, and there’s no way to recognize their source. But maybe you have detail. How often does it happen? (The more, often the easier it might get.)

Do you have all the “normal” tools, e.g., PDM?

Tom

 108,055 pts.

 

Its Rather more easy, if you use, iSeries Navigator. Use the following sequence,
System => Work Management => Active Job
There, select the job you want to check the assigned printer, and select the last option, “Properties”. There in “Printer Out Put Queue” Tab, you will get the detail about the assigned printer.

 25 pts.

 

Use the following sequence,
System => Work Management => Active Job

That will show the printer assigned for the job, which might not be the one assigned to the workstation device. It most likely will be, though.

But which job should be checked? The problem is that it’s not known where an incorrect printer assignment might be.

And what if it’s not a job assignment that’s causing the problem?

More detail about the actual problem is needed.

Tom

 108,055 pts.