1. 所用PF CUSERJ/FILE02P
FMT PF .....A..........T.Name++++++RLen++TDpB......Functions
*************** Beginning of data *******************
0001.00 R F02R
0002.00 PGMNAME 10A
0003.00 TS Z
0004.00 CURUSR 10A
0005.00 JOBJOB 10A
0006.00 JOBUSR 10A
0007.00 JOBNBR 10A
0008.00 INFOR 50A
****************** End of data **********************
2. RPG程序 CUSERJ/RPG02
FMT FX FFilename++IPEASF.....L.....A.Device+.Keywords++++++++++++++++++
*************** Beginning of data ******************************
0001.00 FFILE02P O E DISK
0002.00 *
0003.00 D*
0004.00 *
0005.00 C *ENTRY PLIST
0006.00 C PARM P1CUSR 10
0007.00 C PARM P2JOB 10
0008.00 C PARM P3USR 10
0009.00 C PARM P4NBR 10
0010.00 C*
0011.00 C EVAL PGMNAME='RPG02'
0012.00 C EVAL TS=%TimeStamp()
0013.00 C EVAL CURUSR=P1CUSR
0014.00 C EVAL JOBJOB=P2JOB
0015.00 C EVAL JOBUSR=P3USR
0016.00 C EVAL JOBNBR=P4NBR
0017.00 C WRITE F02R
0018.00 C EVAL *INLR=*ON
0019.00 C RETURN
****************** End of data ***********************************
3. CL程序 CUSERJ/CL07
FMT ** ...+... 1 ...+... 2 ...+... 3 ...+... 4 ...+... 5 ...+... 6 ...+.
*************** Beginning of data ********************************
0001.00 PGM
0002.00 DCL VAR(&CURUSR) TYPE(*CHAR) LEN(10)
0003.00 DCL VAR(&JOBJOB) TYPE(*CHAR) LEN(10)
0004.00 DCL VAR(&JOBUSR) TYPE(*CHAR) LEN(10)
0005.00 DCL VAR(&JOBNBR) TYPE(*CHAR) LEN(10)
0006.00 //
0007.00 ADDLIBLE LIB(CUSERJ) POSITION(*FIRST)
0008.00 RTVJOBA JOB(&JOBJOB) USER(&JOBUSR) NBR(&JOBNBR) +
0009.00 CURUSER(&CURUSR)
0010.00 CALL PGM(RPG02) PARM(&CURUSR &JOBJOB &JOBUSR +
0011.00 &JOBNBR)
0012.00 ENDPGM
****************** End of data ***********************************
4. PF数据 CUSERJ/FILE02P
Line ....+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8....+....9....+...10...
PGMNAME TS CURUSR JOBJOB JOBUSR JOBNBR INFOR
000001 RPG02 0001-01-01-00.00.00.000000
000002 RPG02 2013-04-02-10.11.31.027000
000003 RPG02 2013-04-02-10.19.55.453000 A B C D
000004 RPG02 2013-04-02-10.25.38.726000 CUSERJ QPADEV007S CUSERJ 019448
000005 RPG02 2013-04-02-11.30.30.248000 CUSERJ QPADEV007S CUSERJ 019457
000006 RPG02 2013-04-02-11.32.41.405000 CUSERJ QPADEV007S CUSERJ 019457
000007 RPG02 2013-04-02-11.33.51.479000 CUSERJ QDFTJOBD CUSERJ 019458
****** ******** End of report ********
灰色部分是直接CALL CUSERJ/CL07的结果
紫色部分是SBMJOB CMD(CALL PGM(CUSERJ/CL07))的结果
本来是想试试直接CALL和SBMJOB时程序的一些参数的, 但测试server没有JS, 用SBMJOB又不能一次run多条CMD, 后来想了个折中方法: 在CL中实现. (难道JS会自动生成CL, 然后再提交一个CL???)
阅读(1448) | 评论(0) | 转发(0) |