ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Running a remote command on an Unix Server from AS/400

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

  • Running a remote command on an Unix Server from AS/400

    Hi Guys

    Hope you are in the pink.I need to invoke a shell script in a remote UNIX box from AS/400.I tried the ftp sub command QUOTE but I am getting the error 'Command not understood'.Could anyone tell me how to do this?

    I dont want to use RUNRMTCMD coz I am not using Client Access and I want this to do this via FTP.

    Thanks in advance.

    Happy Xmas.

    Regards
    Nanda.

  • #2
    Re: Running a remote command on an Unix Server from AS/400

    Hey Nanda ...

    This can be done, but it has to be done by osmosis. In a word, you have to have a job that checks for a script file on the Unix box. Once it finds the script, have it execute the line items inside that script.

    That way, all you have to do is send that script to the Unix box and kick it off. This script could be associated with a "Flag" file or something similar. I think the key is having a something that is running continuously on the Unix box (like a DOS Service) to check for this script.

    -Rick

    Comment


    • #3
      Re: Running a remote command on an Unix Server from AS/400

      Hi FastOne

      Thanks for the reply.There will be only one script file for example testscript.sh which will unzip the files present in that directory.I wanted to invoke 'testscript.sh' once I have ftped my zip file to the Unix box so that the script when ran will unzip the files.

      Could you plz tell me how to do this?

      Thank You

      Regards
      Nanda

      Comment


      • #4
        Re: Running a remote command on an Unix Server from AS/400

        Create your script 'testscript.sh' on the Unix box some place.

        Have your Admin create a NEP (Never Ending Program) on your Unix box. Have this job look for a flag file that you FTP to the Unix box whenever you want the script to run.

        Let's say the NEP above wakes up every 10 minutes and checks for the flag. If it sees the Flag File you send down from your ISeries, all it does is evoke the 'testscript.sh'. Make sure you have 'testscript.sh' delete the flag file once it finishes. That way, to kick it off.. have your ISeries send down a blank file to the Unix box as the "flag" whenever you need this job to run.

        -Rick

        Comment


        • #5
          Re: Running a remote command on an Unix Server from AS/400

          Hi Fastone

          Thanks a lot for ur reply.

          Happy Xmas

          Have fun

          Regards
          Nanda.

          Comment


          • #6
            Re: Running a remote command on an Unix Server from AS/400

            Hi nand

            How ru? it is working are not? send mail id or urs..

            have a nice day
            magesh

            Comment


            • #7
              Re: Running a remote command on an Unix Server from AS/400

              Hi nand

              How ru? it is working are not? send mail id of urs..

              have a nice day
              magesh

              Comment

              Working...
              X