On Thu, 8 Dec 2016 10:44:24 -0500, Phil Smith III wrote: > >OK, I admit I haven't measured it. Not sure what "run the environment" >means, please elaborate? > http://pubs.opengroup.org/onlinepubs/9699919799/functions/exec.html#tag_16_111_03 ... When a C-language program is executed as a result of a call to one of the exec family of functions, it shall be entered as a C-language function call as follows:
int main (int argc, char *argv[]); where argc is the argument count and argv is an array of character pointers to the arguments themselves. In addition, the following variable, which must be declared by the user if it is to be used directly: extern char **environ; is initialized as a pointer to an array of character pointers to the environment strings. The argv and environ arrays are each terminated by a null pointer. The null pointer terminating the argv array is not counted in argc. I assumed that by "run the TIOT" you meant perform a linear search of the array. I used "running" [**environ] in the same sense. I believe neither TIOT nor **environ is indexed. Is there an SVC 99 subfunction to enumerate TIOT entries which might be more GUPI than reading TIOT directly, but at a far greater performance cost? I know BPXWDYN(INFO) does this, but I don't know whether it gets its information from TIOT or via SVC 99. >>In the absurd extreme, suppose your user's program exists as >>stored JCL, submitted with the TSO SUBMIT command, and >>your user is unwilling to modify that JCL, and you'd like to >>allocate your DD in the TSO session and have it available in >>the batch job. Can't. > >Again, if they don't want to modify the JCL, then they can specify it in the >API call. Not clear to me how an environment variable is easier to set than >a DD for a submitted job, though. Are you saying that TSO SUBMIT carries >environment variables from the TSO session into submitted jobs? That would >surprise me (pleasantly)! > No. Don't be surprised; that's part of what I meant by "absurd". I'd write a sed script to insert a DD DUMMY after the EXEC PGM=, piping the output to INTRDR. (I'd figure out some way to allocate it.) And lately I ranted here about wanting environment variables, particularly TZ, in TSO address spaces. Dumb question, I now realize. **environment is created by exec(). The TMP is not started by exec(), so no **environment. >This is all a theoretical problem at this point, BTW -nobody has raised this >with us; I'm just trying to think it through in advance. As everyone is all >too aware, consciously doing USS-ish things is sadly rare in the real >world,. Hey, it's only been, what, 20 years? Stuff takes time to catch on. > And all along, I had thought the "real world" was the one in which JCL is delightfully rare. -- gil ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN