I have a program that can run normally via the CALL command or withindo
QSH via a symbolic link. I want the default output to be different
depending on where it is running. I do not want the user to have to
anything special external to the program. It must be transparent.
Do you know the value of $SHELL when the program is called from command
line vs. from QSH? Will that give you a clue?
One thing to consider: your link doesn't HAVE to be symbolic to the
program object, does it? Couldn't it be a script that sets up
overriding parameters (perhaps simply by setting some environment
variable) and then links to the program object (perhaps with a special
command-line switch)? Does that help? Of course the issue there is
that environment variables can also be set from the ADD/CHG/RMV ENVVAR
command set and flags can be passed from CALL, which violates the
absolutely/positively aspect of your question. But maybe (if $SHELL is
a clue) the combination can be absolute? Hmmm...
As an Amazon Associate we earn from qualifying purchases.
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.