SYSVIEW creates SMF record type 255 subtype 48 to output the MQ Application Request counts. The below COBOL program was developed for MQ 9.2.0
IDENTIFICATION DIVISION.
PROGRAM-ID. MQSYSVW.
AUTHOR.
DATE-WRITTEN.
DATE-COMPILED.
ENVIRONMENT DIVISION.
INPUT-OUTPUT SECTION.
FILE-CONTROL.
* SMF255 CONTAINS THE DATA AND THIS IS A SPANNED RECORD.
* OPEN MODE IS INPUT.
SELECT SMF255 ASSIGN TO INFILE
ORGANIZATION IS SEQUENTIAL
ACCESS MODE IS SEQUENTIAL
FILE STATUS IS WS-STAT.
* SYSVWRPT1 CONTAINS THE REPORT CREATED FROM SMF255
SELECT SYSVWRPT1 ASSIGN TO OUTFIL1
ORGANIZATION IS SEQUENTIAL.
SELECT SYSVWRPT2 ASSIGN TO OUTFIL2
ORGANIZATION IS SEQUENTIAL.
DATA DIVISION.
FILE SECTION.
FD SMF255
RECORDING MODE IS S
BLOCK CONTAINS 27998 CHARACTERS
RECORD IS VARYING IN SIZE FROM
18 TO 32756 CHARACTERS DEPENDING ON WS-LEN.
* S INDICATES THAT THIS IS A SPANNED RECORD. THIS CAN BE
* IDENTIFIED FROM THE BLOCK SIZE AND RECORD SIZE.
01 SMFDATA-MIN-RECORD PIC X(18).
01 SMFDATA-MAX-RECORD PIC X(32756).
FD SYSVWRPT1.
01 SYSVWRPT1-REC PIC X(272).
FD SYSVWRPT2.
01 SYSVWRPT2-REC PIC X(299).
WORKING-STORAGE SECTION.
01 DATE-TIME-COMPONENTS BINARY.
05 YEAR PIC 9(9).
05 MONTH PIC 9(9).
05 DAYS PIC 9(9).
05 HOURS PIC 9(9).
05 MINUTES PIC 9(9).
05 SECONDS PIC 9(9).
05 MILLSEC PIC 9(9).
* Double precision needed for the seconds results
01 START-SECS COMP-2.
01 NEW-TIME COMP-2.
01 FC.
02 Condition-Token-Value.
88 CEE000 VALUE X'0000000000000000'.
03 Case-1-Condition-ID.
04 Severity PIC S9(4) BINARY.
04 Msg-No PIC S9(4) BINARY.
03 Case-2-Condition-ID
REDEFINES Case-1-Condition-ID.
04 Class-Code PIC S9(4) BINARY.
04 Cause-Code PIC S9(4) BINARY.
03 Case-Sev-Ctl PIC X.
03 Facility-ID PIC XXX.
02 I-S-Info PIC S9(9) BINARY.
01 PICSTR.
02 Vstring-length PIC S9(4) BINARY.
02 Vstring-text.
03 Vstring-char PIC X
OCCURS 0 TO 256 TIMES
DEPENDING ON Vstring-length
of PICSTR.
01 WS-TIMESTAMP.
02 Vstring-length PIC S9(4) BINARY.
02 Vstring-text.
03 Vstring-char PIC X
OCCURS 0 TO 256 TIMES
DEPENDING ON Vstring-length
of WS-TIMESTAMP.
01 NEW-TIMESTAMP PIC X(80).
01 OUTFIL1-REC.
05 O1-FMTD-DATE PIC X(19).
05 FILLER PIC X(01) VALUE ','.
05 O1-QUEUE-INFO PIC X(112).
05 O1-COMM-DATA PIC X(140).
01 OUTFIL2-REC.
05 O2-FMTD-DATE PIC X(19).
05 FILLER PIC X(01) VALUE ','.
05 O2-JOB-INFO PIC X(027).
05 O2-QUEUE-INFO PIC X(112).
05 O2-COMM-DATA PIC X(140).
01 OUT-JOB-INFO.
05 OUT-Jobname PIC X(08).
05 O2-FIL1 PIC X(01) VALUE ','.
05 OUT-ConnType PIC X(08).
05 O2-FIL2 PIC X(01) VALUE ','.
05 OUT-Qualifier PIC X(08).
05 O2-FIL3 PIC X(01) VALUE ','.
01 OUT-QUEUE-INFO.
05 OUT-QMGR PIC X(04).
05 O1-FIL1 PIC X(01) VALUE ','.
05 OUT-qname PIC X(48).
05 O1-FIL2 PIC X(01) VALUE ','.
05 OUT-Type PIC X(08).
05 O1-FIL3 PIC X(01) VALUE ','.
05 OUT-ResName PIC X(48).
05 O1-FIL4 PIC X(01) VALUE ','.
01 OUT-COMMON-DATA.
05 OUT-OPENN PIC Z(8)9.
05 C-FIL1 PIC X(01) VALUE ','.
05 OUT-CLOSEN PIC Z(8)9.
05 C-FIL2 PIC X(01) VALUE ','.
05 OUT-GETN PIC Z(8)9.
05 C-FIL3 PIC X(01) VALUE ','.
05 OUT-PUTN PIC Z(8)9.
05 C-FIL4 PIC X(01) VALUE ','.
05 OUT-PUT1N PIC Z(8)9.
05 C-FIL5 PIC X(01) VALUE ','.
05 OUT-INQN PIC Z(8)9.
05 C-FIL6 PIC X(01) VALUE ','.
05 OUT-SETN PIC Z(8)9.
05 C-FIL7 PIC X(01) VALUE ','.
05 OUT-F-OPENN PIC Z(8)9.
05 C-FIL8 PIC X(01) VALUE ','.
05 OUT-F-CLOSEN PIC Z(8)9.
05 C-FIL9 PIC X(01) VALUE ','.
05 OUT-F-GETN PIC Z(8)9.
05 C-FIL10 PIC X(01) VALUE ','.
05 OUT-F-PUTN PIC Z(8)9.
05 C-FIL11 PIC X(01) VALUE ','.
05 OUT-F-PUT1N PIC Z(8)9.
05 C-FIL12 PIC X(01) VALUE ','.
05 OUT-F-INQN PIC Z(8)9.
05 C-FIL13 PIC X(01) VALUE ','.
05 OUT-F-SETN PIC Z(8)9.
01 OUTFIL1-HDR.
05 PIC X(19) VALUE 'TIME_STAMP'.
05 PIC X(01) VALUE ','.
05 PIC X(04) VALUE 'QMGR'.
05 PIC X(01) VALUE ','.
05 PIC X(48) VALUE 'QNAME'.
05 PIC X(01) VALUE ','.
05 PIC X(08) VALUE 'QType'.
05 PIC X(01) VALUE ','.
05 PIC X(48) VALUE 'QResName'.
05 PIC X(01) VALUE ','.
05 PIC X(09) VALUE 'OPENN'.
05 PIC X(01) VALUE ','.
05 PIC X(09) VALUE 'CLOSEN'.
05 PIC X(01) VALUE ','.
05 PIC X(09) VALUE 'GETN'.
05 PIC X(01) VALUE ','.
05 PIC X(09) VALUE 'PUTN'.
05 PIC X(01) VALUE ','.
05 PIC X(09) VALUE 'PUT1N'.
05 PIC X(01) VALUE ','.
05 PIC X(09) VALUE 'INQN'.
05 PIC X(01) VALUE ','.
05 PIC X(09) VALUE 'SETN'.
05 PIC X(01) VALUE ','.
05 PIC X(09) VALUE 'F_OPENN'.
05 PIC X(01) VALUE ','.
05 PIC X(09) VALUE 'F_CLOSEN'.
05 PIC X(01) VALUE ','.
05 PIC X(09) VALUE 'F_GETN'.
05 PIC X(01) VALUE ','.
05 PIC X(09) VALUE 'F_PUTN'.
05 PIC X(01) VALUE ','.
05 PIC X(09) VALUE 'F_PUT1N'.
05 PIC X(01) VALUE ','.
05 PIC X(09) VALUE 'F_INQN'.
05 PIC X(01) VALUE ','.
05 PIC X(09) VALUE 'F_SETN'.
01 OUTFIL2-HDR.
05 PIC X(19) VALUE 'TIME_STAMP'.
05 PIC X(01) VALUE ','.
05 PIC X(08) VALUE 'JOB NAME'.
05 PIC X(01) VALUE ','.
05 PIC X(08) VALUE 'CONN TYP'.
05 PIC X(01) VALUE ','.
05 PIC X(08) VALUE 'Qual '.
05 PIC X(01) VALUE ','.
05 PIC X(04) VALUE 'QMGR'.
05 PIC X(01) VALUE ','.
05 PIC X(48) VALUE 'QNAME'.
05 PIC X(01) VALUE ','.
05 PIC X(08) VALUE 'QType'.
05 PIC X(01) VALUE ','.
05 PIC X(48) VALUE 'QResName'.
05 PIC X(01) VALUE ','.
05 PIC X(09) VALUE 'OPENN'.
05 PIC X(01) VALUE ','.
05 PIC X(09) VALUE 'CLOSEN'.
05 PIC X(01) VALUE ','.
05 PIC X(09) VALUE 'GETN'.
05 PIC X(01) VALUE ','.
05 PIC X(09) VALUE 'PUTN'.
05 PIC X(01) VALUE ','.
05 PIC X(09) VALUE 'PUT1N'.
05 PIC X(01) VALUE ','.
05 PIC X(09) VALUE 'INQN'.
05 PIC X(01) VALUE ','.
05 PIC X(09) VALUE 'SETN'.
05 PIC X(01) VALUE ','.
05 PIC X(09) VALUE 'F_OPENN'.
05 PIC X(01) VALUE ','.
05 PIC X(09) VALUE 'F_CLOSEN'.
05 PIC X(01) VALUE ','.
05 PIC X(09) VALUE 'F_GETN'.
05 PIC X(01) VALUE ','.
05 PIC X(09) VALUE 'F_PUTN'.
05 PIC X(01) VALUE ','.
05 PIC X(09) VALUE 'F_PUT1N'.
05 PIC X(01) VALUE ','.
05 PIC X(09) VALUE 'F_INQN'.
05 PIC X(01) VALUE ','.
05 PIC X(09) VALUE 'F_SETN'.
01 WS-SYSVW-REC.
05 MQRR-SMFHDR.
10 FILLER PIC X(01).
10 MQRR-RTY PIC X(01).
10 FILLER PIC X(16).
10 MQRR-STY PIC S9(04) COMP.
05 MQRR-PRDHDR PIC X(10).
* Queue manager
05 MQRR-OBJ-QMGR PIC X(04).
* Object name
05 MQRR-OBJ-Name PIC X(48).
* Object type
05 MQRR-OBJ-Type PIC X(08).
* Object subtype
05 MQRR-OBJ-Subtype PIC X(08).
* Resolved name
05 MQRR-OBJ-ResName PIC X(48).
* Resolved Qmgr name
05 MQRR-OBJ-ResQMGR PIC X(48).
* Reserved
05 FILLER PIC X(06).
* Offset to first job entry
05 MQRR-OBJ-JOB-Off PIC S9(09) COMP-5.
* Length of job entry
05 MQRR-OBJ-JOB-Len PIC S9(04) COMP.
* Count of job entries
05 MQRR-OBJ-JOB-Cnt PIC S9(04) COMP.
* STCK start of interval
05 MQRR-OBJ-Start PIC X(08).
* STCK end of interval
05 MQRR-OBJ-End PIC X(08).
* Interval time (End-Start)
05 MQRR-OBJ-Interval PIC X(08).
* Section: OBJ - Request Count Information
* ..Get count with browse
05 MQRR-OBJ-GetBrowse PIC S9(09) COMP.
* ..Open count for object
05 MQRR-OBJ-Open PIC S9(09) COMP.
* ..Close count for object
05 MQRR-OBJ-Close PIC S9(09) COMP.
* ..Get count for queue
05 MQRR-OBJ-Get PIC S9(09) COMP.
* ..Put count for queue
05 MQRR-OBJ-Put PIC S9(09) COMP.
* ..Put1 count for queue
05 MQRR-OBJ-Put1 PIC S9(09) COMP.
* ..Inquire count for object
05 MQRR-OBJ-Inq PIC S9(09) COMP.
* ..InquireL count for object
05 MQRR-OBJ-InqL PIC S9(09) COMP.
* ..Set count for object
05 MQRR-OBJ-Set PIC S9(09) COMP.
* Section: OBJ - Request Failure Count Information
05 FILLER PIC X(04).
* ..Open failed counts
05 MQRR-OBJ-F-Open PIC S9(09) COMP.
* ..Close failed counts
05 MQRR-OBJ-F-Close PIC S9(09) COMP.
* ..Get failed counts
05 MQRR-OBJ-F-Get PIC S9(09) COMP.
* ..Put failed counts
05 MQRR-OBJ-F-Put PIC S9(09) COMP.
* ..Put1 failed counts
05 MQRR-OBJ-F-Put1 PIC S9(09) COMP.
* ..Inquire failed counts
05 MQRR-OBJ-F-Inq PIC S9(09) COMP.
* ..InquireL failed counts
05 MQRR-OBJ-F-InqL PIC S9(09) COMP.
* ..Set failed counts
05 MQRR-OBJ-F-Set PIC S9(09) COMP.
* Section: OBJ - Message Count Information
05 FILLER PIC X(24).
* Section: OBJ - Time Information
05 FILLER PIC X(16).
* ..All reqs cpu time total
05 MQRR-OBJ-CPUTimeTotal COMP-2.
05 FILLER PIC X(40).
05 FILLER PIC X(32364).
01 WS-PTR-NUM PIC S9(09) COMP-5.
01 FILLER REDEFINES WS-PTR-NUM.
05 WS-PTR USAGE POINTER.
01 WS-HEAD-NUM PIC S9(09) COMP-5.
01 FILLER REDEFINES WS-HEAD-NUM.
05 WS-HEAD-PTR USAGE POINTER.
01 WS-FILE-CNT.
05 WS-CNT-READ PIC S9(09) COMP VALUE ZEROES.
05 WS-CNT-WRTN PIC S9(09) COMP VALUE ZEROES.
01 WS-EXT-EOF-FLG PIC X(1) VALUE 'N'.
88 WS-EXT-EOF VALUE 'Y'.
01 WS-TEMP.
05 WS-I PIC S9(09) COMP.
05 WS-BIN-DATA.
10 FILLER PIC X(01) VALUE X'00'.
10 WS-MQRR-RTY-2 PIC X(01).
05 WS-MQRR-RTY REDEFINES WS-BIN-DATA PIC S9(04) COMP.
05 WS-LEN PIC 9(9) COMP.
05 WS-STAT PIC 9(2).
05 WS-SECONDS PIC S9(9) COMP.
01 WS-DATE-FIELDS.
03 WS-FMTD-DATE PIC X(19).
03 WS-CCYYMMDD PIC 9(008).
03 WS-CCYYMMDD-X REDEFINES WS-CCYYMMDD
PIC X(008).
03 FILLER REDEFINES WS-CCYYMMDD.
05 WS-DT-CCYY PIC 9(004).
05 WS-DT-MM PIC 9(002).
05 WS-DT-DD PIC 9(002).
03 WS-HHMMSS PIC 9(006).
03 FILLER REDEFINES WS-HHMMSS.
05 WS-TIME-HH PIC 9(002).
05 WS-TIME-MM PIC 9(002).
05 WS-TIME-SS PIC 9(002).
03 WS-MSECS-PACKED PIC S9(015) PACKED-DECIMAL.
03 WS-MSECS-PACKED-X REDEFINES WS-MSECS-PACKED
PIC X(008).
03 WS-DWORD PIC S9(015) PACKED-DECIMAL.
03 WS-DWORD-X REDEFINES WS-DWORD
PIC X(008).
03 WS-TOD-DWORD PIC S9(018) BINARY.
03 WS-TOD-DWORD-X REDEFINES WS-TOD-DWORD
PIC X(008).
03 WS-BINARY-DWORD PIC S9(018) BINARY.
03 WS-BINARY-DWORD-X REDEFINES WS-BINARY-DWORD
PIC X(008).
03 WS-INTEGER-OF-DATE PIC S9(009) PACKED-DECIMAL.
03 WS-SAVE-MSECS PIC S9(015) PACKED-DECIMAL.
03 WS-SAVE-MSECS-X REDEFINES WS-SAVE-MSECS
PIC X(008).
03 WS-DBLWORD PIC S9(015) PACKED-DECIMAL.
03 WS-DBLWORD-X REDEFINES WS-DBLWORD
PIC X(008).
03 WS-CALC-SECS PIC S9(015) PACKED-DECIMAL.
03 WS-CALC-SECS-V999 REDEFINES WS-CALC-SECS
PIC S9(012)V999 PACKED-DECIMAL.
03 WS-CALC-SECS-X REDEFINES WS-CALC-SECS
PIC X(008).
01 WS-TS PIC X(26).
01 WS-BLSUXTOD PIC X(08) VALUE 'BLSUXTOD'.
01 WS-CURR-DATE.
05 WS-CURR-CCYY PIC 9(04).
05 WS-CURR-MM PIC 9(02).
05 WS-CURR-DD PIC 9(02).
05 WS-CURR-HH PIC 9(02).
05 WS-CURR-MM PIC 9(02).
05 WS-CURR-SS PIC 9(02).
05 WS-CURR-HS PIC 9(02).
05 WS-CURR-OFFS-SIGN PIC X(01).
05 WS-CURR-OFFS-HH PIC 9(02).
05 WS-CURR-OFFS-MM PIC 9(02).
LINKAGE SECTION.
* Section: JOB - Job Information
01 MQRR-JOB.
* ..Jobname
05 MQRR-JOB-Jobname PIC X(08).
* ..Connection type
05 MQRR-JOB-ConnType PIC X(08).
* ..Qualifier
05 MQRR-JOB-Qualifier PIC X(08).
* Section: JOB - Request Count Information
* ..Get count with browse
05 MQRR-JOB-GetBrowse PIC S9(09) COMP.
* ..Open count for object
05 MQRR-JOB-Open PIC S9(09) COMP.
* ..Close count for object
05 MQRR-JOB-Close PIC S9(09) COMP.
* ..Get count for queue
05 MQRR-JOB-Get PIC S9(09) COMP.
* ..Put count for queue
05 MQRR-JOB-Put PIC S9(09) COMP.
* ..Put1 count for queue
05 MQRR-JOB-Put1 PIC S9(09) COMP.
* ..Inquire count for object
05 MQRR-JOB-Inq PIC S9(09) COMP.
* ..InquireL count for object
05 MQRR-JOB-InqL PIC S9(09) COMP.
* ..Set count for object
05 MQRR-JOB-Set PIC S9(09) COMP.
* Section: JOB - Request Failure Count Information
05 FILLER PIC X(04).
* ..Open failed counts
05 MQRR-JOB-F-Open PIC S9(09) COMP.
* ..Close failed counts
05 MQRR-JOB-F-Close PIC S9(09) COMP.
* ..Get failed counts
05 MQRR-JOB-F-Get PIC S9(09) COMP.
* ..Put failed counts
05 MQRR-JOB-F-Put PIC S9(09) COMP.
* ..Put1 failed counts
05 MQRR-JOB-F-Put1 PIC S9(09) COMP.
* ..Inquire failed counts
05 MQRR-JOB-F-Inq PIC S9(09) COMP.
* ..InquireL failed counts
05 MQRR-JOB-F-InqL PIC S9(09) COMP.
* ..Set failed counts
05 MQRR-JOB-F-Set PIC S9(09) COMP.
* Section: JOB - Message Count Information
05 FILLER PIC X(24).
* Section: JOB - Time Information
05 FILLER PIC X(16).
05 MQRR-JOB-CPUTimeTotal COMP-2.
05 FILLER PIC X(40).
******************************************************************
PROCEDURE DIVISION.
******************************************************************
000-MAIN-PARA.
PERFORM 100-INITIALIZE-PARA
THRU 100-INITIALIZE-PARA-X.
PERFORM 200-PROCESS-PARA
THRU 200-PROCESS-PARA-X
UNTIL WS-EXT-EOF.
PERFORM 900-FINALIZE-PARA
THRU 900-FINALIZE-PARA-X.
STOP RUN.
100-INITIALIZE-PARA.
OPEN INPUT SMF255.
OPEN OUTPUT SYSVWRPT1
SYSVWRPT2.
WRITE SYSVWRPT1-REC FROM OUTFIL1-HDR.
ADD 1 TO WS-CNT-WRTN.
WRITE SYSVWRPT2-REC FROM OUTFIL2-HDR.
ADD 1 TO WS-CNT-WRTN.
MOVE FUNCTION CURRENT-DATE TO WS-CURR-DATE
COMPUTE WS-SECONDS = (WS-CURR-OFFS-HH * 3600) +
(WS-CURR-OFFS-MM * 60)
IF WS-CURR-OFFS-SIGN = '-'
COMPUTE WS-SECONDS = WS-SECONDS * -1
END-IF.
100-INITIALIZE-PARA-X.
EXIT.
200-PROCESS-PARA.
READ SMF255
AT END SET WS-EXT-EOF TO TRUE.
IF NOT WS-EXT-EOF
MOVE SMFDATA-MAX-RECORD (1:WS-LEN)
TO WS-SYSVW-REC (1:WS-LEN)
MOVE MQRR-RTY TO WS-MQRR-RTY-2
IF WS-MQRR-RTY = 255 AND
MQRR-STY = 48 AND
MQRR-OBJ-Name (1:4) NOT = 'AMQ.'
ADD 1 TO WS-CNT-READ
PERFORM 240-CONVERT-STCK
PERFORM 210-MOVE-OBJ-DATA
SET WS-HEAD-PTR TO ADDRESS OF WS-SYSVW-REC
IF MQRR-OBJ-JOB-Cnt > 0
COMPUTE WS-PTR-NUM = WS-HEAD-NUM - 4 +
MQRR-OBJ-JOB-Off
PERFORM VARYING WS-I
FROM 1 BY 1 UNTIL WS-I > MQRR-OBJ-JOB-Cnt
SET ADDRESS OF MQRR-JOB TO WS-PTR
PERFORM 220-MOVE-JOB-DATA
COMPUTE WS-PTR-NUM = WS-PTR-NUM +
MQRR-OBJ-JOB-Len
END-PERFORM
END-IF
END-IF
END-IF.
200-PROCESS-PARA-X.
EXIT.
210-MOVE-OBJ-DATA.
MOVE MQRR-OBJ-QMGR TO OUT-QMGR
MOVE MQRR-OBJ-Name TO OUT-qname
MOVE MQRR-OBJ-Type TO OUT-Type
MOVE MQRR-OBJ-ResName TO OUT-ResName
MOVE MQRR-OBJ-Open TO OUT-OPENN
MOVE MQRR-OBJ-Close TO OUT-CLOSEN
COMPUTE OUT-GETN = MQRR-OBJ-GetBrowse +
MQRR-OBJ-Get
MOVE MQRR-OBJ-Put TO OUT-PUTN
MOVE MQRR-OBJ-Put1 TO OUT-PUT1N
MOVE MQRR-OBJ-Inq TO OUT-INQN
MOVE MQRR-OBJ-Set TO OUT-SETN
MOVE MQRR-OBJ-F-Open TO OUT-F-OPENN
MOVE MQRR-OBJ-F-Close TO OUT-F-CLOSEN
MOVE MQRR-OBJ-F-Get TO OUT-F-GETN
MOVE MQRR-OBJ-F-Put TO OUT-F-PUTN
MOVE MQRR-OBJ-F-Put1 TO OUT-F-PUT1N
MOVE MQRR-OBJ-F-Inq TO OUT-F-INQN
MOVE MQRR-OBJ-F-Set TO OUT-F-SETN
MOVE OUT-QUEUE-INFO TO O1-QUEUE-INFO
MOVE OUT-COMMON-DATA TO O1-COMM-DATA
MOVE WS-FMTD-DATE TO O1-FMTD-DATE
WRITE SYSVWRPT1-REC FROM OUTFIL1-REC
ADD +1 TO WS-CNT-WRTN.
220-MOVE-JOB-DATA.
MOVE MQRR-JOB-Jobname TO OUT-Jobname
MOVE MQRR-JOB-ConnType TO OUT-ConnType
MOVE MQRR-JOB-Qualifier TO OUT-Qualifier
MOVE MQRR-JOB-Open TO OUT-OPENN
MOVE MQRR-JOB-Close TO OUT-CLOSEN
COMPUTE OUT-GETN = MQRR-JOB-GetBrowse +
MQRR-JOB-Get
MOVE MQRR-JOB-Put TO OUT-PUTN
MOVE MQRR-JOB-Put1 TO OUT-PUT1N
MOVE MQRR-JOB-Inq TO OUT-INQN
MOVE MQRR-JOB-Set TO OUT-SETN
MOVE MQRR-JOB-F-Open TO OUT-F-OPENN
MOVE MQRR-JOB-F-Close TO OUT-F-CLOSEN
MOVE MQRR-JOB-F-Get TO OUT-F-GETN
MOVE MQRR-JOB-F-Put TO OUT-F-PUTN
MOVE MQRR-JOB-F-Put1 TO OUT-F-PUT1N
MOVE MQRR-JOB-F-Inq TO OUT-F-INQN
MOVE MQRR-JOB-F-Set TO OUT-F-SETN
MOVE OUT-JOB-INFO TO O2-JOB-INFO
MOVE OUT-QUEUE-INFO TO O2-QUEUE-INFO
MOVE OUT-COMMON-DATA TO O2-COMM-DATA
MOVE WS-FMTD-DATE TO O2-FMTD-DATE
WRITE SYSVWRPT2-REC FROM OUTFIL2-REC
ADD +1 TO WS-CNT-WRTN.
240-CONVERT-STCK.
MOVE SPACES TO WS-TS.
CALL WS-BLSUXTOD USING MQRR-OBJ-Start WS-TS.
MOVE 19 TO Vstring-length of WS-TIMESTAMP.
MOVE WS-TS (1:19) TO Vstring-text of WS-TIMESTAMP.
MOVE 19 TO Vstring-length of PICSTR.
MOVE "MM/DD/YYYY HH:MI:SS" TO Vstring-text of PICSTR.
CALL "CEESECS" USING WS-TIMESTAMP, PICSTR, START-SECS, FC.
IF CEE000 of FC THEN
COMPUTE START-SECS = START-SECS
+ WS-SECONDS
CALL "CEESECI" USING START-SECS, YEAR, MONTH, DAYS,
HOURS, MINUTES, SECONDS, MILLSEC, FC
IF CEE000 of FC THEN
MOVE YEAR TO WS-DT-CCYY
MOVE MONTH TO WS-DT-MM
MOVE DAYS TO WS-DT-DD
MOVE HOURS TO WS-TIME-HH
MOVE MINUTES TO WS-TIME-MM
MOVE SECONDS TO WS-TIME-SS
STRING WS-CCYYMMDD-X (1:4) '/'
WS-CCYYMMDD-X (5:2) '/'
WS-CCYYMMDD-X (7:2) ' '
WS-HHMMSS (1:2) ':'
WS-HHMMSS (3:2) ':'
WS-HHMMSS (5:2)
DELIMITED BY SIZE INTO WS-FMTD-DATE
END-STRING
ELSE
DISPLAY "Error " Msg-No of FC
" converting seconds to components."
END-IF
ELSE
DISPLAY "Error " Msg-No of FC
" converting timestamp to seconds."
END-IF.
900-FINALIZE-PARA.
CLOSE SYSVWRPT1
SYSVWRPT2.
CLOSE SMF255.
DISPLAY '*-----------------------------------*'.
DISPLAY 'TOTAL RECORDS READ : ' WS-CNT-READ.
DISPLAY 'TOTAL RECORDS WRITTEN : ' WS-CNT-WRTN.
DISPLAY '*-----------------------------------*'.
900-FINALIZE-PARA-X.
EXIT.
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.