- 论坛徽章:
- 0
|
如下代码:
GETQRY:
PGM PARM(&LIBRARY &FILE)
DCL VAR(&LIBRARY) TYPE(*CHAR) LEN(10)
DCL VAR(&FILE) TYPE(*CHAR) LEN(10)
DCLF FILE(QTEMP/QRYOBJS)
DLTF FILE(QTEMP/QRYOBJS)
MONMSG CPF0000
DLTF FILE(QTEMP/&LIBRARY)
MONMSG CPF0000
CRTSRCPF FILE(QTEMP/&LIBRARY)
DSPOBJD OBJ(&LIBRARY/*ALL) OBJTYPE(*QRYDFN) +
DETAIL(*FULL) OUTPUT(*OUTFILE) +
OUTFILE(QTEMP/QRYOBJS)
BEGIN: RCVF /* GET QUERY NAME AND LIBRARY NAME */
/* IF END OF FILE REACHED, EXIT LOOP */
MONMSG CPF0864 EXEC(GOTO EOF)
RTVQMQRY QMQRY(&ODLBNM/&ODOBNM) +
SRCFILE(QTEMP/&LIBRARY) ALWQRYDFN(*ONLY)
GOTO CMDLBL(BEGIN)
EOF: FNDSTRPDM STRING(&FILE) FILE(QTEMP/&LIBRARY)
MBR(*ALL) OPTION(*NONE) PRTMBRLIST(*YES)
ENDPGM
[ 本帖最后由 pantierui 于 2008-7-25 09:22 编辑 ] |
|