Skip to content

Commit 87b912a

Browse files
committed
Update for MQ 924
1 parent 4b1a6e6 commit 87b912a

File tree

15 files changed

+73
-21
lines changed

15 files changed

+73
-21
lines changed

CHANGES.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
11

22
History (newest at top)
33
=======================
4+
5+
Nov 2021 (v5.3.3)
6+
* Update for MQ V9.2.4 (no functional change)
7+
* Visual Studio 2022 setup script
8+
49
Jul 2021 (v5.3.2)
510
* Recognise and ignore 115 subtype 240 (an internal undocumented stucture)
611
* Fix an error in QESD interpretation
712
* Update for MQ V9.2.3 (no real change)
813

9-
1014
Mar 2021 (v5.3.1)
1115
* Update for MQ V9.2.2 (no real change)
1216

bin/aix/convH

0 Bytes
Binary file not shown.

bin/aix/mqsmfcsv

459 Bytes
Binary file not shown.

bin/linux/convH

4.7 KB
Binary file not shown.

bin/linux/mqsmfcsv

4.77 KB
Binary file not shown.

bin/win/mqsmfcsv.exe

7 KB
Binary file not shown.

src/M

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22

33
plat=`uname`
44

5+
if [ -z "$VERS" ]
6+
then
7+
VERS="924"
8+
fi
9+
510
if [ "$plat" = "AIX" ]
611
then
712
flags="-q64 -qmaxmem=-1 $CCEXTRAFLAGS -D PLATFORM_AIX"
@@ -26,7 +31,7 @@ else
2631
flags="$flags $optim"
2732
fi
2833

29-
export PLATFLAGS=$flags CC=$cc VERS=923
34+
export PLATFLAGS=$flags CC=$cc VERS=$VERS
3035
make -e -f Makefile.unix $*
3136

3237
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=923
6+
VERS=924
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=923
2+
VERS=924
33
SRC = mqsmf.c \
44
smfDDL.c \
55
smfDate.c \

src/m2019.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
rem This sets the environment for Visual Studio 2017
1+
rem This sets the environment for Visual Studio 2019
22
rem Make sure we set up for a 32-bit program
33
"C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Auxiliary\Build"\vcvarsall x86

src/m2022.bat

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
rem This sets the environment for Visual Studio 2022
2+
rem Make sure we set up for a 32-bit program
3+
"C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Auxiliary\Build"\vcvarsall x86

src/mqsmf.c

Lines changed: 36 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,9 @@ int main( int argc, char *argv[] )
404404
basename = inputFile;
405405
else
406406
basename = b+1;
407-
fprintf(infoStream,"Input file: %s. Format: %s.\n",basename, useRDW?"RDW":"Without RDW");
407+
fprintf(infoStream,"Input file: %s. Requested format: %s.\n",basename, useRDW?"RDW":"Without RDW");
408+
fprintf(infoStream," If there are lots of parsing errors or unknown record types,\n");
409+
fprintf(infoStream," or even a SEGV, then try using alternate RDW format option.\n\n");
408410

