zos JESMSGLG 不显示 job steps return codes
在普通学习的时候,SDSF 查看 JCL 结果,可能并不会注意到下面结果有什么差别
但跟公司的大型机出的结果是不同的,就是缺少了 job steps return codes,在 STARTED 和 ENDED 中间应该有 job steps 的返回结果才对
SDSF OUTPUT DISPLAY COBRUN01 JOB00053 DSID 2 LINE 0 COLUMNS 02- 161
COMMAND INPUT ===> SCROLL ===> CSR
********************************* TOP OF DATA *****************************************************************************************************************
J E S 2 J O B L O G -- S Y S T E M S Y S 1 -- N O D E N 1
15.08.45 JOB00053 ---- WEDNESDAY, 25 JAN 2023 ----
15.08.45 JOB00053 IRR010I USERID IBMUSER IS ASSIGNED TO THIS JOB.
15.08.45 JOB00053 ICH70001I IBMUSER LAST ACCESS AT 14:56:46 ON WEDNESDAY, JANUARY 25, 2023
15.08.45 JOB00053 $HASP373 COBRUN01 STARTED - INIT 3 - CLASS C - SYS SYS1
15.08.45 JOB00053 IEF403I COBRUN01 - STARTED - TIME=15.08.45
15.08.45 JOB00053 IEF404I COBRUN01 - ENDED - TIME=15.08.45
15.08.45 JOB00053 $HASP395 COBRUN01 ENDED
------ JES2 JOB STATISTICS ------
25 JAN 2023 JOB EXECUTION DATE
16 CARDS READ
46 SYSOUT PRINT RECORDS
0 SYSOUT PUNCH RECORDS
2 SYSOUT SPOOL KBYTES
0.00 MINUTES EXECUTION TIME
1 //COBRUN01 JOB ,'RUN MMA001',CLASS=C,MSGCLASS=X,MSGLEVEL=(1,1), JOB00053
// REGION=4M,NOTIFY=&SYSUID
//*
//*!!! PLS DOUBLE CHECK AND REMARK THIS LINE TO SUBMIT
//*
IEFC653I SUBSTITUTION JCL - ,'RUN MMA001',CLASS=C,MSGCLASS=X,MSGLEVEL=(1,1),REGION=4M,NOTIFY=IBMUSER
2 //JOBLIB DD DISP=SHR,DSN=MTMAPRD.BATCH.LOAD
3 //PROCLIB JCLLIB ORDER=MTMAPRD.BATCH.PROC
//*
//*********************************************************************
//* RUN PROGRAM
//*********************************************************************
4 //RUN EXEC PGM=MMA001
5 //SYSOUT DD SYSOUT=*
//*********************************************************************
//* END
//*********************************************************************
原因就是 zos 没有配置 IEFACTRT EXIT program
什么是 EXIT program? 在大型机的环境里面 EXIT program 是很常见的东西
就是在正常程序流程完成后,在出口地方再调用一个统一的程序。
例如: 网上银行系统,调用完业务程序,在要返回前端时,加一个 EXIT program
去计算用户当天可使用限额,如果超过限额,就另外作出处理。
这里的 JESMSGLG 没有 显示 job steps return codes 就是 相关的 EXIT program 没有启动
zos 是自带相关的程序和源码,在 SYS1.SAMPLIB(IEEACTRT) 汇编源码
可以用下面 JOB 去编译及生成到 USER.LINKLIB 也可以放到 USER.LPALIB
//SPSMFXIT JOB CLASS=A,MSGCLASS=X,MSGLEVEL=(1,1),NOTIFY=&SYSUID
//ASMXIT EXEC HLASMCL,REGION=4M,COND.L=(0,NE,C),
// PARM.L='LIST,LET,NCAL,XREF,RENT,REUS'
//C.SYSLIB DD DSN=SYS1.MACLIB,DISP=SHR
// DD DSN=SYS1.MODGEN,DISP=SHR
//C.SYSIN DD DSN=SYS1.SAMPLIB(IEEACTRT),DISP=SHR
//L.SYSLMOD DD DSN=USER.LINKLIB(IEFACTRT),DISP=SHR,UNIT=,SPACE=
zos 在不同地方也放了已编译的版本,在 SYS1.LPALIB 和 ADCD.Z110.LPALIB 都有
把这2个地方的 IEFACTRT 版本,改成 IEFACTRX
按照系统加载次序,会先使用 USER.** 版本
VIEW ADCD.Z110.PARMLIB(LPALSTCI) - 01.04 Columns 00001 00080
Command ===> Scroll ===> CSR
****** ********************************* Top of Data **********************************
000001 USER.LPALIB,
000002 ADCD.Z110.LPALIB,
000003 EQA810.SEQALPA(ZARES1),
000004 SYS1.LPALIB,
000005 SYS1.SERBLPA,
000006 NET530.SCNMLPA1(ZARES2),
000007 FAN140.SEAGLPA(ZARES1),
000008 ISF.SISFLPA(ZARES1),
000009 EOY.SEOYLPA(ZARES2),
000010 SYS1.SBDTLPA,
000011 CEE.SCEELPA(ZARES2),
000012 ISP.SISPLPA(ZARES1),
000013 TCPIP.SEZALPA(ZARES1),
000014 CSQ700.SCSQLINK(ZAPRD2),
000015 CSQ700.SCSQANLE(ZAPRD2),
000016 SYS1.SORTLPA,
000017 SYS1.SDWWDLPA,
000018 SYS1.SICELPA,
000019 DFH320.CICS.SDFHLPA(ZACIC1),
000020 AUT320.SINGMOD3(ZARES1)
****** ******************************** Bottom of Data ********************************
在 SDSF 使用 D PROG,EXIT 查看加载的 IEFACTRT
D PROG,EXIT,MODNAME=IEFACTRT
NC0000000 ADCD 23028 11:05:14.59 IBMUSER 00000290 D PROG,EXIT,MODNAME=IEFACTRT
MR0000000 ADCD 23028 11:05:14.60 IBMUSER 00000090 CSV462I 11.05.14 PROG,EXIT DISPLAY 215
LR 215 00000090 MODULE IEFACTRT
ER 215 00000090 EXIT(S) SYSJES2.IEFACTRT
当编译后,先 refresh 一下 LLA,然后,把旧的移除,再新加
F LLA,REFRESH
SETPROG EXIT,DELETE,EXITNAME=SYSJES2.IEFACTRT,MODNAME=IEFACTRT
SETPROG EXIT,ADD,EX=SYSJES2.IEFACTRT,MOD=IEFACTRT,DSN=USER.LINKLIB
这样,再提交 JCL,JESMSGLG 就有相关 jobs steps return codes
SDSF OUTPUT DISPLAY COBRUN01 JOB00045 DSID 2 LINE 0 COLUMNS 02- 161
COMMAND INPUT ===> SCROLL ===> CSR
********************************* TOP OF DATA *****************************************************************************************************************
J E S 2 J O B L O G -- S Y S T E M A D C D -- N O D E N 1
18.56.41 JOB00045 ---- WEDNESDAY, 25 JAN 2023 ----
18.56.41 JOB00045 IRR010I USERID IBMUSER IS ASSIGNED TO THIS JOB.
18.56.41 JOB00045 ICH70001I IBMUSER LAST ACCESS AT 18:54:27 ON WEDNESDAY, JANUARY 25, 2023
18.56.41 JOB00045 $HASP373 COBRUN01 STARTED - INIT 3 - CLASS C - SYS ADCD
18.56.41 JOB00045 IEF403I COBRUN01 - STARTED - TIME=18.56.41
18.56.41 JOB00045 - --TIMINGS (MINS.)-- -----PAGING COUNTS----
18.56.41 JOB00045 -STEPNAME PROCSTEP RC EXCP CONN TCB SRB CLOCK SERV WORKLOAD PAGE SWAP VIO SWAPS
18.56.41 JOB00045 -RUN 00 197 0 .00 .00 .0 152 BATCH 0 0 0 0
18.56.41 JOB00045 IEF404I COBRUN01 - ENDED - TIME=18.56.41
18.56.41 JOB00045 -COBRUN01 ENDED. NAME-RUN MMA001 TOTAL TCB CPU TIME= .00 TOTAL ELAPSED TIME= .0
18.56.41 JOB00045 $HASP395 COBRUN01 ENDED
------ JES2 JOB STATISTICS ------
25 JAN 2023 JOB EXECUTION DATE
16 CARDS READ
50 SYSOUT PRINT RECORDS
0 SYSOUT PUNCH RECORDS
3 SYSOUT SPOOL KBYTES
0.00 MINUTES EXECUTION TIME
1 //COBRUN01 JOB ,'RUN MMA001',CLASS=C,MSGCLASS=X,MSGLEVEL=(1,1), JOB00045
// REGION=4M,NOTIFY=&SYSUID
//*
//*!!! PLS DOUBLE CHECK AND REMARK THIS LINE TO SUBMIT
//*
IEFC653I SUBSTITUTION JCL - ,'RUN MMA001',CLASS=C,MSGCLASS=X,MSGLEVEL=(1,1),REGION=4M,NOTIFY=IBMUSER
2 //JOBLIB DD DISP=SHR,DSN=MTMAPRD.BATCH.LOAD
3 //PROCLIB JCLLIB ORDER=MTMAPRD.BATCH.PROC
//*
//*********************************************************************
//* RUN PROGRAM
//*********************************************************************
4 //RUN EXEC PGM=MMA001
5 //SYSOUT DD SYSOUT=*
//*********************************************************************
//* END
//*********************************************************************
如果还是没有,那就是系统 SMF 没有开始收集 SMF 30 类型的数据
当提交了 JCL,系统需要配置收集 SMF TYPE 30 数据,才会触发 IEFACTRT
下面是一个收集 TYPE 30 数据的 SMFPRM00 配置,第一行 如果是 NOACTIVE 那就是关闭
VIEW ADCD.Z110.PARMLIB(SMFPRM00) - 01.06 Columns 00001 00080
Command ===> Scroll ===> CSR
****** ********************************* Top of Data **********************************
000001 ACTIVE
000002 DSNAME(SYS1.MAN1,
000003 SYS1.MAN2,
000004 SYS1.MAN3)
000005 NOPROMPT
000006 REC(PERM)
000007 MAXDORM(3000)
000008 STATUS(010000)
000009 JWT(0400)
000010 SID(&SYSNAME(1:4))
000011 LISTDSN
000012 SYS(TYPE(14:19,30,62:69),NOEXITS,NOINTERVAL,NODETAIL)
000013 SUBSYS(JES2,EXITS(IEFACTRT))
****** ******************************** Bottom of Data ********************************
收集的数据会放在 SYS1.MAN*
下面步骤先建立一个独立的 ULOG01 卷 VOLUME 来存放
3390 为 ~900MB,可以用 3390-3 ~1.5GB
dasdinit -a ULOG01 3390 ULOG01
chmod 775 ULOG01
kazuya@p3240c:~/zos
$ pwd; ls -l
/home/kazuya/zos
total 20980692
-rwxrwxr-x 1 kazuya kazuya 3037 Jan 25 16:19 hercules.cnf
-rwxrwxr-x 1 kazuya kazuya 0 Jan 28 10:27 print00e.txt
-rwxrwxr-x 1 kazuya kazuya 0 Jan 28 10:27 punch00d.txt
-rwxrwxr-x 1 kazuya kazuya 529743872 Jan 28 00:12 SARES1
-rwxrwxr-x 1 kazuya kazuya 30785952 Jan 28 10:27 SYSCPK
-rwxrwxr-x 1 kazuya kazuya 949663232 Jan 28 10:30 UAPP01
-rwxrwxr-x 1 kazuya kazuya 949663232 Jan 25 17:40 ULOG01
-rwxrwxr-x 1 kazuya kazuya 949663232 Jan 28 10:30 USRG01
-rwxrwxr-x 1 kazuya kazuya 949663232 Jan 28 10:28 UTMP01
-rwxrwxr-x 1 kazuya kazuya 226562055 Jan 28 11:17 ZACIC1
-rwxrwxr-x 1 kazuya kazuya 169857341 Jan 28 10:27 ZADB81
-rwxrwxr-x 1 kazuya kazuya 308625683 Jan 28 10:27 ZADB82
-rwxrwxr-x 1 kazuya kazuya 1111670784 Jan 28 00:12 ZADB83
-rwxrwxr-x 1 kazuya kazuya 1107853312 Jan 28 00:12 ZADB84
-rwxrwxr-x 1 kazuya kazuya 201372254 Jan 28 11:17 ZADB91
-rwxrwxr-x 1 kazuya kazuya 835022655 Jan 28 11:17 ZADB92
-rwxrwxr-x 1 kazuya kazuya 565880883 Jan 28 10:27 ZADIS1
-rwxrwxr-x 1 kazuya kazuya 549073514 Jan 28 10:27 ZADIS2
-rwxrwxr-x 1 kazuya kazuya 288735232 Jan 28 00:12 ZADIS3
-rwxrwxr-x 1 kazuya kazuya 967193473 Jan 28 10:27 ZADIS4
-rwxrwxr-x 1 kazuya kazuya 690978816 Jan 28 00:12 ZADIS5
-rwxrwxr-x 1 kazuya kazuya 933675008 Jan 28 00:12 ZADIS6
-rwxrwxr-x 1 kazuya kazuya 241523207 Jan 28 10:27 ZAIMS1
-rwxrwxr-x 1 kazuya kazuya 878364290 Jan 28 10:27 ZAPRD1
-rwxrwxr-x 1 kazuya kazuya 716710023 Jan 28 11:17 ZAPRD2
-rwxrwxr-x 1 kazuya kazuya 968475738 Jan 28 10:27 ZAPRD3
-rwxrwxr-x 1 kazuya kazuya 34307 Jan 28 10:27 ZAPRD4
-rwxrwxr-x 1 kazuya kazuya 564283556 Jan 28 11:17 ZARES1
-rwxrwxr-x 1 kazuya kazuya 403813239 Jan 28 11:17 ZARES2
-rwxrwxr-x 1 kazuya kazuya 205374942 Jan 28 11:17 ZASYS1
-rwxrwxr-x 1 kazuya kazuya 682432766 Jan 28 11:17 ZAUSS1
-rwxrwxr-x 1 kazuya kazuya 1295883655 Jan 28 10:27 ZAWAS1
-rwxrwxr-x 1 kazuya kazuya 1520287744 Jan 28 00:12 ZAWAS2
-rwxrwxr-x 1 kazuya kazuya 1691123712 Jan 28 00:12 ZAWAS3
-rwxrwxr-x 1 kazuya kazuya 32984 Sep 10 09:23 ZOS.txt
-rwxrwxr-x 1 kazuya kazuya 29520 Sep 10 09:23 zzsacard.bin
在 hercules.cnf 加到 09AE (找一个没被使用的序号)
104 0A99 3390 /home/kazuya/zos/ZAWAS3
105 0A9A 3390 /home/kazuya/zos/USRG01
106 0A9B 3390 /home/kazuya/zos/SYSCPK
107 0A9C 3390 /home/kazuya/zos/UAPP01
108 0A9D 3390 /home/kazuya/zos/UTMP01
109 0A9E 3390 /home/kazuya/zos/ULOG01
110
111 # Communication Devices
112
113 #0E20.2 CTCI /dev/net/tun 1500 192.168.50.14 192.168.50.13 255.255.255.255
114 0E20.2 CTCI 192.168.200.1 192.168.200.2
115
在 hercules 动态连接新的卷
attach 0A9E 3390 /home/kazuya/zos/ULOG01
在 zos console 先把 0A9E 设离线
v 0A9E,offline
提交下面 JCL 去初始化新卷
//JC$INITD JOB ,'INIT DASD',NOTIFY=&SYSUID
//*
//STEP0001 EXEC PGM=ICKDSF,PARM='NOREPLYU'
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
INIT UNIT(0A9E) VFY(ULOG01) VOLID(ULOG01) PRG NVAL VTOC(1,0,75)
/*
//*
在 zos console 把 0A9E 设上线并查看状态
v 0A9E,online
d u,dasd,online,,1024
使用下面 JCL 创建一个 GDG 保留 5 个版本,用来存放 SYS1.MAN1/2/3 的 DUMP
//JC$CRTGD JOB ,'CREATE GDG',CLASS=A,MSGCLASS=X,MSGLEVEL=(1,1),
// REGION=4M,NOTIFY=&SYSUID
//*
// !!! PLS DOUBLE CHECK AND REMARK THIS LINE TO SUBMIT
//*
//DEFINE EXEC PGM=IDCAMS
//MODEL DD DSN=SYS1.MANG.DATA,DISP=(NEW,KEEP),
// UNIT=3390,VOL=SER=ULOG01,SPACE=(CYL,0),
// DCB=(RECFM=VBS,LRECL=32756,BLKSIZE=32760)
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
DELETE SYS1.MANG.DATA GENERATIONDATAGROUP
SET MAXCC=0
DEFINE GENERATIONDATAGROUP( -
NAME(SYS1.MANG.DATA) -
LIMIT(5) -
SCRATCH)
IF LASTCC = 0 THEN
LISTCAT ALL ENTRIES(SYS1.MANG.DATA)
/*
//*
使用下面的 JCL 来 DUMP 和清理 SYS1.MAN1/2/3,下面 MAN1/2/3 要修改相对应的
//JC$SMFDM JOB ,'DUMP SMF',CLASS=A,MSGCLASS=X,MSGLEVEL=(1,1),
// REGION=4M,NOTIFY=&SYSUID
//*
//*!!! PLS DOUBLE CHECK AND REMARK THIS LINE TO SUBMIT
//*
//*-------------------------------------------------------------------*
//* SMF DATASET DUMP/CLEAR PROCEDURE *
//*-------------------------------------------------------------------*
//DUMP EXEC PGM=IFASMFDP,REGION=4096K
//SYSPRINT DD SYSOUT=*
//DUMPIN DD DSN=SYS1.MAN3,DISP=SHR
//DUMPOUT DD DSN=SYS1.MANG.DATA(+1),DISP=(NEW,CATLG),
// UNIT=3390,VOL=SER=ULOG01,SPACE=(CYL,(5,5),RLSE)
//SYSIN DD *
INDD(DUMPIN,OPTIONS(DUMP))
/*
//*-------------------------------------------------------------------*
//CLEAR EXEC PGM=IFASMFDP,REGION=4096K,COND=(0,NE,DUMP)
//SYSPRINT DD SYSOUT=*
//DUMPIN DD DSN=SYS1.MAN3,DISP=SHR
//DUMPOUT DD DUMMY
//SYSIN DD *
INDD(DUMPIN,OPTIONS(CLEAR))
/*
//*-------------------------------------------------------------------*
使用 I SMF 可以切换 SYS1.MAN*,例如下面切换到 SYS1.MAN2
那 SYS1.MAN1/3 就可以使用上面 JCL 去 DUMP 和 CLEAR
NC0000000 ADCD 23028 11:31:27.76 IBMUSER 00000290 I SMF
N 8000000 ADCD 23028 11:31:27.96 00000090 *IEE362A SMF ENTER DUMP FOR SYS1.MAN1 ON ZASYS1
N 4000000 ADCD 23028 11:31:27.96 00000090 IEE360I SMF NOW RECORDING ON SYS1.MAN2 ON ZASYS1 TIME=11.31.27
例如
SDSF OUTPUT DISPLAY JC$SMFDM JOB00047 DSID 2 LINE 0 COLUMNS 02- 161
COMMAND INPUT ===> SCROLL ===> CSR
********************************* TOP OF DATA *************************************************************************
J E S 2 J O B L O G -- S Y S T E M A D C D -- N O D E N 1
11.37.33 JOB00047 ---- SATURDAY, 28 JAN 2023 ----
11.37.33 JOB00047 IRR010I USERID IBMUSER IS ASSIGNED TO THIS JOB.
11.37.33 JOB00047 ICH70001I IBMUSER LAST ACCESS AT 11:37:07 ON SATURDAY, JANUARY 28, 2023
11.37.33 JOB00047 $HASP373 JC$SMFDM STARTED - INIT 1 - CLASS A - SYS ADCD
11.37.34 JOB00047 IEF403I JC$SMFDM - STARTED - TIME=11.37.34
11.37.35 JOB00047 - --TIMINGS (MINS.)-- -----PAGING COUNTS----
11.37.35 JOB00047 -STEPNAME PROCSTEP RC EXCP CONN TCB SRB CLOCK SERV WORKLOAD PAGE SWAP VIO SWAPS
11.37.35 JOB00047 -DUMP 00 3308 0 .01 .00 .0 3322 BATCH 0 0 0 0
11.37.37 JOB00047 -CLEAR 00 7252 0 .01 .00 .0 4961 BATCH 0 0 0 0
11.37.37 JOB00047 IEF404I JC$SMFDM - ENDED - TIME=11.37.37
11.37.37 JOB00047 -JC$SMFDM ENDED. NAME-DUMP SMF TOTAL TCB CPU TIME= .02 TOTAL ELAPSED TIME= .0
11.37.37 JOB00047 $HASP395 JC$SMFDM ENDED
DUMP 出来的数据总结
IFA010I SMF DUMP PARAMETERS
IFA010I END(2400) -- DEFAULT
IFA010I START(0000) -- DEFAULT
IFA010I DATE(1900000,2099366) -- DEFAULT
IFA010I OUTDD(DUMPOUT,TYPE(0:255)) -- DEFAULT
IFA010I INDD(DUMPIN,OPTIONS(DUMP)) -- SYSIN
IFA020I DUMPOUT -- SYS1.MANG.DATA.G0008V00
IFA020I DUMPIN -- SYS1.MAN1
SUMMARY ACTIVITY REPORT
START DATE-TIME 01/25/2023-17:39:45 END DATE-TIME 01/28/2023-11:31:27
RECORD RECORDS PERCENT AVG. RECORD MIN. RECORD MAX. RECORD RECORDS
TYPE READ OF TOTAL LENGTH LENGTH LENGTH WRITTEN
2 0 1
3 0 1
14 4,845 29.67 % 362.93 344 824 4,845
15 794 4.86 % 344.31 344 380 794
17 105 .64 % 100.00 100 100 105
19 837 5.13 % 132.00 132 132 837
30 8,308 50.88 % 939.54 400 7,406 8,308
62 470 2.88 % 188.00 188 188 470
64 629 3.85 % 462.00 462 462 629
65 339 2.08 % 355.92 303 382 339
66 1 .01 % 304.00 304 304 1
TOTAL 16,328 100 % 640.52 100 7,406 16,330
NUMBER OF RECORDS IN ERROR 0
CLEAR 的结果
IFA010I SMF DUMP PARAMETERS
IFA010I END(2400) -- DEFAULT
IFA010I START(0000) -- DEFAULT
IFA010I DATE(1900000,2099366) -- DEFAULT
IFA010I OUTDD(DUMPOUT,TYPE(0:255)) -- DEFAULT
IFA010I INDD(DUMPIN,OPTIONS(CLEAR)) -- SYSIN
IFA020I DUMPOUT -- NULLFILE
IFA020I DUMPIN -- SYS1.MAN1
IFA018I SMF DATA SET DUMPIN HAS BEEN CLEARED.
SYS1.MAN* 内容如下,SMFEOFMARK 是没使用的