From: archana <ar...@am...> - 2003-08-04 07:05:06
|
Where can i download PLSTAF.pm, STAFMon and STAFLog? On Fri, 2003-08-01 at 22:01, Charles Rankin wrote: > > > > > sta...@li... said: > > > Hi, > > Has anyone developed perl scripts using staf? Can anyone guide me with > > sample scripts ? For example a perl program that will do a ftp from > > machine A to machine B while both have STAFProc running on them. > > Please mail me back. > > thanks , > > Archana > > We've got a number of different people/groups that use STAF and Perl. I'm > not sure if any of them follow this list though. :) > > Anyway, if by "ftp" you mean using the STAF FS service to copy a file, then > this should be straightforward in Perl. Here is an example. > > *** Begin sample *** > > use PLSTAF; > > $handle = STAF::STAFHandle->new("MyCopyFile"); > > if ($handle->{rc} != $STAF::kOk) { > print "Error registering with STAF, RC: $handle->{rc}\n"; > return $handle->{rc}; > } > > $result = $handle->submit("local", "fs", "copy file /tmp/xyz tomachine abc > tofile /tmp/def"); > > if ($result->{rc} != $STAF::kOk) { > print "Error on file copy request.\n"; > print "Received RC: $result->{rc}, Result: $result->{result}\n"; > return $result->{rc}; > } > > *** End sample *** > > Let me know if that isn't clear. > > -- > Charles Rankin > I do not speak for IBM > > > > ------------------------------------------------------- > This SF.Net email sponsored by: Free pre-built ASP.NET sites including > Data Reports, E-commerce, Portals, and Forums are available now. > Download today and enter to win an XBOX or Visual Studio .NET. > http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01 > _______________________________________________ > staf-users mailing list > sta...@li... > https://lists.sourceforge.net/lists/listinfo/staf-users |