ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Data transfer from outside source

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

  • Data transfer from outside source

    Please forgive me if this is in the wrong section.
    I am new to AS400. I have a following project:

    We are Kitchen cabinetry manufacturer. Distributors sitting outside of our network are using a proprietary CAD software on Windows PCs. When they are done with their CAD design, they launch a utility that allows them to export their item list along with another necessary information to an XML file. That XML file gets loaded into another Windows based program where they do additional data finessing that initially will become a Purchase Order.
    Next step is where we have a problem. How to get that data to us and in what format?
    We have iSeries 5.4 on our AS400 with WebSpehere. How do I transfer data to AS400? Do I have to create an FTP server, and then create a tunnel through my firewall? In that case, how do I create an FTP server on iSeries? If not, what are other ways of doing this?
    Do, I send the data in XML format and have a programmer work with it?

    If you can shed some light, that would be greatly appreciated!

    Thank you

  • #2
    Re: Data transfer from outside source

    you could map a drive to the IFS, FTP (no need to install a server, just STRTCPSVR *FTP is sufficient).

    the data can be processed directly from the IFS as an XML file, or you can stick it into a flat file, etc. your choice (go with the direct XML...but that's just my opinion)
    I'm not anti-social, I just don't like people -Tommy Holden

    Comment


    • #3
      Re: Data transfer from outside source

      Mike,

      I don't think I'd want anyone from the outside having FTP access to my production box....

      Many years ago we had a filemaker app that would create orders in XML/csv (cant remember) and email them to a specific
      email address..... (back then it was a linux box) the email attachment was removed, processed and then
      placed on the IFS (Iseries) (shared drive of iseries mapped on server)..
      On the Iseries there was a never ending program that would process the XML into
      iseries tables.... we didn't have this: (which is available to you on V5R4)


      --- You do have FTP the server is most likely not started
      PHP Code:
      STRTCPSRV *FTP 
      then from pc try to FTP in..
      PHP Code:

         XML
      -Into Customer %XML('/home/jamie/xml.xml' :                 
                                
      'case=any ' +                           
                                
      ' doc=file path=jamielib/Customer' +    
                                
      ' allowmissing=yes'); 
      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


      • #4
        Re: Data transfer from outside source

        Originally posted by tomholden View Post
        you could map a drive to the IFS, FTP (no need to install a server, just STRTCPSVR *FTP is sufficient).

        the data can be processed directly from the IFS as an XML file, or you can stick it into a flat file, etc. your choice (go with the direct XML...but that's just my opinion)
        How do Distributor user map a drive to something that is not part of his/her network. I am confused!

        Comment


        • #5
          Re: Data transfer from outside source

          Originally posted by jamief View Post
          Mike,

          I don't think I'd want anyone from the outside having FTP access to my production box....
          I agree. Would it be better if I setup a Windows based FTP server, and then upload it there? Then have a process that moves it to the production box?

          Originally posted by jamief View Post
          Many years ago we had a filemaker app that would create orders in XML/csv (cant remember) and email them to a specific
          email address..... (back then it was a linux box) the email attachment was removed, processed and then
          placed on the IFS (Iseries) (shared drive of iseries mapped on server)..
          On the Iseries there was a never ending program that would process the XML into
          iseries tables.... we didn't have this: (which is available to you on V5R4)


          --- You do have FTP the server is most likely not started
          PHP Code:
          STRTCPSRV *FTP 
          then from pc try to FTP in..
          PHP Code:

             XML
          -Into Customer %XML('/home/jamie/xml.xml' :                 
                                    
          'case=any ' +                           
                                    
          ' doc=file path=jamielib/Customer' +    
                                    
          ' allowmissing=yes'); 
          jamie
          When I start the FTP server, how do I get access to it? What would be the address syntax?

          Thanks

          Comment


          • #6
            Re: Data transfer from outside source

            bring up the cmd prompt on the PC and just

            FTP to the IP of the iseries
            it will next ask you for an userid and password....
            then type BIN for binary.... I can help you get to ifs once you get this far..

            I had the outside guys email to a server to a "specific address" then stripped the attachment off and processed.

            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


            • #7
              Re: Data transfer from outside source

              I have several homebuilder clients that export item lists from their CAD/Estimating software and need to import it into their i5. I've developed a solution for them that should work for you. It's not automated; it requires a human to click on some buttons and verify that any errors are removed before the upload occurs. But it's simple enough for an entry-level accounting clerk to use.

              I can't give away the solution; my boss would not look too kindly on that. But send me a private message through this forum if you're interested in hearing more.
              "Time passes, but sometimes it beats the <crap> out of you as it goes."

              Comment


              • #8
                Re: Data transfer from outside source

                Originally posted by littlepd View Post
                ...send me a private message through this forum if you're interested in hearing more.
                PM sent. Thank you!

                Comment


                • #9
                  Re: Data transfer from outside source

                  Originally posted by jamief View Post
                  bring up the cmd prompt on the PC and just

                  FTP to the IP of the iseries
                  it will next ask you for an userid and password....
                  then type BIN for binary.... I can help you get to ifs once you get this far..

                  I had the outside guys email to a server to a "specific address" then stripped the attachment off and processed.

                  jamie
                  OK. I got that far. What's next?

                  Comment


                  • #10
                    Re: Data transfer from outside source

                    please review this thread...


                    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


                    • #11
                      Re: Data transfer from outside source

                      Originally posted by mikeyank
                      Next step is where we have a problem. How to get that data to us and in what format?
                      We have iSeries 5.4 on our AS400 with WebSpehere.
                      WoW!! You have everything setup on your i5 already. Why aren't you deploy a WebService on your i5 and ask them to consume your WebService to send the data....
                      As if the security are top concerns, No need to open the unnecessary port to outside world or setup another Windows server to receive your data. WebService traffic can be secured at the transport level or message level easily with WebSphere on i5

                      Thanks

                      Comment


                      • #12
                        Re: Data transfer from outside source

                        Originally posted by dhanuxp View Post
                        WoW!! You have everything setup on your i5 already. Why aren't you deploy a WebService on your i5 and ask them to consume your WebService to send the data....
                        As if the security are top concerns, No need to open the unnecessary port to outside world or setup another Windows server to receive your data. WebService traffic can be secured at the transport level or message level easily with WebSphere on i5

                        Thanks

                        Please elaborate as much as possible.

                        Comment


                        • #13
                          Re: Data transfer from outside source

                          You can use RAD 7 or WDSC with WAS for this tutorial & deploy it on WAS to see how easy pass values to the i5...
                          BottomUpWebService

                          Comment


                          • #14
                            Re: Data transfer from outside source

                            hey MikeYank:

                            What are you going to do with the XML file once it is in the IFS?
                            You can use the XML-INTO as Jamie suggested however there is a learning curve with that.

                            I would suggest you convert the xml into a csv and use that.
                            1. Start a new excel workbook
                            2. depending on what version of excel....Get External data/from other sources/from xml data import
                            3. allow excel to create the schema based on the xml source data
                            4. follow the prompts and place data starting in $a$1
                            5. Save as msdos .csv
                            6. Use the same FTP discussed above
                            7. create a physical file on the Iseries using the layout as dictated on the CSV
                            8. CPYFRMIMPF FROMSTMF('/home/mydir/mycsv.csv') +
                            TOFILE(mylib/myfile) RCDDLM(*CRLF) +
                            FROMRCD(2) RPLNULLVAL(*FLDDFT)
                            now your data is in a file format that you can use.

                            Just a thought

                            Best of Luck
                            GLS
                            The problem with quotes on the internet is that it is hard to verify their authenticity.....Abraham Lincoln

                            Comment


                            • #15
                              Re: Data transfer from outside source

                              I have to recommend our company's solution, RPG-XML Suite at www.rpg-xml.com.

                              You'd be able to set up a web service painlessly on your IBM i, and have your distributors send their XML requests to it. Our suite allows you to easily parse the XML, allowing you to do whatever you want to on your IBM i with your new data.

                              Best of all - it's 100% RPG, no Java, no WebSphere, just our software package. We also offer free custom proof of concept code to demonstrate how to use our software to implement your specific needs.

                              If you'd like to get more info or discuss a bit further, feel free to send me a PM, or you can email me at ataylor@krengeltech.com. We have many clients and a large amount of experience working on the i, and I'm confident we could quickly get a solution in place that'd meet your needs.

                              Thanks!

                              Comment

                              Working...
                              X