After executing the R3trans -d there will be an output file called trans.log created in the directory where you have run the command. You need to check that file to know why the return code is not 0000.
The gateway service with the port number should be mentioned in the services file.
Regards
RB