The user profiles should be easy:
1. Issue the command: DSPUSRPRF USRPRF(*ALL) OUTPUT(*OUTFILE) +
OUTFILE(QGPL/USRPRF)
2. You can then run a query over the outfile. UPOTQU will be the
Output queue field, and UPOTQL will be the Output queue library
field.
The device descriptions are a little trickier. The following CL
program and query can be used to get the information you are
looking for. The CL program will generate and later delete a spooled
file for each device on your system. It is not very fancy but it
works. The final result will be a report which lists each device and
output queue like this:
Device description . . . . . . . . : DEVD CMPA1
Output queue . . . . . . . . . . . : OUTQ *DEV
Device description . . . . . . . . : DEVD CMPA2
Output queue . . . . . . . . . . . : OUTQ *DEV
Device description . . . . . . . . : DEVD CMPB1
Output queue . . . . . . . . . . . : OUTQ *DEV
I hope this helps!
CL Program
==========
PGM
DCL VAR(&COUNTER) TYPE(*DEC) LEN(4)
DCL VAR(&COUNTER2) TYPE(*DEC) LEN(4)
DCLF FILE(QGPL/XOUTQ) RCDFMT(*ALL)
DSPOBJD OBJ(*ALL/*ALL) OBJTYPE(*DEVD) +
OUTPUT(*OUTFILE) OUTFILE(QGPL/XOUTQ)
READFILE: RCVF
MONMSG MSGID(CPF0864) EXEC(GOTO CMDLBL(EOF))
DSPDEVD DEVD(&ODOBNM) OUTPUT(*PRINT) OPTION(*BASIC)
CHGVAR VAR(&COUNTER) VALUE(&COUNTER + 1)
GOTO CMDLBL(READFILE)
EOF:
CRTPF FILE(QGPL/XOUTQ2) RCDLEN(135)
START: CHGVAR VAR(&COUNTER2) VALUE(&COUNTER2 + 1)
CPYSPLF FILE(QPDCDEV) TOFILE(QGPL/XOUTQ2) +
SPLNBR(&COUNTER2) MBROPT(*ADD)
DLTSPLF FILE(QPDCDEV) SPLNBR(&COUNTER2)
IF COND(&COUNTER2 < &COUNTER) THEN(GOTO +
CMDLBL(START))
RUNQRY QRY(QGPL/FND_OUTQ)
RETURN
ENDPGM
Query Definition
================
Query . . . . . . . . . . . . . . . . . FND_OUTQ
Library . . . . . . . . . . . . . . . QGPL
Selected files
ID File Library Member Record Format
T01 XOUTQ2 QGPL XOUTQ2 XOUTQ2
Result fields
Name Expression Column Heading
A substr(xoutq2, 2, 18)
B substr(xoutq2, 2, 12)
C substr(xoutq2, 1, 100)
Select record tests
AND/OR Field Test Value
A EQ 'Device description'
OR B EQ 'Output queue'
Ordering of selected fields
Field Sort Ascending/ Break Field
Name Priority Descending Level Text
C
Selected output attributes
Output type . . . . . . . . . . . . . . Printer
Form of output . . . . . . . . . . . . Detail
Line wrapping . . . . . . . . . . . . . No