AS400

5 pts.
Tags:
AS/400 printing
AS/400 Query
Printers
how do you make a query of all the listed printers and display terminals in the system with the following columns: Device Type, Device Name, Description, Status, Last Used.

Answer Wiki

Thanks. We'll let you know when a new response is added.

I’m having trouble finding an easy way to do what you want.
1. Get a list of devices DSPOBJD OBJ(*ALL) OBJTYPE(*DEVD) can be output to a datafile
2. A CL program loops through all the devices
2.1. if the device is a printer or a terminal
2.1.1 for printer devices the RTVDEVPRT might provide the data – except for the status
2.1.1 pass data to an rpg program to write to a file
2.1.2 for displays RTVDEVDSP might provide the data – except for the status
2.1.1 pass data to an rpg program to write to a file
I’m not sure where to get the status from but if you want to pursue this we’ll track it donw
3. run a query

Hi,

You can use RTVCFGSTS to get the current status of a device.

Regards,

Martin Gilbert.

Discuss This Question: 1  Reply

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • Teandy
    The list objects API (QUSLOBJ) should give you what you need. Check it out at http://publib.boulder.ibm.com/infocenter/iseries/v5r4/index.jsp?topic=/apis/quslobj.htm
    5,860 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following