Unconfigured Ad Widget

Collapse

Announcement

Collapse
No announcement yet.

Automating data transfer from AS/400 to PC

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

  • Automating data transfer from AS/400 to PC

    You can use the RUNCMD executable from the PC. This comes with CA/400 and is in the c:windows directory. Dave

  • #2
    Automating data transfer from AS/400 to PC

    Julie, Haven't you tried zipping the files? I have seen gigabyte-sized text files shrunk to 100 Mb and less. Plus, you can easily implement encryption (if needed). You could use the RUNRMTCMD. However, if you regularly send large volumes of files, I would suggest a different approach: 1. CPYTOIMPF all files to folders (use separate folders per destination). 2. FTP a one-byte dummy file to a "Trigger" folder in a PC-server. (use separate trigger-file-names per distination.) 3. A PC program checks the trigger folder every 5 or 10 minutes. If a specific trigger file is found, the program will access the corresponding AS/400 folder, zip each file and ftp them to the pre-defined location, after which the trigger file is deleted. 4. All downloaded files are archived and deleted at the end of the day. Although this approach is initially much more involved than your present method, you will find it far more convenient and efficient in the long run. The only problem I have experienced with this approach is that after several months of heavy usage, the PC program would sometimes hang, or else the PC-server would crash. But this should not be a problem if you have proper contingency procedures and resources in place.

    Comment


    • #3
      Automating data transfer from AS/400 to PC

      Ric, Thank you for your response, I really appreciate it ! You are right ! we could zip the files first prior to FTP. Can you tell me what kind of PC program you are using or are available to monitor the "trigger folder" ? What kind of software are you using to Zip the files ? Thank you again for your help, Julie

      Comment


      • #4
        Automating data transfer from AS/400 to PC

        A PC need not be involved since the AS/400 has it's own FTP and zipping abilities. Try the java command 'jar' or 'ajar'. Note that java does not co-operate with QDLS folders so you may have to choose a working folder other than the traditional document folders.

        Comment


        • #5
          Automating data transfer from AS/400 to PC

          Julie, The client used PKZIP to compress the files. They coded a PC application using Visual Basic to monitor the trigger folder and email/ftp data to various users/customers in a variety of data formats (plain-text, excel, word, etc.). I think they plan to include PDF format sometime this year. The original design called for a program-generated DOS batch script to do this. Unfortunately the developers could not find a command to make the program "sleep" during each wait interval. Looping the program by several hundred cycles could work, but this can't be good for the cpu and this would prevent the server from doing any other meaningful tasks.

          Comment


          • #6
            Automating data transfer from AS/400 to PC

            Ric, Thank you again for taking the time to give me these tips.. I really appreciate it. You've giving me some great ideas.. and I will look into using VB ! thank you, Julie

            Comment


            • #7
              Automating data transfer from AS/400 to PC

              Vicent, Thank you for taking the time to response.. I have heard of using the java command 'jar' to zip the files. Unfortunately, I am not an expert when it comes to java. I will however look into this some more, maybe it's not so hard ? Thank you again, Julie

              Comment


              • #8
                Automating data transfer from AS/400 to PC

                What does the different options meand? RTOPCB /S/F and are there others? When I run this command from a AS400 command line is works perfectly. If I put it into a cl it does not. Any ideas?

                Comment


                • #9
                  Automating data transfer from AS/400 to PC

                  If you have QSH (Qshell) loaded on your AS/400, you can easily zip the files. Just put this command in your batch job that creates the documents. QSH CMD('cd /qdls/myStuff; jar -cvf myFiles.jar myfile1.doc myfiles2.* otherFile.xls')
                  1. "cd /qdls/myStuff" changes your currect directory
                  2. ";" separates commands.
                  3. "jar..." zips the files. "-cvf" means create, verbose, specify the jar file name which is myFiles.jar. Then just list the files you want zipped in the folder /qdls/mystuff.
                  Once, you create /qdls/myStuff/myFiles.jar, you can view it with WinZip on a PC. To see if QSH is loaded on your AS/400, just type QSH and hit enter. If the QSH environment appears, hit F3 to exit it. Chris

                  Comment


                  • #10
                    Automating data transfer from AS/400 to PC

                    Chris, It looks like I do have QSH loaded ! THANK YOU for the detail instructions... I really appreciate this !!! Julie

                    Comment


                    • #11
                      Automating data transfer from AS/400 to PC

                      Julie, You have the QShell Interpreter (QSH), but you might not have the Java Toolkit installed. You need the toolkit to run the JAR command. If you don't have it, you can install it from your AS/400 Installation CDs. Just be sure to apply your latest cum-PTFs to avoid problems. Something to watch out for: Whenever you run the QSH command, it "spawns" a separate job within the same subsystem. So, if you ran QSH interactively (inside your QINTER subsystem), and ran WRKACTJOB SBS(QINTER), you will see another job named QZSHSH running with your user-id. This "child" job is needed for QSH to run properly and will self-terminate after you exit from the QSH job. If you run the QSH command inside a subsystem with a limit for "maximum jobs in subsystem", there might not be sufficient allowance for the "child job" and this will cause your QSH execution to fail.

                      Comment


                      • #12
                        Automating data transfer from AS/400 to PC

                        Ric, Thank you for the additional info, I would have never known that !! Thanks, Julie

                        Comment


                        • #13
                          Automating data transfer from AS/400 to PC

                          > What does the different options meand? RTOPCB /S/F and are there others? > When I run this command from a AS400 command line is works perfectly. If I put it into a cl it does not. > Any ideas? As noted in another reply to this question, it sounds like you are describing the PC program and not an AS400 command or program. Is this really the PC program or are you sure this an AS400 command/program? Bill

                          Comment


                          • #14
                            Automating data transfer from AS/400 to PC

                            Here is a link that describes the different switches to use with the RTOPCB command. As far as I know, this is a PC program. http://www.redbooks.ibm.com/tstudio/ca400/rtopcb.htm

                            Comment


                            • #15
                              Automating data transfer from AS/400 to PC

                              Assuming you are "pulling from" the PC rather than "pushing from" the AS/400, why don't you just use the PC's Task Scheduler and create a job that runs RTOPCB for the appropriate .DTF (or .TTO) file.

                              Comment

                              Working...
                              X