From: Bob Stearns on
I have a script which works from the command line, but gives the
following error message when run as a part of a email script. Any
suggestions as to a cause would be greatly appreciated.

SQL10007N Message "-1390" could not be retrieved. Reason code: "3".
From: The Boss on
Bob Stearns wrote:
> I have a script which works from the command line, but gives the
> following error message when run as a part of a email script. Any
> suggestions as to a cause would be greatly appreciated.
>
> SQL10007N Message "-1390" could not be retrieved. Reason code: "3".

This is most likely a problem with setting your environment variables.
Try:
DB2INSTANCE=<your_instance>
export DB2INSTANCE

HTH

--
Jeroen


From: The Boss on
The Boss wrote:
> Bob Stearns wrote:
>> I have a script which works from the command line, but gives the
>> following error message when run as a part of a email script. Any
>> suggestions as to a cause would be greatly appreciated.
>>
>> SQL10007N Message "-1390" could not be retrieved. Reason code: "3".
>
> This is most likely a problem with setting your environment variables.
> Try:
> DB2INSTANCE=<your_instance>
> export DB2INSTANCE
>

And also check whether the path to the message file has been set correctly
when running the email script.

--
Jeroen


From: Knut Stolze on
The Boss wrote:

> The Boss wrote:
>> Bob Stearns wrote:
>>> I have a script which works from the command line, but gives the
>>> following error message when run as a part of a email script. Any
>>> suggestions as to a cause would be greatly appreciated.
>>>
>>> SQL10007N Message "-1390" could not be retrieved. Reason code: "3".
>>
>> This is most likely a problem with setting your environment variables.
>> Try:
>> DB2INSTANCE=<your_instance>
>> export DB2INSTANCE
>>
>
> And also check whether the path to the message file has been set correctly
> when running the email script.

In short, your DB2 environment is not properly set up. The best way is to
source the db2profile script of the DB2 instance you want to use (note the
leading dot):

.. ~db2inst1/sqllib/db2profile

--
Knut Stolze
DB2 z/OS Utilities Development
IBM Germany