I want to validate a dataset name in my C code on z/OS. The @, #, $, - characters are valid characters as per: https://www.ibm.com/docs/en/zos/2.1.0?topic=sets-data-set-naming-rules What I am not sure is if those special characters are invariant across all EBCDIC code pages? If I look at code page 1047: https://en.wikibooks.org/wiki/Character_Encodings/Code_Tables/EBCDIC/EBCDIC_1047 it lists the $ symbol at 0x5B but I am not sure if it is invariant across all EBCDIC code pages.
Same question for @, #, -
This is confusing because the "national characters" '@#$' have the same code points but different character symbols in different EBCDIC pages. They're displayed differently in different code pages, but the same three code points are what are supported in data set names, regardless of code page. It's hard to find general information about EBCDIC in the IBM manuals, but there's a note about the national characters in the JCL Reference at https://www.ibm.com/docs/en/zos/2.5.0?topic=parameters-character-sets explaining that the characters supported are specifically "the U.S. National characters; @ as X'7C'; $ as X'5B'; and # as X'7B'" and lookalike characters on other countries' terminals may cause errors.
Hyphen '-' and all the other special characters used in JCL, on the other hand, should be invariant in all EBCDIC code pages. I haven't found documentation saying so, but they're the same in all the code pages documented for the CMS Pipelines XLATE stage. (Figure 401 at https://www.ibm.com/docs/en/SSB27U_7.3.0/pdf/c2462521.pdf)