diff --git a/CHANGELOG.md b/CHANGELOG.md index 2c834c53f..a1e9906f4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ All notable changes to the ZSS package will be documented in this file. ## Recent Changes +## `2.10.0` +- Bugfix: Datasets with VOLSER set to an MVS Symbol would cause dataset read, write, and metadata API calls to fail for those datasets. (#603) +- Bugfix: Preventing error code 0C9-09 caused by a block size of zero (#606) + ## `2.9.0` - Bugfix: expose the version of the ZIS dynamic linkage base plugin so it can be updated during a build - Disable the ZIS dynamic linkage plugin as it's not needed by default diff --git a/build/zis.proj.env b/build/zis.proj.env index 31ee0973f..54e3bee91 100644 --- a/build/zis.proj.env +++ b/build/zis.proj.env @@ -1,4 +1,4 @@ PROJECT="zis" -VERSION=2.9.0 -DYNLINK_PLUGIN_VERSION=2 +VERSION=2.10.0 +DYNLINK_PLUGIN_VERSION=3 DEPS="" diff --git a/build/zss.proj.env b/build/zss.proj.env index 5d6842112..85fa78603 100644 --- a/build/zss.proj.env +++ b/build/zss.proj.env @@ -1,5 +1,5 @@ PROJECT="zss" -VERSION=2.9.0 +VERSION=2.10.0 DEPS="QUICKJS LIBYAML" QUICKJS="quickjs" diff --git a/c/datasetjson.c b/c/datasetjson.c index e0e9fd6e2..7601500c8 100644 --- a/c/datasetjson.c +++ b/c/datasetjson.c @@ -141,7 +141,7 @@ static int getLreclOrRespondError(HttpResponse *response, const DatasetName *dsn int handledThroughDSCB = FALSE; if (!volserSuccess){ - + char dscb[INDEXED_DSCB] = {0}; int rc = obtainDSCB1(dsn->value, sizeof(dsn->value), volser.value, sizeof(volser.value), @@ -508,10 +508,13 @@ static void addDetailsFromDSCB(char *dscb, jsonPrinter *jPrinter, int *isPDS) { printf("size blk=%lld\n",primarySizeBytes/blockSize); } */ - if(scxtv) { if (sizeType==DATASET_ALLOC_TYPE_BLOCK) { //observationally special case - jsonAddInt(jPrinter, "secnd", ((scxtvMult * scxtv) * scal3) / primarySizeDiv); + if (primarySizeDiv > 0) { + jsonAddInt(jPrinter, "secnd", ((scxtvMult * scxtv) * scal3) / primarySizeDiv); + } else { + jsonAddInt(jPrinter, "secnd", 0); + } } else { jsonAddInt(jPrinter, "secnd", scxtvMult * scxtv); } @@ -524,13 +527,17 @@ static void addDetailsFromDSCB(char *dscb, jsonPrinter *jPrinter, int *isPDS) { } else if (sizeType==DATASET_ALLOC_TYPE_TRK) { jsonAddInt(jPrinter, "prime", primarySizeBytes/bytesPerTrack); } else { //but other types, the extent info is way too large, so these numbers observed to be closer, often correct. - if (scxtv){ + if (scxtv) { zowelog(NULL, LOG_COMP_RESTDATASET, ZOWE_LOG_DEBUG, "scal3=%d, blocksize=%d, primarySizeDiv=%d, scxtv=%d\n", scal3, blockSize, primarySizeDiv, scxtv); - if (sizeType==DATASET_ALLOC_TYPE_BLOCK) { //works sometimes, but not always. - jsonAddInt(jPrinter, "prime", (scal3 * blockSize) / primarySizeDiv); + if (primarySizeDiv > 0) { + if (sizeType==DATASET_ALLOC_TYPE_BLOCK) { //works sometimes, but not always. + jsonAddInt(jPrinter, "prime", (scal3 * blockSize) / primarySizeDiv); + } else { + //this works well for block sizes like 32720 or 27990, but returns somewhat larger than expected values for small block sizes like 320 + jsonAddInt(jPrinter, "prime", ((scal3 * blockSize) * (bytesPerTrack/blockSize)) / primarySizeDiv); + } } else { - //this works well for block sizes like 32720 or 27990, but returns somewhat larger than expected values for small block sizes like 320 - jsonAddInt(jPrinter, "prime", ((scal3 * blockSize) * (bytesPerTrack/blockSize)) / primarySizeDiv); + jsonAddInt(jPrinter, "prime", 0); } } else { jsonAddInt(jPrinter, "prime", scal3); @@ -707,6 +714,21 @@ static int obtainDSCB1(const char *dsname, unsigned int dsnameLength, #define SVC27_OPTION_HIDE_NAME 0x10 #define SVC27_OPTION_EADSCB_OK 0x08 + char resolvedVolser[VOLSER_SIZE+1] = {0}; + + if (volser[0] == '&'){ + int rc = 0; + int rsn = 0; + char *result = resolveSymbol(volser, &rc, &rsn); + if (result != NULL && rc == 0){ + snprintf(resolvedVolser, VOLSER_SIZE+1, "%s", result); + safeFree(result, strlen(result)); + } else if (rc) { + zowelog(NULL, LOG_COMP_RESTDATASET, ZOWE_LOG_WARNING, "symbol lookup error rc=0x%x rsn=0x%x\n", rc, rsn); + return rc; + } + } + ALLOC_STRUCT31( STRUCT31_NAME(mem31), STRUCT31_FIELDS( @@ -727,7 +749,7 @@ static int obtainDSCB1(const char *dsname, unsigned int dsnameLength, memset(mem31->dsnameSpacePadded, ' ', sizeof(mem31->dsnameSpacePadded)); memcpy(mem31->dsnameSpacePadded, dsname, dsnameLength); memset(mem31->volserSpacePadded, ' ', sizeof(mem31->volserSpacePadded)); - memcpy(mem31->volserSpacePadded, volser, volserLength); + memcpy(mem31->volserSpacePadded, volser[0] == '&' ? resolvedVolser: volser, volserLength); memset(mem31->workArea, 0, sizeof(mem31->workArea)); @@ -1053,7 +1075,7 @@ static void updateDatasetWithJSONInternal(HttpResponse* response, int volserSuccess = getVolserForDataset(dsn, &volser); if (!volserSuccess){ - + char dscb[INDEXED_DSCB] = {0}; int rc = obtainDSCB1(dsn->value, sizeof(dsn->value), volser.value, sizeof(volser.value), diff --git a/deps/zowe-common-c b/deps/zowe-common-c index a924bdd15..1b29ddc93 160000 --- a/deps/zowe-common-c +++ b/deps/zowe-common-c @@ -1 +1 @@ -Subproject commit a924bdd15b32a6a7e146619fa927dca5633ddd2e +Subproject commit 1b29ddc930de3404be28373a716d5c6a58ca23af diff --git a/manifest.template.yaml b/manifest.template.yaml index 39c9af15e..e8014f8ba 100644 --- a/manifest.template.yaml +++ b/manifest.template.yaml @@ -3,7 +3,7 @@ name: zss # Component identifier. This identifier matches artifact path in Zowe Artifactory https://zowe.jfrog.io/. id: org.zowe.zss # Without the v -version: 2.9.0 +version: 2.10.0 # Component version is defined in gradle.properties for Gradle project # Human readable component name title: Zowe System Services (ZSS) diff --git a/mock/README.md b/mock/README.md index bfd98e26b..0a0dd7b74 100644 --- a/mock/README.md +++ b/mock/README.md @@ -30,3 +30,4 @@ To change the port you can set your environment variable FLASK_RUN_PORT=5000 ``` +**Note:** The mock server may produce a Session Renewal Error when the user tries to log in or perform certain actions. This is an expected behavior and does not indicate a problem with the code. This error occurs only when you use the mock server in combination with the App server and Zowe Desktop. \ No newline at end of file