ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

FTPing Source Code without losing the date

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

  • FTPing Source Code without losing the date

    I work in an environment that has multiple Iseries box's (PROD, TEST, DEV). For the time being (this is soon to be changed) much of the source code is on the production box (PROD). I need to get some source code over to the DEV box from the PROD box so I can work on it. However, using FTP strips out the date stamp that shows when each line of code was changed. Can someone suggest a way to get the code over from one box to another. One method that comes to mind is to save the member to a SAVF and then FTP the SAVF file and then restore it, but that is kind of cumbersome. We do not have a change management tool but that is soon to change as well.

  • #2
    Re: FTPing Source Code without losing the date

    We use DDM files linked via Enterprise Extender - super easy - just copy source to the DDM-connected source file, and it shows up in the other LPAR's source file, dates intact.

    Cheers,

    Emmanuel

    Comment


    • #3
      Re: FTPing Source Code without losing the date

      Greg

      The problem with using the save file method is how to monitor when to copy the save file over each time it changes on the other? We developed a couple of utilities we use in-house to carry this out for us, not just for source files but all other objects as well. (we have a dev box and distribute out to test systems). The process is fairly simple as we wrote a SEU option that would call the replication process each time we were ready for the replication to be carried out. I am not trying to sell via the forums but it is available for sale as our RE4i product, if you want to trial it let me know. The replication can be at the member level so it saves some overhead at sites with large source files that have lots of members.

      Chris...

      Comment


      • #4
        Re: FTPing Source Code without losing the date

        You could also try the SAVRSTOBJ command - we use this everyday to retain member dates between Test and Production:

        SAVRSTOBJ OBJ(&LIBRARY) LIB(CHGMGT) +
        RMTLOCNAME(&RMTID) OBJTYPE(*FILE) +
        FILEMBR((&LIBRARY (&MEMBER))) ACCPTH(*NO) +
        MBROPT(*NEW) ALWOBJDIF(*ALL)

        Comment


        • #5
          Re: FTPing Source Code without losing the date

          Make sure you have the additional option installed for the SAVRSTOBJ capabilities (Object Connect) We wrote a blog entry on using it http://www.shieldadvanced.com/Blog/a...tween-systems/ and it was a bit slow in our tests?

          Chris...

          Comment


          • #6
            Re: FTPing Source Code without losing the date

            Ooops...forgot to mention Object Connect...thanks Chris!

            I agree that its not the speediest method but if your only moving a few members every day its not too bad.

            I've noticed that once a connection is made for the first member moved (say from Test to Production), subsequent movement is much quicker for the duration of your session

            Comment


            • #7
              Re: FTPing Source Code without losing the date

              Terry

              I think the other restriction we came across was the lack of TCP/IP support? I checked again and it only seems to support SNA bound traffic?? Could be wrong and there could be another command I am missing? Should not take too much to set up SNA though..

              Chris...

              Comment


              • #8
                Re: FTPing Source Code without losing the date

                One solution is to write a program (or script, etc) that saves the member(s) to a temporary save file and then FTPs that to a temporary location and restores it on the other box. That would allow you to use FTP in the same manner as SAVRSTOBJ -- without the SNA baggage.

                Another solution is to use CPYF to copy the source member to a flat file, then you can keep the extra source member fields like line number and date when you copy them.

                Another solution is to get a change management package and then the dates won't matter anymore because the change management will have much better ways of tracking the dates. This is the best solution, IMHO. Those dates are not really that useful, honestly. They don't tell you very much (like, what was actually changed, if it was significant, etc) once you have a proper change management solution in place, you won't care about those dates, you'll have so much more/better information.

                Comment


                • #9
                  Re: FTPing Source Code without losing the date

                  You could also use SAVRSTFTP... which is a nice wrapper on top of Scott's FTPAPI.
                  You just need to mod it a little for specific members and to make the password not visible.
                  The source is all here (the article is in German though) ... http://www.midrangemagazin.de/mm/art...2&SID=cscrvepf
                  Regards

                  Kit
                  http://www.ecofitonline.com
                  DeskfIT - ChangefIT - XrefIT
                  ___________________________________
                  There are only 3 kinds of people -
                  Those that can count and those that can't.

                  Comment


                  • #10
                    Re: FTPing Source Code without losing the date

                    I checked again and it only seems to support SNA bound traffic??
                    True...it works via SNA so it will require SNA to be setup first. I then have a simple PDM option (XF) that runs remote commands to archive the production code, transfer the test source member, log an entry into a database with a date/time stamp, etc. - a simple, mini change control system to satisfy the auditors...

                    As Scott indicated, you could use FTP as the transport mechanism instead of SNA. There are plenty of ways to script FTP using his API's...especially if your an RPG'er.

                    Comment


                    • #11
                      Re: FTPing Source Code without losing the date

                      Terry

                      Not an RPG'er :-) but scripting up the FTP is very simple. I wrote a FTP Client with password protection and lots more in C, so ANYTHING is possible (That's why this is such a great box..)

                      Chris..

                      Comment


                      • #12
                        Re: FTPing Source Code without losing the date

                        Originally posted by chris_hird View Post
                        (That's why this is such a great box..)
                        Now *that* is an understatement :-)

                        Comment

                        Working...
                        X