rcp command
rcp command
(OP)
During a report run I would like the user to have a option to send the file to the printer or to a file. I would also like to be able to get the file to be copied to the user directory, does anybody know if this is possible. I looked into using the rcp command within the 4gl coding.
Many thanks
Michelle
Many thanks
Michelle
RE: rcp command
From within native Informix 4GL, you can execute any valid Unix command, but the return values are limited. This example rcp's file /tmp/tx from the current server to the e4dc server:
main
define
scratch char(80),
ret_int integer
let scratch = "rcp /tmp/tx e4dc:/tmp"
run scratch returning ret_int
if ret_int != 0
then
display "error"
end if
end main
If the command fails for some reason a non zero code returns to the calling program.
4GL is poor when comes to interacting with the OS. I've posted a FAQ in Informix Online forum which discusses interfacing "C" functions to access the OS. Even with my FAQ, the learning curve could be a little steep, but it might be worth investigating.
Regards,
Ed