rcp error trapping in rsh

I am writing a program which is something like below:

rsh host1 "rcp file dest:directory"

I am running this script from a machine host2.

host1 has rlogin configuration for host2.
but, dest machine has no rlogin configuration for host1 and fails on remote calls.

Could anyone tell me how to trap the exit status of rcp command executed here.

Basically, I wanted to trap the exit status of the actual command executed by rsh.

You could try something like this.

remote_status=$(rsh host1 'rcp file host:/file ; echo $?')

Thanks for the reply but this is not working.

I did a

rsh -n location1 "rcp file location2:/directory;echo $?"
This returns 0 even when the rcp fails.

I connected to location1 through Unix session and at comand prompt(in shell),did

rcp file location2:/directory;echo $?

This retruns 1 when the rcp fails.