×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

rcp command

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

RE: rcp command

Michelle:

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

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close