ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

TCPFTP SSL tips

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #16
    Re: TCPFTP SSL tips

    I don't understand why you are running CPYTOSTMF then ignoring it's output and trying to send from the PF...?

    Also, keep in mind that /QOpenSys is a case-sensitive file system. You can't type stuff in all-uppercase and expect it to work.

    Comment


    • #17
      Re: TCPFTP SSL tips

      Ahh that's a good point.. I have no why i did that.. sorry about that.

      Changed to "test" ( see above edit too)

      Still get FILE TRANSFER FAILED

      Thanks for your help btw.
      Last edited by Huddy; January 21, 2015, 10:06 AM.
      www.midlifegamers.co.uk

      Comment


      • #18
        Re: TCPFTP SSL tips

        In your £string variable, PATH should be all-uppercase, but everything else should be lowercase. You still have a lot in uppercase there.

        As for your "test" file, when you call CPYTOSTMF, you seem to be putting the file into your current directory (since you are not specifying a directory on the CPYTOSTMF command). But in the call to scp, you are specifying / (the root directory). I would never recommend putting stuff in the root directory. Consider having both paths something like /tmp/test.txt

        Comment


        • #19
          Re: TCPFTP SSL tips

          Thanks,

          As for your "test" file, when you call CPYTOSTMF, you seem to be putting the file into your current directory
          I'm still a little confussed by this.

          I copied the the file nd got the following:

          Message . . . . : Object copied.
          Cause . . . . . : Object /QSYS.LIB/PHLIB.LIB/TMPTEST.FILE/TMPTEST.MBR
          successfully copied to object /phlib/test in CCSID 285.
          It says the file test is in phlib but i can't see any object??



          I have changed the command as follows making sure the path is all upper and the rest is lower.. or to match that of unix and put in the phlib..:


          'PATH=$PATH:/QOpenSys/usr/bin && scp /phlib/test username@1.999.999.999:/opt/fids/input/ibis/test.txt'


          Still says it's completed but nothing in the UNIX folder.

          Whilst in writing, I notice there's no login password in the command?

          edit - also what is the &&??

          Thanks
          Last edited by Huddy; January 26, 2015, 04:11 AM.
          www.midlifegamers.co.uk

          Comment


          • #20
            Re: TCPFTP SSL tips

            Originally posted by Huddy View Post
            It says the file test is in phlib but i can't see any object??
            There should be an object, but I hope you understand that /phlib is an IFS directory, not a library? You would look for it like this:

            WRKLNK '/phlib/test*'

            Does that show anything?

            Originally posted by Huddy View Post
            I have changed the command as follows making sure the path is all upper and the rest is lower.. or to match that of unix and put in the phlib..:

            'PATH=$PATH:/QOpenSys/usr/bin && scp /phlib/test username@1.999.999.999:/opt/fids/input/ibis/test.txt'

            Still says it's completed but nothing in the UNIX folder.
            What do you mean by "it's completed"? Earlier you were getting "Command ended normally with exit status 127." which means that it failed spectacularly. The important bit is the "exit status 127". If this were successful, it'd be "exit status 0". Is it succeeding now?

            In Unix, error messages are printed to the screen rather than the job log. So if there are any errors, you'd need to look at the messages sent to the display to understand why it's failing.

            Originally posted by Huddy View Post
            Whilst in writing, I notice there's no login password in the command?
            Normally, when automating stuff like this into a program, the recommended way is to use digital keys instead of passwords. Please take the time to read some of the articles about this that you'll find on my web site http://www.scottklement.com/openssh -- if you do need to use passwords, you're going to need some additional software installed called 'expect', and you'll have to use expect to automate this process instead of merely calling 'scp'. The articles should explain this.

            Originally posted by Huddy View Post
            edit - also what is the &&??
            It means "do the next command if the preceding command was successful".

            Comment

            Working...
            X