409411
/********************************************************************/
410412
/* Open the checkpoint file for reading if we have been asked to do */
@@ -676,7 +678,7 @@ int main( int argc, char *argv[] )
676678
convDate(pqwhs->qwhsstck,dt);
677679
strcpy(commonF.stckFormatDate,dt[0]);
678680
strcpy(commonF.stckFormatDate,dt[1]);
679-
if (recordType == 115)
681+
if (recordType == SMFTYPE_MQ_STAT)
680682
{
681683
if (conv16(pqwhs->qwhslen) >= 52)
682684
{
@@ -740,7 +742,7 @@ int main( int argc, char *argv[] )
740742
fprintf(infoStream,"Section count %d for %4.4s, qwhslen=%d\n",sectionCount,commonF.qMgr,conv16(pqwhs->qwhslen));
741743

742744
/*********************************************************************/
743-
/* One we know how many sections there are, copy the triplet values */
745+
/* Once we know how many sections there are, copy the triplet values */
744746
/* into a local array, doing the endianness conversion on the way. */
745747
/* That makes it look a bit easier rather than than having convxxx */
746748
/* function calls everywhere else. */
@@ -783,7 +785,7 @@ int main( int argc, char *argv[] )
783785
case SMFTYPE_MQ_STAT:
784786
switch(recordSubType)
785787
{
786-
case 1:
788+
case SMFSUBTYPE_MQ_STAT_BASIC:
787789
/*****************************************************************/
788790
/* Some of the triplets seem to refer to internal/undocumented */
789791
/* structures. Only the QSST and QJST are known elements. */
@@ -806,7 +808,7 @@ int main( int argc, char *argv[] )
806808
}
807809
break;
808810

809-
case 2:
811+
case SMFSUBTYPE_MQ_STAT_API:
810812
/*****************************************************************/
811813
/* All of the triplets may be used, so we can just iterate */
812814
/* through them and pick the right formatter for each. */
@@ -837,23 +839,23 @@ int main( int argc, char *argv[] )
837839
}
838840
break;
839841

840-
case 5:
842+
case SMFSUBTYPE_MQ_STAT_POOL:
841843
for (i = 0; i < triplet[1].n; i++)
842844
{
843845
p = &dataBuf[triplet[1].offset + triplet[1].l * i];
844846
printQSPH((qsph *)p);
845847
}
846848
break;
847849

848-
case 6:
850+
case SMFSUBTYPE_MQ_STAT_GETMAIN:
849851
for (i = 0; i < triplet[1].n; i++)
850852
{
851853
p = &dataBuf[triplet[1].offset + triplet[1].l * i];
852854
printQSGM((qsgm *)p);
853855
}
854856
break;
855857

856-
case 7:
858+
case SMFSUBTYPE_MQ_STAT_REGION:
857859
for (i = 0; i < triplet[1].n; i++)
858860
{
859861
p = &dataBuf[triplet[1].offset + triplet[1].l * i];
@@ -864,7 +866,7 @@ int main( int argc, char *argv[] )
864866
#ifdef QIS1IDV
865867
/* Pageset statistics introduced in MQ V9 - only compile this block if using */
866868
/* the V9 header file. */
867-
case 201:
869+
case SMFSUBTYPE_MQ_STAT_PAGESET:
868870
for(i = 0; i < triplet[1].n; i++)
869871
{
870872
p = &dataBuf[triplet[1].offset + triplet[1].l * i];
@@ -873,15 +875,15 @@ int main( int argc, char *argv[] )
873875
break;
874876
#endif
875877

876-
case 215:
878+
case SMFSUBTYPE_MQ_STAT_BUFFER:
877879
for(i = 0; i < triplet[1].n; i++)
878880
{
879881
p = &dataBuf[triplet[1].offset + triplet[1].l * i];
880882
printQPST((qpst *)p);
881883
}
882884
break;
883885

884-
case 231:
886+
case SMFSUBTYPE_MQ_STAT_CHANNEL:
885887
/*****************************************************************/
886888
/* All of the triplets may be used, so we can just iterate */
887889
/* through them and pick the right formatter for each. */
@@ -912,7 +914,7 @@ int main( int argc, char *argv[] )
912914
}
913915
break;
914916

915-
case 240:
917+
case SMFSUBTYPE_MQ_STAT_RESERVED_1:
916918
/* These are internal undocumented structures. There's not much we can do */
917919
/* except ignore them. We will see them show up in the overall subtype */
918920
/* stats of records processed, but no other debug. */
@@ -1513,6 +1515,28 @@ static char *getFormatPercent(myoff_t totalFileSize,myoff_t pos)
15131515
return formatPercentString;
15141516
}
15151517

1518+
1519+
/*****************************************************************/
1520+
/* FUNCTION: laterThan */
1521+
/* PURPOSE: */
1522+
/* Is the qmgr version in the current record greater than */
1523+
/* a particular level */
1524+
/* RETURN: 1 if later version; 0 otherwise */
1525+
/*****************************************************************/
1526+
int laterThan(int v)
1527+
{
1528+
int rc = 0;
1529+
char mqVer[5] = {0};
1530+
static int currentVersion = -1;
1531+
if (currentVersion == -1) {
1532+
strncpy(mqVer,commonF.mqVer,4);
1533+
currentVersion = atoi(mqVer);
1534+
}
1535+
if (currentVersion > v)
1536+
return 1;
1537+
return rc;
1538+
}
1539+
15161540
/*****************************************************************/
15171541
/* FUNCTION: inconsistentVersions */
15181542
/* PURPOSE: */

src/mqsmf.h

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,19 @@ typedef unsigned int BOOL;
6565
#define SMFTYPE_ZCEE (123) /* z/OS Connect EE */
6666
#define SMFTYPE_MQ_AMS (180) /* The default but can be changed */
6767

68+
/********************************************************************/
69+
/* Various subtypes */
70+
/********************************************************************/
71+
#define SMFSUBTYPE_MQ_STAT_BASIC (1)
72+
#define SMFSUBTYPE_MQ_STAT_API (2)
73+
#define SMFSUBTYPE_MQ_STAT_POOL (5)
74+
#define SMFSUBTYPE_MQ_STAT_GETMAIN (6)
75+
#define SMFSUBTYPE_MQ_STAT_REGION (7)
76+
#define SMFSUBTYPE_MQ_STAT_PAGESET (201)
77+
#define SMFSUBTYPE_MQ_STAT_BUFFER (215)
78+
#define SMFSUBTYPE_MQ_STAT_CHANNEL (231)
79+
#define SMFSUBTYPE_MQ_STAT_RESERVED_1 (240)
80+
6881
/********************************************************************/
6982
/* Layout of the SMF records. Standard header for all types of SMF. */
7083
/* The SMFRECREL is not necessarily standard usage so we overlay it */
@@ -231,6 +244,7 @@ extern char *convStr(unsigned char *,int);/* Convert EBCDIC string to ASCII*/
231244
extern char *convSecUSec(unsigned long long s);/* Convert stck durations to string containing sec,usec*/
232245
extern void convDate(unsigned long long s,char *dt[2]); /* Convert stck to date/time*/
233246
extern int looksLikeNum(int l, char *c);
247+
extern int laterThan(int version); /* Is current record from qmgr version later than requested */
234248

235249
extern char *stckConv(unsigned long long stck, char * output);
236250
extern void calcYMD(int y,int dY,int *m,int *dM);

src/mqsmfstrucU.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* This file was generated from cqsdsmfc.h version 923
2+
* This file was generated from cqsdsmfc.h version 924
33
* by the convH program (convH64.c) in the src directory
44
* Do not try to edit this header manually.
55
*
@@ -621,7 +621,8 @@ int32_t qpstsos;
621621
uint32_t qpstloc : 1;
622622
uint32_t qpstf4kb : 1;
623623
uint32_t : 30;
624-
int32_t filler__001[7];
624+
uint32_t QPST_MSGP020_PUTIME;
625+
int32_t filler__001[6];
625626
} qpst;
626627
#define QPSTIDV 0xD30F
627628
#define QPSTEYEV "QPST"

src/mqsmfstrucW.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* This file was generated from cqsdsmfc.h version 923
2+
* This file was generated from cqsdsmfc.h version 924
33
* by the convH program (convH64.c) in the src directory
44
* Do not try to edit this header manually.
55
*
@@ -621,7 +621,8 @@ int32_t qpstsos;
621621
uint32_t qpstloc : 1;
622622
uint32_t qpstf4kb : 1;
623623
uint32_t : 30;
624-
int32_t filler__001[7];
624+
uint32_t QPST_MSGP020_PUTIME;
625+
int32_t filler__001[6];
625626
} qpst;
626627
#define QPSTIDV 0xD30F
627628
#define QPSTEYEV "QPST"

0 commit comments

Comments
 (0)