dhardy95
asked on
getting printer devd into a physical file
I need some of the parameters from the dspdevd command to output to a physical file so that the info can be used in queries or downloaded to a spreadsheet. I don't need all of the devd parms, but I do need all *LAN printers. The rtvcfgsrc command outputs the info to a source file, but I don't know how hard it would be to write a program to output this info to a physical file. We have over 300 printers here and keeping documentation up to date is diificult. Is there a way to do this? Thanks!
dhardy95:
I'd probably go with a program that:
1. Called the List Configuration Descriptions (QDCLCFGD) API to list Configuration description type '*DEVD' and Object qualifier '*LANPRT' into a user space.
2. Retrieved each entry from the space, and then...
3. INSERTed each entry into a table (or physical file).
I wouldn't be surprised if Barry's program turns out to do something similar.
Tom
I'd probably go with a program that:
1. Called the List Configuration Descriptions (QDCLCFGD) API to list Configuration description type '*DEVD' and Object qualifier '*LANPRT' into a user space.
2. Retrieved each entry from the space, and then...
3. INSERTed each entry into a table (or physical file).
I wouldn't be surprised if Barry's program turns out to do something similar.
Tom
ASKER
Thanks, Barry!! The parameters I need are devd, devcls, mfrtypmdl, rmtlocname, and text. We have so many printers it's a nightmare trying to keep the documentation current on the devices.
Okay, I will dig up my program and post something for you later today.
Barry
Barry
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER
Thanks Barry! We'll give it a try tomorrow.
Barry:
Any reason you couldn't simply use CPYF instead of CALL GETPRTR?
The CPYF could select on ODOBAT *EQ 'PRTLAN ' via INCREL and also use FMTOPT(*MAP *DROP).
Tom
Any reason you couldn't simply use CPYF instead of CALL GETPRTR?
The CPYF could select on ODOBAT *EQ 'PRTLAN ' via INCREL and also use FMTOPT(*MAP *DROP).
Tom
How would the attributes retrieved by QDCRDEVD get into the file?
Barry
Barry
Heh, DUH! Yeah, I skipped right over that. End of a long day.
Tom
Tom
I have the beginnings of a program that I could modify for you.
Barry