John McKown wrote:
On Wed, Jan 10, 2018 at 11:19 AM, Thomas David Rivers <[email protected]>
wrote:
In Systems/C , this is simply:
#include <machine/tiot.h>
#include <stdio.h>
main()
{
printf("Job name is %s\n", __jobname());
}
That is a nice enhancement for the C language under z/OS. As a general
rule, I _try_ to avoid any functions which start with one or two
underscores. These are generally "reserved" for the implementer and so may
not be available on a different compiler. The __jobname() is a nice example
of a reasonable extension for z/OS, or z/VSE. Another nice one might be
__userid() to return the RACF id under which the process is running.
Hi John,
Yes - identifiers that begin with double-underscore are reserved
for the C implementation; that's why our implementation uses
those (to avoid conflicts.)
Along with __jobname(), we have:
__stepname()
__procname()
__get_cpuid()
__userid()
which can make it very handy indeed. The Dignus C library
manual has more details.
- Dave R. -
--
[email protected] Work: (919) 676-0847
Get your mainframe programming tools at http://www.dignus.com
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN