On Wed, Jan 10, 2018 at 11:19 AM, Thomas David Rivers <riv...@dignus.com> wrote:
> John McKown wrote: > > Sorry, but I deleted the email which had the original question. Just for >> "fun" (but no profit), I wrote the following C code to display the name of >> the job under which the program is running. It can be improved a bit, but >> it shows the basics. >> >> #include <stdlib.h> >> #include <stdio.h> >> ... >> >> > 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. > > > - Dave R. - > -- I have a theory that it's impossible to prove anything, but I can't prove it. Maranatha! <>< John McKown ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN