[DO NOT MERGE] Handle JSON conversion failures IO vs unmappable EBCIDIC bytes - #867
Draft
Gautham-coder wants to merge 1 commit into
Draft
[DO NOT MERGE] Handle JSON conversion failures IO vs unmappable EBCIDIC bytes#867Gautham-coder wants to merge 1 commit into
Gautham-coder wants to merge 1 commit into
Conversation
Signed-off-by: Gautham Kuppuswamy <gkuppuswamy@rocketsoftware.com>
Gautham-coder
marked this pull request as draft
August 31, 2026 13:28
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Proposed changes
Fixes JSON response truncation and a high-CPU loop when streaming dataset records that contain unmappable EBCDIC bytes. A single bad byte in one record previously latched a shared error flag that suppressed all further output, truncating the entire response (
EOF found inside string constant). This splits the error handling so data-conversion failures no longer gate output, while real IO errors still hard-stop, and adds a bounded loop so a dataset that fails every record can't spinthe CPU.
Changes
h/json.hdataConversionErrorFlagtojsonPrinter_tag; declaredjsonSetDataConversionErrorFlag,jsonCheckDataConversionErrorFlag,jsonClearDataConversionErrorFlagc/json.cjsonConvertAndWriteBuffernow setsdataConversionErrorFlag(notioErrorFlag) and writes a blank placeholder instead of suppressing output; write failure still setsioErrorFlag; added the 3 flag accessors; both flags reset injsonPrinterResetzss/c/datasetjson.cMAX_CONSEC_CONVERSION_FAILURES = 100) with a warning logResulting Behavior
EOF found inside string constant)ioErrorFlagstill hard-stops everythingThis PR addresses Issue: [Link to Github issue within https://github.com/zowe/zss/issues if any]
This PR depends upon the following PRs: zowe/zowe-common-c#675
Type of change
Please delete options that are not relevant.
PR Checklist
Please delete options that are not relevant.
Testing
Further comments