Skip to content

Commit 1f1f9a9

Browse files
committed
Update for MQ V9 pageset statistics
Better handling of CR/LF in Unix makefiles
1 parent 8acd530 commit 1f1f9a9

File tree

15 files changed

+1472
-1356
lines changed

15 files changed

+1472
-1356
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
/src/*.exe
44
/src/*.obj
55
mqsmfstruc.h
6+
src/convH
7+
src/mqsmfcsv
68
csq*
79
/src/t2
810
/src/t3

README.md

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,22 @@ to simplify import of statistics to spreadsheets and databases.
55
Description
66
===========
77
On z/OS, IBM MQ generates SMF accounting and statistics records to track
8-
the usage of the product. These are often used for capacity planning,
8+
the usage of the product. These are often used for capacity planning,
99
for performance tuning, or for chargeback.
1010

11-
This package has been created to simplify the task of doing your
12-
own analysis of MQ SMF records from a z/OS system, by making it
11+
This package has been created to simplify the task of doing your
12+
own analysis of MQ SMF records from a z/OS system, by making it
1313
easy to import formatted records into a database or spreadsheet.
1414

15-
The program takes the data from a z/OS dataset, downloaded to a
16-
local file, and then runs on a Windows or Unix system, creating
17-
standard CSV (comma-separated value) output files.
15+
The program takes the data from a z/OS dataset, downloaded to a
16+
local file, and then runs on a Windows or Unix system, creating
17+
standard CSV (comma-separated value) output files.
1818

1919
Unlike packages such as SupportPac MP1B, there is no interpretation
2020
at all of the SMF data. That can be done by your own spreadsheet or
2121
database programs and macros.
2222

23-
This makes the code for the program very easy to understand; all the
23+
This makes the code for the program very easy to understand; all the
2424
structures in the SMF records are printed directly.
2525

2626
See mqsmfcsv.doc for more information on using or building this code, and
@@ -30,11 +30,13 @@ thoughts on possible enhancements to the code or this repository.
3030
History
3131
=======
3232
March 2016 - Initial release
33-
33+
April 2016 - Update to support MQ V9 pageset statistics
34+
Improved formatting for import to Access
35+
Fixed some mis-labelled columns
3436

3537
Pull requests
3638
=============
37-
Contributions to this package can be accepted under the terms of the
39+
Contributions to this package can be accepted under the terms of the
3840
IBM Contributor License Agreement, found in the file CLA.md of this repository.
3941

4042
When submitting a pull request, you must include a statement stating you accept the terms in CLA.md.

bin/aix/convH

100644100755
0 Bytes
Binary file not shown.

bin/aix/mqsmfcsv

100644100755
13.3 KB
Binary file not shown.

bin/linux/convH

100644100755
-2.81 KB
Binary file not shown.

bin/linux/mqsmfcsv

100644100755
8.3 KB
Binary file not shown.

bin/win/mqsmfcsv.exe

100644100755
53.3 KB
Binary file not shown.

src/M

100644100755
Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,21 @@
1-
#!/bin/ksh
2-
3-
plat=`uname`
4-
5-
if [ "$plat" = "AIX" ]
6-
then
7-
flags="-q32 "
8-
cc="xlc"
9-
else
10-
flags="-m32 "
11-
cc="gcc"
12-
fi
13-
14-
export PLATFLAGS=$flags CC=$cc
15-
make -e -f Makefile.unix $*
16-
17-
1+
#!/bin/ksh
2+
3+
plat=`uname`
4+
5+
if [ "$plat" = "AIX" ]
6+
then
7+
flags="-q32 "
8+
cc="xlc"
9+
targdir="../bin/aix"
10+
else
11+
flags="-m32 "
12+
cc="gcc"
13+
targdir="../bin/linux"
14+
fi
15+
16+
export PLATFLAGS=$flags CC=$cc
17+
make -e -f Makefile.unix $*
18+
19+
rm -f $targdir/convH $targdir/mqsmfcsv
20+
cp convH mqsmfcsv $targdir
21+

src/Makefile.gcc.win

100644100755
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ SRC = mqsmf.c \
1515
printQCCT.c \
1616
printQESD.c \
1717
printQEST.c \
18+
printQIS1.c \
1819
printQIST.c \
1920
printQJST.c \
2021
printQLST.c \
@@ -38,13 +39,15 @@ mqsmfcsv.exe: $(SRC) $(HDR) Makefile.gcc.win dummy
3839
-rm -f out/*
3940
-rm -f SMF-*
4041
-mkdir out >/dev/null 2>&1 || true
42+
copy $@ ..\bin\win
4143
# dbx ./$@
4244

4345
mqsmfstruc.h: csqdsmfc.h convH.exe
4446
./convH.exe < csqdsmfc.h > $@
4547

4648
convH.exe: convH.c
4749
$(CC) -o $@ convH.c
50+
copy $@ ..\bin\win
4851

4952

5053
dummy:

src/Makefile.unix

Lines changed: 47 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,47 @@
1-
2-
CC=cc
3-
CFLAGS= -I.
4-
PLATFLAGS=
5-
SRC = mqsmf.c \
6-
smfDate.c \
7-
smfConv.c \
8-
printDEBUG.c \
9-
printQ5ST.c \
10-
printQCST.c \
11-
printQCTADP.c \
12-
printQCTDNS.c \
13-
printQCTDSP.c \
14-
printQCTSSL.c \
15-
printQCCT.c \
16-
printQESD.c \
17-
printQEST.c \
18-
printQIST.c \
19-
printQJST.c \
20-
printQLST.c \
21-
printQMAC.c \
22-
printQMST.c \
23-
printQPST.c \
24-
printQSGM.c \
25-
printQSPH.c \
26-
printQSRS.c \
27-
printQSST.c \
28-
printQTST.c \
29-
printWQ.c \
30-
printWTAS.c \
31-
printWTID.c
32-
33-
HDR = mqsmfstruc.h \
34-
mqsmf.h
35-
36-
mqsmfcsv: $(SRC) $(HDR) Makefile.unix
37-
$(CC) $(PLATFLAGS) -o $@ $(SRC) $(CFLAGS)
38-
39-
mqsmfstruc.h: csqdsmfc.h convH
40-
convH < csqdsmfc.h > $@
41-
42-
convH: convH.c
43-
$(CC) -o $@ convH.c
44-
45-
46-
dummy:
1+
2+
CC=cc
3+
CFLAGS= -I.
4+
PLATFLAGS=
5+
SRC = mqsmf.c \
6+
smfDate.c \
7+
smfConv.c \
8+
printDEBUG.c \
9+
printQ5ST.c \
10+
printQCST.c \
11+
printQCTADP.c \
12+
printQCTDNS.c \
13+
printQCTDSP.c \
14+
printQCTSSL.c \
15+
printQCCT.c \
16+
printQESD.c \
17+
printQEST.c \
18+
printQIS1.c \
19+
printQIST.c \
20+
printQJST.c \
21+
printQLST.c \
22+
printQMAC.c \
23+
printQMST.c \
24+
printQPST.c \
25+
printQSGM.c \
26+
printQSPH.c \
27+
printQSRS.c \
28+
printQSST.c \
29+
printQTST.c \
30+
printWQ.c \
31+
printWTAS.c \
32+
printWTID.c
33+
34+
HDR = mqsmfstruc.h \
35+
mqsmf.h
36+
37+
mqsmfcsv: $(SRC) $(HDR) Makefile.unix dummy
38+
$(CC) $(PLATFLAGS) -o $@ $(SRC) $(CFLAGS)
39+
40+
mqsmfstruc.h: csqdsmfc.h convH
41+
convH < csqdsmfc.h > $@
42+
43+
convH: convH.c
44+
$(CC) -o $@ convH.c
45+
46+
47+
dummy:

src/Makefile.win

100644100755
Lines changed: 49 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,49 @@
1-
CFLAGS=-nologo /D_CRT_SECURE_NO_WARNINGS /Zp1 /J
2-
SRC = mqsmf.c \
3-
smfDate.c \
4-
smfConv.c \
5-
printDEBUG.c \
6-
printQ5ST.c \
7-
printQCST.c \
8-
printQCCT.c \
9-
printQCTADP.c\
10-
printQCTDNS.c\
11-
printQCTDSP.c\
12-
printQCTSSL.c\
13-
printQESD.c \
14-
printQEST.c \
15-
printQIST.c \
16-
printQJST.c \
17-
printQLST.c \
18-
printQMAC.c \
19-
printQMST.c \
20-
printQPST.c \
21-
printQSGM.c \
22-
printQSPH.c \
23-
printQSRS.c \
24-
printQSST.c \
25-
printQTST.c \
26-
printWQ.c \
27-
printWTAS.c \
28-
printWTID.c
29-
30-
HDR = mqsmfstruc.h \
31-
mqsmf.h
32-
33-
mqsmfcsv.exe: $(SRC) $(HDR) Makefile.win
34-
rm -f $@
35-
$(CC) $(SRC) -I. /Fe$@ $(CFLAGS)
36-
del /q *.obj
37-
38-
mqsmfstruc.h: csqdsmfc.h convH
39-
convH < csqdsmfc.h > $@
40-
41-
convH: convH.c
42-
$(CC) /Fe$@ convH.c
43-
44-
45-
dummy:
46-
1+
CFLAGS=-nologo /D_CRT_SECURE_NO_WARNINGS /Zp1 /J
2+
SRC = mqsmf.c \
3+
smfDate.c \
4+
smfConv.c \
5+
printDEBUG.c \
6+
printQ5ST.c \
7+
printQCST.c \
8+
printQCCT.c \
9+
printQCTADP.c\
10+
printQCTDNS.c\
11+
printQCTDSP.c\
12+
printQCTSSL.c\
13+
printQESD.c \
14+
printQEST.c \
15+
printQIS1.c \
16+
printQIST.c \
17+
printQJST.c \
18+
printQLST.c \
19+
printQMAC.c \
20+
printQMST.c \
21+
printQPST.c \
22+
printQSGM.c \
23+
printQSPH.c \
24+
printQSRS.c \
25+
printQSST.c \
26+
printQTST.c \
27+
printWQ.c \
28+
printWTAS.c \
29+
printWTID.c
30+
31+
HDR = mqsmfstruc.h \
32+
mqsmf.h
33+
34+
mqsmfcsv.exe: $(SRC) $(HDR) Makefile.win
35+
rm -f $@
36+
$(CC) $(SRC) -I. /Fe$@ $(CFLAGS)
37+
del /q *.obj
38+
copy $@ ..\bin\win
39+
40+
mqsmfstruc.h: csqdsmfc.h convH
41+
convH < csqdsmfc.h > $@
42+
43+
convH: convH.c
44+
$(CC) /Fe$@ convH.c
45+
copy $@ ..\bin\win
46+
47+
48+
dummy:
49+

0 commit comments

Comments
 (0)