Workload Automation Agents

 View Only

putty's psftp in a .bat file

  • 1.  putty's psftp in a .bat file

    Posted Apr 27, 2021 03:51 PM
    Hello everyone,   looking to see if anyone has run development nt_jobs that have a USER statement and the invoked .bat file  issues a psftp command to transfer 12 files from the agent's wintel box to a linux box.      When the person logs onto the server as USER xyz (same as in the nt_job)  and runs the long psftp command from the DOS prompt all 12 files transfer perfectly.   When run via a wintel cybAgent and nt_job   usually all 12 files wind up on the remote unix box with size of 0kb.  However, to make this real strange,  some times
    when run via the nt_job  half the files are non-zero kb and the correct size...but the other half are still 0kb.

    I can see from the spool file that the psftp is making the connection to the remote linux box every time,  and it issues 12 PUT commands, no errors returned, just sometimes 
    it works sometimes no.   Because he can run the .bat manually and get correct results each time of course they look to why the cybAgent is acting so fickle.
    I've told the user that the cybAgent is not going to pick and choose among his 12 files and decide if some or none will be either works or it doesn't

    One other twilight zone detail,  they have the same nt_job running daily in production except it PUTs the files from a wintel box to a solaris box...the dev one's target is a linux.
    Other than that same psftp string in the .bat except for the name of the target server.

    Anyone out there experience this type of phenomenon with psftp in an nt_job?