Skip to content

Commit

Permalink
Merge branch 'v2.x/staging' into v2.x/rc
Browse files Browse the repository at this point in the history
Signed-off-by: 1000TurquoisePogs <[email protected]>
  • Loading branch information
1000TurquoisePogs committed Jul 11, 2023
2 parents 603dc80 + ba7a6ed commit 20f09bd
Show file tree
Hide file tree
Showing 7 changed files with 42 additions and 15 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions build/zis.proj.env
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
PROJECT="zis"
VERSION=2.9.0
DYNLINK_PLUGIN_VERSION=2
VERSION=2.10.0
DYNLINK_PLUGIN_VERSION=3
DEPS=""
2 changes: 1 addition & 1 deletion build/zss.proj.env
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
PROJECT="zss"
VERSION=2.9.0
VERSION=2.10.0
DEPS="QUICKJS LIBYAML"

QUICKJS="quickjs"
Expand Down
42 changes: 32 additions & 10 deletions c/datasetjson.c
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down Expand Up @@ -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);
}
Expand All @@ -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);
Expand Down Expand Up @@ -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(
Expand All @@ -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));

Expand Down Expand Up @@ -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),
Expand Down
2 changes: 1 addition & 1 deletion deps/zowe-common-c
2 changes: 1 addition & 1 deletion manifest.template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 1 addition & 0 deletions mock/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

0 comments on commit 20f09bd

Please sign in to comment.