Encode a character for a USS URI path when connecting to API-ML. API-ML fails with an HTTP 400 error unless these characters are encoded. None of these characters will be encoded for z/OSMF. This function relies on its caller to encode characters that must be encoded for both z/OSMF and API-ML (like %), and to not pass those characters to this function.
The character to encode.
The URI-encoded value of charToEncode where needed.
URI-Encode a USS file name for use in the path component of a URI.
Many of the documented USS filename special characters (see https://www.ibm.com/docs/en/zos/3.1.0?topic=pages-zos-data-set-unix-file-naming-conventions) result in the error "HTTP(S) error 500 = Internal Server Error", unless they are encoded.
A future external change related to URI encoding is expected to reject URIs containing encoded characters such as %2F (the forward slash character '/').
This function provides a limited encoding for URI paths, which is still required to avoid failures in existing USS REST operations.
By consolidating URI encoding for USS files in this function, any actions needed to react to future URI encoding changes can be implemented in one place.
The session used to connect to the server.
the URI path to encode
URI-Encode a z/OS resource (like datasets, volser, jobname, and jobid) for use in the path component of a URI.
Perform the minimum URI encoding for documented z/OS resource special characters (see https://www.ibm.com/docs/en/zos-basic-skills?topic=set-how-are-data-sets-named) to be successfully processed by z/OSMF and APIML.
This function exists to facilitate any special encoding that has to be performed in the future.
The session used to connect to the server.
the URI path to encode
URI-Encode a USS filename for use in a URI query string.
Use the higher-level of encoding permitted in URI query strings.
Determine if we should encode a URI path for APIML or not.
The session used to connect to the server.
Generated using TypeDoc
Common IO utilities