Skip to content

Commit 5eb7959

Browse files
committed
Add WTASCORR field - actually a combination of other fields
More CRLF changes with move to different master devt machine
1 parent 1f1f9a9 commit 5eb7959

33 files changed

+2271
-2267
lines changed

.gitignore

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1-
/.project
2-
*.mp4
3-
/src/*.exe
4-
/src/*.obj
5-
mqsmfstruc.h
1+
/.project
2+
*.mp4
3+
/src/*.exe
4+
/src/*.obj
5+
mqsmfstruc.h
66
src/convH
77
src/mqsmfcsv
8-
csq*
9-
/src/t2
10-
/src/t3
8+
src/Bip*
9+
csq*
10+
/src/t2
11+
/src/t3

bin/aix/convH

0 Bytes
Binary file not shown.

bin/aix/mqsmfcsv

854 Bytes
Binary file not shown.

bin/win/mqsmfcsv.exe

-44.4 KB
Binary file not shown.

src/Makefile.gcc.win

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,15 @@ mqsmfcsv.exe: $(SRC) $(HDR) Makefile.gcc.win dummy
3939
-rm -f out/*
4040
-rm -f SMF-*
4141
-mkdir out >/dev/null 2>&1 || true
42-
copy $@ ..\bin\win
42+
cp $@ ../bin/win
4343
# dbx ./$@
4444

4545
mqsmfstruc.h: csqdsmfc.h convH.exe
4646
./convH.exe < csqdsmfc.h > $@
4747

4848
convH.exe: convH.c
4949
$(CC) -o $@ convH.c
50-
copy $@ ..\bin\win
50+
cp $@ ../bin/win
5151

5252

5353
dummy:

src/convH.c

Lines changed: 69 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -1,69 +1,69 @@
1-
/*
2-
* Copyright (c) 2016 IBM Corporation and other Contributors.
3-
*
4-
* All rights reserved. This program and the accompanying materials
5-
* are made available under the terms of the Eclipse Public License v1.0
6-
* which accompanies this distribution, and is available at
7-
* http://www.eclipse.org/legal/epl-v10.html
8-
*
9-
* Contributors:
10-
* Mark Taylor - Initial Contribution
11-
*/
12-
13-
#include <stdio.h>
14-
#include <string.h>
15-
16-
/*
17-
* This is a very simple filter to take the product-provided
18-
* header file from z/OS and strip a few things that are
19-
* problematic on other platform compilers.
20-
*
21-
* It means we don't need to keep a variant copy
22-
* of the header in sync when new versions come out.
23-
*
24-
* In particular, get rid of the z/OS format for
25-
* the pragmas, and also the trigraph at the top
26-
* of the file.
27-
*
28-
* If the contents of the header file change, this
29-
* filter may need to be updated to match.
30-
*/
31-
int main(int argc, char **argv)
32-
{
33-
char line[256] = {0};
34-
char *c;
35-
36-
/******************************************************/
37-
/* Need a portable pragma that works on all platforms */
38-
/******************************************************/
39-
printf("#pragma pack(1)\n");
40-
41-
/******************************************************/
42-
/* Then copy stdin to stdout, stripping just a few */
43-
/* lines. */
44-
/******************************************************/
45-
do
46-
{
47-
c = fgets(line,sizeof(line)-1,stdin);
48-
if (c)
49-
{
50-
if (strstr(line,"pragma"))
51-
continue;
52-
/****************************************************/
53-
/* Can't just put "??=" in here as it's converted */
54-
/* into a trigraph and no longer matches. */
55-
/****************************************************/
56-
else if (strstr(line,"\?\?="))
57-
continue;
58-
else
59-
{
60-
printf(line);
61-
if (line[strlen(line)-1] != '\n')
62-
printf("\n");
63-
}
64-
}
65-
} while (c);
66-
67-
fflush(stdout);
68-
return 0;
69-
}
1+
/*
2+
* Copyright (c) 2016 IBM Corporation and other Contributors.
3+
*
4+
* All rights reserved. This program and the accompanying materials
5+
* are made available under the terms of the Eclipse Public License v1.0
6+
* which accompanies this distribution, and is available at
7+
* http://www.eclipse.org/legal/epl-v10.html
8+
*
9+
* Contributors:
10+
* Mark Taylor - Initial Contribution
11+
*/
12+
13+
#include <stdio.h>
14+
#include <string.h>
15+
16+
/*
17+
* This is a very simple filter to take the product-provided
18+
* header file from z/OS and strip a few things that are
19+
* problematic on other platform compilers.
20+
*
21+
* It means we don't need to keep a variant copy
22+
* of the header in sync when new versions come out.
23+
*
24+
* In particular, get rid of the z/OS format for
25+
* the pragmas, and also the trigraph at the top
26+
* of the file.
27+
*
28+
* If the contents of the header file change, this
29+
* filter may need to be updated to match.
30+
*/
31+
int main(int argc, char **argv)
32+
{
33+
char line[256] = {0};
34+
char *c;
35+
36+
/******************************************************/
37+
/* Need a portable pragma that works on all platforms */
38+
/******************************************************/
39+
printf("#pragma pack(1)\n");
40+
41+
/******************************************************/
42+
/* Then copy stdin to stdout, stripping just a few */
43+
/* lines. */
44+
/******************************************************/
45+
do
46+
{
47+
c = fgets(line,sizeof(line)-1,stdin);
48+
if (c)
49+
{
50+
if (strstr(line,"pragma"))
51+
continue;
52+
/****************************************************/
53+
/* Can't just put "??=" in here as it's converted */
54+
/* into a trigraph and no longer matches. */
55+
/****************************************************/
56+
else if (strstr(line,"\?\?="))
57+
continue;
58+
else
59+
{
60+
printf(line);
61+
if (line[strlen(line)-1] != '\n')
62+
printf("\n");
63+
}
64+
}
65+
} while (c);
66+
67+
fflush(stdout);
68+
return 0;
69+
}

src/mqsmf.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
#ifdef _WIN32
6464
#include <io.h>
6565
#include <fcntl.h>
66-
#endif
66+
#endif
6767

6868
#include "mqsmf.h"
6969

@@ -548,10 +548,10 @@ int main( int argc, char *argv[] )
548548
printQSRS((qsrs *)p);
549549
}
550550
break;
551-
551+
552552
#ifdef QIS1IDV
553553
/* Pageset statistics introduced in MQ V9 - only compile this block if using */
554-
/* the V9 header file. */
554+
/* the V9 header file. */
555555
case 201:
556556
for(i = 0; i < triplet[1].n; i++)
557557
{
@@ -753,9 +753,9 @@ FILE * fopenext(const char * basename, const char *ext, BOOL *newFile)
753753
{
754754
long pos;
755755

756-
fseek(fp,0,SEEK_END);
756+
fseek(fp,0,SEEK_END);
757757
pos = ftell(fp);
758-
758+
759759
if (pos == 0) /* Have we just created the file, even for "append" mode */
760760
*newFile = TRUE;
761761
else

src/printDEBUG.c

Lines changed: 74 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -1,74 +1,74 @@
1-
/*
2-
* Copyright (c) 2016 IBM Corporation and other Contributors.
3-
*
4-
* All rights reserved. This program and the accompanying materials
5-
* are made available under the terms of the Eclipse Public License v1.0
6-
* which accompanies this distribution, and is available at
7-
* http://www.eclipse.org/legal/epl-v10.html
8-
*
9-
* Contributors:
10-
* Mark Taylor - Initial Contribution
11-
*/
12-
13-
#include <stdio.h>
14-
#include "mqsmf.h"
15-
16-
SMFPRINTGLOB;
17-
static char *hex = "0123456789ABCDEF";
18-
19-
/*******************************************************************/
20-
/* NAME: printDEBUG */
21-
/* */
22-
/* FUNCTION: Debug function to print a buffer in hex */
23-
/*******************************************************************/
24-
void printDEBUG(char *title, void *buf,int length)
25-
{
26-
int i, j;
27-
unsigned char *p = (unsigned char*)buf;
28-
int rows;
29-
int o;
30-
char line[80];
31-
32-
if (first)
33-
{
34-
fp = fopenext("DEBUG","txt",&newFile);
35-
first = FALSE;
36-
}
37-
if (!fp)
38-
return;
39-
40-
fprintf(fp,"-- %s -- (%d bytes) --------------------\n",title,length);
41-
42-
rows = (length + 15) / 16;
43-
44-
for (i=0;i<rows;i++)
45-
{
46-
47-
memset(line,' ',sizeof(line));
48-
o=sprintf(line,"%08.8X : ",i *16);
49-
50-
for (j=0;j<16 && (j + (i*16) < length);j++)
51-
{
52-
line[o++] = hex[p[j] >> 4 ];
53-
line[o++] = hex[p[j] & 0x0F];
54-
if (j % 4 == 3)
55-
line[o++] = ' ';
56-
}
57-
58-
o = 48;
59-
line[o++] = '|';
60-
for (j=0;j<16 && (j + (i*16) < length);j++)
61-
{
62-
line[o++] = EBCDIC_TO_ASCII[p[j]];
63-
}
64-
65-
o = 65;
66-
line[o++] = '|';
67-
line[o++] = 0;
68-
69-
70-
fprintf(fp,"%s\n",line);
71-
p += 16;
72-
}
73-
return;
74-
}
1+
/*
2+
* Copyright (c) 2016 IBM Corporation and other Contributors.
3+
*
4+
* All rights reserved. This program and the accompanying materials
5+
* are made available under the terms of the Eclipse Public License v1.0
6+
* which accompanies this distribution, and is available at
7+
* http://www.eclipse.org/legal/epl-v10.html
8+
*
9+
* Contributors:
10+
* Mark Taylor - Initial Contribution
11+
*/
12+
13+
#include <stdio.h>
14+
#include "mqsmf.h"
15+
16+
SMFPRINTGLOB;
17+
static char *hex = "0123456789ABCDEF";
18+
19+
/*******************************************************************/
20+
/* NAME: printDEBUG */
21+
/* */
22+
/* FUNCTION: Debug function to print a buffer in hex */
23+
/*******************************************************************/
24+
void printDEBUG(char *title, void *buf,int length)
25+
{
26+
int i, j;
27+
unsigned char *p = (unsigned char*)buf;
28+
int rows;
29+
int o;
30+
char line[80];
31+
32+
if (first)
33+
{
34+
fp = fopenext("DEBUG","txt",&newFile);
35+
first = FALSE;
36+
}
37+
if (!fp)
38+
return;
39+
40+
fprintf(fp,"-- %s -- (%d bytes) --------------------\n",title,length);
41+
42+
rows = (length + 15) / 16;
43+
44+
for (i=0;i<rows;i++)
45+
{
46+
47+
memset(line,' ',sizeof(line));
48+
o=sprintf(line,"%08.8X : ",i *16);
49+
50+
for (j=0;j<16 && (j + (i*16) < length);j++)
51+
{
52+
line[o++] = hex[p[j] >> 4 ];
53+
line[o++] = hex[p[j] & 0x0F];
54+
if (j % 4 == 3)
55+
line[o++] = ' ';
56+
}
57+
58+
o = 48;
59+
line[o++] = '|';
60+
for (j=0;j<16 && (j + (i*16) < length);j++)
61+
{
62+
line[o++] = EBCDIC_TO_ASCII[p[j]];
63+
}
64+
65+
o = 65;
66+
line[o++] = '|';
67+
line[o++] = 0;
68+
69+
70+
fprintf(fp,"%s\n",line);
71+
p += 16;
72+
}
73+
return;
74+
}

0 commit comments

Comments
 (0)