Operating System - OpenVMS
cancel
Showing results for 
Search instead for 
Did you mean: 

ssh return codes in dcl script

 
SOLVED
Go to solution
Thomas A. Williams
Regular Advisor

ssh return codes in dcl script

I've got a DCL procedure that creates .COM files, pushes them over via scp, then executest them via SSH. Part of the .COM file grabs the return code and sticks in in a file, to SCP back, because that's the only way I could figure out how to get the status of the remote command. This works MOST of the time, but every now and then, either the file is empty, or never makes it back to the originating node. Has anybody seen this behavior? I'm running VMS 7.3-2 with TCP V5.4 ECO-7. and the SSH ECO 7E patch.
19 REPLIES 19
James R. Ferguson
Acclaimed Contributor

Re: ssh return codes in dcl script

Hi Thomas:

Since this is on a *VMS* operating system, you should post in the *OpenVMS* forum. This is HP-UX.

Ask a moderator to move this post by making a request here:

http://forums12.itrc.hp.com/service/forums/questionanswer.do?threadId=1236703

Regards!

...JRF...
Thomas A. Williams
Regular Advisor

Re: ssh return codes in dcl script

I thought I was in the VMS networking list, sorry.
Matti_Kurkela
Honored Contributor

Re: ssh return codes in dcl script

In any Unix-like environment, the return code of the SSH process will be the same as the return code of the remote process, or 255 if a connection error occurred.

I would expect it to work about the same in the VMS environment, unless VMS explicitly requires different behaviour.

MK
MK
Thomas A. Williams
Regular Advisor

Re: ssh return codes in dcl script

You would expect that. I wish it did. If it worked the way it does in Unix, I wouldn't have to do all this rigamarole.
Jan van den Ende
Honored Contributor

Re: ssh return codes in dcl script

Thomas,

Matti wrote
>>>
or 255 if a connection error occurred.
<<<
and you reacted
>>>
You would expect that. I wish it did.
<<<

Well, THAT would upset ANY VMS status questioning.

In VMS, ANY numeric _ODD_ status is (maybe qualified) _SUCCESS_, and any EVEN status is (maybe severe) ERROR.

So, evaluating a status of value '255' would be considered _successfull_ , for which a call which
>>>
either the file is empty, or never makes it back to the originating node
<<<
does not really qualify.

So, the returm code NEEDS to be translated, or REALLY weird things will happen.

(unlike Unixes, where it is up to the programmer to choose which codes mean what to which program, VMS is (and has always been) much more structured in defining such things).

But, obviously, somewhere some things do not go as expected, meaning either the documentation is not respected, or you have found some documenting or programming bug. (And I do not have the facilities to investigate which one applies here)

Proost.

Have one on me.

jpe


Don't rust yours pelled jacker to fine doll missed aches.