Skip to content

Commit 8893dfe

Browse files
committed
Consistent binaries for shipped platforms
1 parent 627ca28 commit 8893dfe

File tree

6 files changed

+18
-13
lines changed

6 files changed

+18
-13
lines changed

bin/aix/mqsmfcsv

0 Bytes
Binary file not shown.

bin/linux/mqsmfcsv

7.85 KB
Binary file not shown.

bin/win/mqsmfcsv.exe

512 Bytes
Binary file not shown.

src/mqsmf.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,7 @@ extern char *strMQMON (int v);
196196
extern char *strMQCHT (int v);
197197
extern char *strMQCHS (int v);
198198
extern char *strMQCHLD (int v);
199+
extern char *strCfStatType (int v);
199200

200201
/**********************************************************/
201202
/* How long are the lines for data and headings. */

src/smfDDL.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ void printDDL(char *name, int type, int len)
6666
case DDL_C:
6767
if (!strcmp(name,"Date")) /* special case for CommonHeader field */
6868
{
69-
fprintf(fp,"%s \"%s\" \t CHAR(10)\n",comma,format(nameCopy));
69+
fprintf(fp,"%s \"%s\" \t DATE \n",comma,format(nameCopy));
7070
}
7171
else
7272
{
@@ -97,7 +97,7 @@ void printDDL(char *name, int type, int len)
9797

9898
p2 = strstr(nameCopy," (DATE)");
9999
if (p2) *p2 = 0;
100-
fprintf(fp,"%s \"%s_Date\" \t CHAR(10)\n",comma,format(nameCopy));
100+
fprintf(fp,"%s \"%s_Date\" \t DATE\n",comma,format(nameCopy));
101101

102102
p = p+1;
103103
if (p2) p2 = strstr(p," (TIME)");

src/smfDate.c

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ static char *sqlFmt = "\"%Y-%m-%d\",\"%H:%M:%S";
5656
static char *csvFmt = "\"%Y/%m/%d\",\"%H:%M:%S";
5757
static char *sqlEpoch = "\"1970-01-01\",\"00:00:00,000000\"";
5858
static char *csvEpoch = "\"1970/01/01\",\"00:00:00,000000\"";
59-
static char *emptyTime = "\"\",\"\"";
59+
static char *csvEmpty = "\"\",\"\"";
6060
static char stckTime[64] = {0};
6161

6262
/********************************************************************/
@@ -76,8 +76,22 @@ char * convDate(unsigned long long stcki)
7676
struct tm *t;
7777
char *fmt;
7878
char *epochTime;
79+
char *emptyTime;
7980
size_t offset;
8081

82+
if (sqlMode)
83+
{
84+
epochTime = sqlEpoch;
85+
emptyTime = sqlEpoch;
86+
fmt = sqlFmt;
87+
}
88+
else
89+
{
90+
epochTime = csvEpoch;
91+
emptyTime = csvEmpty;
92+
fmt = csvFmt;
93+
}
94+
8195
stck = conv64(stcki); /* Always passed in z/OS endian; ensure converted */
8296

8397
if (stck == 0 )
@@ -96,16 +110,6 @@ char * convDate(unsigned long long stcki)
96110

97111
t = localtime(&sec); /* Turn seconds into tm structure...*/
98112

99-
if (sqlMode)
100-
{
101-
epochTime = sqlEpoch;
102-
fmt = sqlFmt;
103-
}
104-
else
105-
{
106-
epochTime = csvEpoch;
107-
fmt = csvFmt;
108-
}
109113
offset = strftime(stckTime,sizeof(stckTime)-1,fmt,t); /* ...and format it*/
110114
if (offset == 0 || stck < EPOCH1970)
111115
{

0 commit comments

Comments
 (0)