Skip to content

Commit

Permalink
Merge pull request #606 from zowe/bugfix/metadata-api
Browse files Browse the repository at this point in the history
Bugfix - ZSS Matadata API
  • Loading branch information
1000TurquoisePogs authored Jun 9, 2023
2 parents 9f39206 + e3b5b00 commit 22263f8
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 7 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ All notable changes to the ZSS package will be documented in this file.

## Recent Changes

## `2.10.0`
- Bugfix: Preventing error code 0C9-09 caused by a block size of zero

## `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
21 changes: 14 additions & 7 deletions c/datasetjson.c
Original file line number Diff line number Diff line change
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

0 comments on commit 22263f8

Please sign in to comment.