mktemp error

When I execute a korn shell script , I am getting the following error.

"mktemp not found"

Why I am getting this...is this error related to script.

The script contains the command mktemp but your shell can't find it, either because it's not installed, or because your PATH is incomplete.

My script is not containing mktemp...

my common libraries are using.
This script was running previously without error. What should I check for to avoid this error.Do I need to check any environment variables.

so when running how can I avoid this error.

If the script doesn't contain the command, we cannot really guess why it's complaining. Maybe it invokes another command which depends on mktemp. Maybe you could run it with ksh -x scriptname to see what it's doing, at least enough to narrow down which part of the script causes the error message.

mktemp is not POSIX - so if you moved the script from machine A to machine B, especially if B is different, mktemp may not exist, or it may be parked in a directory that supports legacy stuff - ie., not /usr/bin

Jim what you said is correct. If I dont want to specify full path for mktemp, is there any way to make it by default. Like how to make the script to recognize mktemp from /usr/bin.

If the script doesn't have /usr/bin in its path, you can invoke it with

PATH=$PATH:/usr/bin scriptname -options ...

There are more things than mktemp which will not work if you don't have /usr/bin in your PATH as it's the directory where many essential commands are located. (The really absolutely essential are in /bin and some scripts are written to cope with that, but this doesn't sound like one of those scripts.)