Hello Mike, > In getprogname.c, there is a section of code delimited by > > # elif __MVS__ > ... > #elif defined __sgi || defined __osf__ > > I would like to request a patch so that code built in ASCII mode will > operate correctly. > Currently, the program name returned is always in EBCDIC. This can be fixed > with the > patch: > > if (token > 0 && buf.ps_pid == pid) > { > char *s = strdup (last_component (buf.ps_pathptr)); > - if (s) > + if (s) { > p = s; > +#if (__CHARSET_LIB == 1) > + __e2a_s(p); > +#endif > + } > break; > } > }
The __e2a_s documentation [1] says: "This function is valid for applications compiled XPLINK only." What does it mean? Can we use it anyway? Or should the #if be changed to #if defined __XPLINK__ && __CHARSET_LIB == 1 Bruno [1] https://www.ibm.com/docs/en/zos/2.2.0?topic=functions-e2a-s-convert-string-from-ebcdic-ascii