1833747 Members
2880 Online
110063 Solutions
New Discussion

remsh?

 
SOLVED
Go to solution
Terry Kummell
Advisor

remsh?

I have two HP-UX 10.20 systems. From systema I enter the following:
remsh systemb -n doit

doit is a shell script that looks like this:
cd /a/b/c/d
domore
echo "do it done"

domore is a shell script that resides in directory /a/b/c/d and looks like this
upgm udata
echo "do more done"

upgm is a unikix cobol program that accesses data in the udata file. When
I proceed as above, I get an error.

START

Execution error : file 'udata.int'
error code: 114, pc=235, call=1, seg=0
114 Attempt to access item beyond bounds of memory (Signal 10)

HP/MF COBOL Version: B.12.25
HP-UX triserv B.10.20 E 9000/899
pid: 12246 gid: 101 uid: 107
Wed Aug 16 08:08:55 2000
8:08am up 22 days, 10:08, 172 users, load average: 1.28, 0.83, 0.99
Thread mode: No Threads
RTS Error: COBOL
Sync Signals: COBOL
ASync Signals: COBOL
cobtidy on exception: False

do more done
do it done

However, if I logon to systemb and enter doit, everything works okay! I suspect that so environment variable is to blame. To diagnose that, I inserted echo "`pwd`" commands into doit and domore. They both show directory /a/b/c/d. Any ideas?
TIA
Terry Kummell
3 REPLIES 3
Antoanetta Naghiu
Esteemed Contributor

Re: remsh?

remsh is doing the job. Try to set up the path required in your script. (path to cobol, or apps). PATH=$PATH:/whatever/you/need:/plus/more
Kofi ARTHIABAH
Honored Contributor
Solution

Re: remsh?

Terry:

The problem is that remsh does not inherit the environment (which you inherit when you rlogin - ie. there is no equivalent for .profile) so you would have to set the environments... PATH as described above, as well as any SHLIB_PATH etc.

actually, you might want to rlogin to the box and type env, so that you know what variables to set.

Good luck
nothing wrong with me that a few lines of code cannot fix!
Terry Kummell
Advisor

Re: remsh?

The issue was two environmenet variables. One for informix and the other was the PATH. I took your advice and used rlogin then env to find out what the working environmente looked like. Then, I just modified the shell script to add these variables. I was able to simplify the shell script by incorporating the domore shell script in the doit shell script. So my final shell script looks like this:

PATH=/all/sorts/of/path/stuff/plus/my/working/directory
INFORMIXDIR=/informixdir/
export PATH INFORMIXDIR
cd /a/b/c/d
upgm udata

and all is well! Thanks for the help!

Terry Kummell