收集一个lib下的所有pf-src文件名
问题:
Is there any readymade command to save all PF-SRC in an outfile by passing
Library Name? If not so, can any one please suggest me, how could I achieve
this?
答案1:
PGM PARM(&LIB)
DCL VAR(&LIB) TYPE(*CHAR) LEN(10)
DCLF FILE(DSPFD)
DSPFD FILE(&LIB/*ALL) TYPE(*ATR) OUTPUT(*OUTFILE) +
FILEATR(*PF) OUTFILE(&LIB/DSPFD)
READ: RCVF
MONMSG MSGID(CPF0000) EXEC(GOTO CMDLBL(ENDPGM))
IF COND(PHFTYP *EQ 'S') THEN(DO)
CPYF FROMFILE(&PHLIB/&PHFILE) TOFILE(ANOUTFILE) +
FROMMBR(*ALL) MBROPT(*ADD) FMTOPT(*CVTSRC)
ENDDO
GOTO CMDLBL(READ)
ENDPGM: RETURN
ENDPGM
答案2:
There is no readymade command nor direct way to do this.
I can suggest you to save all the PF-SRC's in a SAVF as follows.
1/ CRTSAVF FILE(MYLIB/MYSAVF)
2/ WRKOBJPDM LIB(MYLIBSRC) OBJ(*ALL) OBJTYPE(*FILE) OBJATR('pf-src')
3/ Key opt 3 (copy), press F13 to propagate 3 downward through all files and
copy to QTEMP lib
4/ SAVOBJ OBJ(*ALL) LIB(QTEMP) DEV(*SAVF) SAVF(MYLIB/MYSAVF)
阅读(1171) | 评论(2) | 转发(1) |