ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Using the IFS

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

  • Using the IFS

    I've been trying to add functionality so that the UPS tracking page displays automatically when a tracking number is supplied.

    I create a small .bat file that I run with the STRPCCMD command. It was suggested that this be stored in the IFS. I now have it there, but how do I point to it to execute it?

    Thanks,
    Chas

  • #2
    Re: Using the IFS

    From the PC use it just like any other network resource. Map a network drive to the IFS directory or use the URL "\\youriSeries\NetWorkShare\YourBat.Bat".

    Just make sure the iSeries Netserver is running STRTCPSVR SERVER(*NETSVR) and of course the user has the authority.

    I see a few clients never use the IFS. Some don't even know it exists. I use extensively.

    Good Luck
    Bill
    Bill
    "A good friend will bail you out of jail,
    A true friend would be sitting beside you saying,
    'Wow, that was fun.'"

    Comment


    • #3
      Re: Using the IFS

      As per my knowledge, yot can't run directly bat file on IFS using AS400 command.

      So Keep a main batch file on PC and execute that main batch file using STRPCCMD.

      But in that main batch file provide the script to connect to AS400 IFS folder and executing the BAT file in that folder.

      Its a two way process and as of now this is the only idea hitting my mind.
      Thanks,
      Giri

      Comment


      • #4
        Re: Using the IFS

        Thanks, but for now I've just moved my batch file out to a commonly mapped network server.

        I can get it to run and bring up the tracking information, but it leaves a C:\\WINNT\system32\cmd.exe window open. Is there some way to get this to close?

        Comment


        • #5
          Re: Using the IFS

          When you are using STRPCCMD command
          use PAUSE(*NO)
          Thanks,
          Giri

          Comment


          • #6
            Re: Using the IFS

            Yes, I am doing that. This is from Debug just before the call to QCAEXEC.

            STRPCCMD PCCMD('START t:\IS_Utilities\ups.bat 1Z05E3950363931603 ') PAUSE(*NO)

            I must still have something else out of whack.

            Chas

            Comment


            • #7
              Re: Using the IFS

              I figured it out. I needed an EXIT at the end of the .bat process.

              Comment


              • #8
                Re: Using the IFS

                Chas can you post the source ?

                Thanks
                jamie
                All my answers were extracted from the "Big Dummy's Guide to the As400"
                and I take no responsibility for any of them.

                www.code400.com

                Comment


                • #9
                  Re: Using the IFS

                  Originally posted by giri View Post
                  As per my knowledge, yot can't run directly bat file on IFS using AS400 command.

                  So Keep a main batch file on PC and execute that main batch file using STRPCCMD.

                  But in that main batch file provide the script to connect to AS400 IFS folder and executing the BAT file in that folder.

                  Its a two way process and as of now this is the only idea hitting my mind.

                  Just tested this and I can run any file from:

                  1) a mapped network drive to the IFS strpccmd pccmd('T:\MyDirectory\Batch.bat')
                  or
                  2) using URL strpccmd pccmd('\\MyiSeries\Myshare\Mydirectory\MyBatch.bat ')

                  Works fine.
                  Good Luck
                  Bill
                  Bill
                  "A good friend will bail you out of jail,
                  A true friend would be sitting beside you saying,
                  'Wow, that was fun.'"

                  Comment

                  Working...
                  X