-
Notifications
You must be signed in to change notification settings - Fork 85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CRLF added at end of every data set when downloaded from the mainframe #2044
Comments
Thank you for raising this enhancement request. |
To provide additional information, we are currently displaying exactly what is being returned from the z/OSMF REST API. When downloading data-sets via Postman and cURL, they also return the extra newline at the end of those files. Specifically, it returns a line feed character, which our Node APIs convert to a carriage return followed by a line feed for Windows. We could remove the last line feed from each downloaded file, but if we were to do that, and z/OSMF were to change their behavior, we may lose lines that should be present. Additionally, the only editor I found that doesn't display the extra line was Vi/Vim. Notepad, Notepad++, Postman, Nano, and XXD all showed the new line. |
Consider: |
Given that this has no real impact to data sets uploaded to the mainframe, I think it makes sense to take no action from the CLI/SDK side at this time. |
Describe the bug
When either downloading or viewing a data set (or using the Get.dataSet SDK function), an extra newline/crlf is added at the end of the response.
For example, if a data set contains one record: "TEST", the Get.dataSet function will return "TEST\r\n" (or "TEST\n" on Linux systems). In most cases, this doesn't really matter, however it also affects how data sets appear in Zowe Explorer. As a caveat, if a user opens a data set and then saves it using Zowe Explorer, the extra line does not get added to the data set on the mainframe. See zowe/zowe-explorer-vscode#2169.
This affects data sets and spool files, not USS files.
If it is safe to assume that a carriage return will be at the end of every record, including the last record in a data set, should we handle this differently? Alternatively, would it make more sense to do something on the Zowe Explorer side?
Expected and actual results
Describe your environment
Additional context
The text was updated successfully, but these errors were encountered: