Skip to content

Commit b1459c9

Browse files
committed
Add 9.1.2 zHyperWrite support
1 parent ec9a510 commit b1459c9

File tree

13 files changed

+21
-16
lines changed

13 files changed

+21
-16
lines changed

CHANGES.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,3 +83,6 @@ Jul 2018 (v4.3.0)
8383

8484
Sep 2018 (v5.0.0)
8585
* Add support for MySQL imports
86+
87+
Feb 2018 (v5.1.0)
88+
* Add support for MQ 9.1.2 zHyperWrite

bin/aix/convH

0 Bytes
Binary file not shown.

bin/aix/mqsmfcsv

3.82 KB
Binary file not shown.

bin/linux/convH

9.88 KB
Binary file not shown.

bin/linux/mqsmfcsv

5.75 KB
Binary file not shown.

bin/win/mqsmfcsv.exe

512 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=905
29+
export PLATFLAGS=$flags CC=$cc VERS=912
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
@@ -2,7 +2,7 @@
22
CC=i686-w64-mingw32-gcc
33
CFLAGS= -I. -m32 -O2
44
PLATFLAGS=
5-
VERS=905
5+
VERS=912
66
SRC = mqsmf.c \
77
smfDDL.c \
88
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
2-
VERS=905
2+
VERS=912
33
SRC = mqsmf.c \
44
smfDDL.c \
55
smfDate.c \

src/mqsmf.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,7 @@ BOOL streamOutput = FALSE;
120120
BOOL streamInput = TRUE;
121121
char *ddlTemplateOpen = NULL;
122122
char *ddlTemplateClose = NULL;
123-
char *ddlQuote = "";
124-
BOOL ddlFold = FALSE;
123+
char *ddlQuote = "\"";
125124
commonFields_t commonF = {0};
126125
enum outputFormat_e outputFormat = OF_CSV;
127126
FILE *infoStream;
@@ -259,10 +258,8 @@ int main( int argc, char *argv[] )
259258
if (!strcmp(mqoptarg,"MYSQL")) {
260259
ddlQuote="`";
261260
ddlTemplateOpen = "-";
262-
ddlFold = TRUE;
263261
} else if (!strcmp(mqoptarg,"DB2")) {
264-
ddlQuote="";
265-
ddlFold = FALSE;
262+
ddlQuote="\"";
266263
} else {
267264
error = TRUE;
268265
}

src/mqsmf.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,6 @@ extern FILE *infoStream;
440440
extern char *ddlTemplateOpen;
441441
extern char *ddlTemplateClose;
442442
extern char *ddlQuote;
443-
extern BOOL ddlFold;
444443

445444
enum outputFormat_e { OF_CSV=0, OF_SQL=1, OF_JSON=2 };
446445
extern enum outputFormat_e outputFormat;

src/printQJST.c

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

100+
/* MQ 9.1.2 added support for zHyperwrite logging */
101+
if (conv16(p->qjstll)>=offsetof(qjst,qjstcp1n))
102+
{
103+
ADDS32("Copy1_New_Logs" , p->qjstcp1n);
104+
ADDS32("Copy2_New_Logs" , p->qjstcp2n);
105+
ADDS32("New_Logs_ZHW_Capable" , p->qjsthwc);
106+
ADDS32("New_Logs_ZHW_Enabled" , p->qjsthwe);
107+
}
108+
100109
SMFPRINTSTOP;
101110

102111
return;

src/smfDDL.c

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -191,19 +191,19 @@ void printDDL(char *name, int type, int len)
191191
case DDL_SUS: /* a seconds/microseconds field */
192192
p = strstr(nameCopy,"(US)");
193193
if (p) *p = 0;
194-
fprintf(fp,"%s %s%s_%s%s \t BIGINT\n",comma,ddlQuote,formatDDL(nameCopy),ddlFold?"US":"us",ddlQuote);
194+
fprintf(fp,"%s %s%s_%s%s \t BIGINT\n",comma,ddlQuote,formatDDL(nameCopy),"US",ddlQuote);
195195
break;
196196

197197
case DDL_DATE:
198198
p = strstr(nameCopy," (DATE)");
199199
if (p) *p = 0; /* remove the "(DATE)" bit */
200-
fprintf(fp,"%s %s%s_%s%s \t DATE\n",comma,ddlQuote,formatDDL(nameCopy),ddlFold?"DATE":"Date",ddlQuote);
200+
fprintf(fp,"%s %s%s_%s%s \t DATE\n",comma,ddlQuote,formatDDL(nameCopy),"DATE",ddlQuote);
201201
break;
202202
case DDL_TIME:
203203
p = strstr(nameCopy," (TIME)");
204204
if (p)
205205
*p = 0;
206-
fprintf(fp,"%s %s%s_%s%s \t CHAR(19)\n",comma,ddlQuote,formatDDL(nameCopy),ddlFold?"TIME":"Time",ddlQuote);
206+
fprintf(fp,"%s %s%s_%s%s \t CHAR(19)\n",comma,ddlQuote,formatDDL(nameCopy),"TIME",ddlQuote);
207207
break;
208208
}
209209

@@ -252,10 +252,7 @@ char *formatDDLMaxLength(char *name,int maxLength)
252252
/* Get rid of repeated '_' characters */
253253
if (c != prev || prev != '_')
254254
{
255-
if (ddlFold)
256-
*o = toupper(c);
257-
else
258-
*o = c;
255+
*o = toupper(c);
259256
o++;
260257
}
261258
i++;

0 commit comments

Comments
 (0)