Skip to content

Commit 6740453

Browse files
committed
Support for MQ 9.1.4 encrypted datasets
1 parent 39df237 commit 6740453

File tree

12 files changed

+53
-7
lines changed

12 files changed

+53
-7
lines changed

CHANGES.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
History (newest at top)
33
=======================
44

5-
xxxx 2019 (vX.X.X)
5+
Dec 2019 (v5.2.0)
6+
* Add support for MQ 9.1.4 encrypted datasets and logs
67
* Update the header filter to force C99 standardised types internally (eg uint32_t)
78

89
Sep 2019 (v5.1.5)

bin/aix/convH

0 Bytes
Binary file not shown.

bin/aix/mqsmfcsv

692 Bytes
Binary file not shown.

bin/linux/mqsmfcsv

24 Bytes
Binary file not shown.

bin/win/mqsmfcsv.exe

0 Bytes
Binary file not shown.

src/M

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ else
2626
flags="$flags $optim"
2727
fi
2828

29-
export PLATFLAGS=$flags CC=$cc VERS=913
29+
export PLATFLAGS=$flags CC=$cc VERS=914
3030
make -e -f Makefile.unix $*
3131

3232
rm -f $targdir/convH $targdir/mqsmfcsv

src/Makefile.gcc.win

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ CC=i686-w64-mingw32-gcc
33
# CFLAGS= -I. -m32 -fpack-struct=8 -DPLATFORM_WINDOWS
44
CFLAGS= -I. -m32 -DPLATFORM_WINDOWS
55
PLATFLAGS=
6-
VERS=913
6+
VERS=914
77
SRC = mqsmf.c \
88
smfDDL.c \
99
smfDate.c \

src/Makefile.win

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
CFLAGS=-nologo /D_CRT_SECURE_NO_WARNINGS /Zp1 /J /O2 /DPLATFORM_WINDOWS
2-
VERS=913
2+
VERS=914
33
SRC = mqsmf.c \
44
smfDDL.c \
55
smfDate.c \

src/printQESD.c

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,21 @@
1313
#include <stdio.h>
1414
#include "mqsmf.h"
1515

16+
/*******************************************************************/
17+
/* Bitfields on z/OS are implemented in the compiler with the */
18+
/* first bit being the top bit of a word. So we refer to */
19+
/* flags in that order. */
20+
/*******************************************************************/
21+
#define QESDENCF (0x80000000)
22+
1623
SMFPRINTGLOB;
1724

1825
void printQESD(qesd *p)
1926
{
27+
unsigned int flags;
28+
unsigned int *u;
29+
30+
2031
SMFPRINTSTART("QESD",p,conv16(p->qesdll));
2132

2233
ADDSTREN("Structure" , p -> qesdstr,12);
@@ -92,6 +103,21 @@ void printQESD(qesd *p)
92103
ADDSTCK ("Other_Read_IO_Time", p -> qesdioot);
93104
ADDSTCK ("Other_Read_IO_Wait", p -> qesdioow);
94105

106+
#if CSQDSMF_VERSION >= 914
107+
if (conv16(p->qesdll)>offsetof(qesd,qesdflag)) {
108+
u = (unsigned int *)&p->qesdflag;
109+
flags = conv32(*(u+1));
110+
111+
if(flags & QESDENCF) {
112+
ADDSTR("Encrypted","Yes",3);
113+
}
114+
else
115+
{
116+
ADDSTR("Encrypted","No",3);
117+
}
118+
}
119+
#endif
120+
95121
SMFPRINTSTOP;
96122
return;
97123
}

src/printQIS1.c

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
/* flags in that order. */
2121
/*******************************************************************/
2222
#define QIS1EXPF (0x80000000)
23+
#define QIS1ENCF (0x40000000)
2324

2425
SMFPRINTGLOB;
2526

@@ -72,7 +73,16 @@ void printQIS1(qis1 *p)
7273
{
7374
ADDSTR("Expand","No",3);
7475
}
75-
76+
#if CSQDSMF_VERSION >= 914
77+
if(flags & QIS1ENCF)
78+
{
79+
ADDSTR("Encrypted","Yes",3);
80+
}
81+
else
82+
{
83+
ADDSTR("Encrypted","No",3);
84+
}
85+
#endif
7686
SMFPRINTSTOP;
7787

7888
return;

src/printQJST.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ void printQJST(qjst *p)
9797
ADDU64 ("IO_Time_Sum_Squares_2", p->qjstiosqu[1]);
9898
}
9999

100+
#if CSQDSMF_VERSION >= 912
100101
/* MQ 9.1.2 added support for zHyperwrite logging */
101102
if (conv16(p->qjstll)>offsetof(qjst,qjstcp1n))
102103
{
@@ -105,6 +106,14 @@ void printQJST(qjst *p)
105106
ADDS32("New_Logs_ZHW_Capable" , p->qjsthwc);
106107
ADDS32("New_Logs_ZHW_Enabled" , p->qjsthwe);
107108
}
109+
#endif
110+
111+
#if CSQDSMF_VERSION >= 914
112+
/* MQ 9.1.4 added support for encrypted datasets */
113+
if (conv16(p->qjstll)>offsetof(qjst,qjstencr)) {
114+
ADDS32("New_Logs_Encrypted",p->qjstencr);
115+
}
116+
#endif
108117

109118
SMFPRINTSTOP;
110119

src/sizes.master

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ qct_ssl : 48
66
qct_dns : 48
77
qcst : 324
88
qest : 4104
9-
qesd : 328
9+
qesd : 336
1010
qist : 80
1111
qis1 : 104
12-
qjst : 592
12+
qjst : 596
1313
qlst : 32
1414
qmac : 48
1515
qmst : 104

0 commit comments

Comments
 (0)