Unconfigured Ad Widget

Collapse

Announcement

Collapse
No announcement yet.

FTP negative numbers

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

  • FTP negative numbers

    I have a DDS file I am converting to Excel on a PC. I FTP the file to my FTP server, then open the file in Excel and import the data, specifing the field positions. The problem I am having is with negative numbers. Instead of being saved as -12300 it is being saved as 1230} Then I have to do all kinds of manipulation in Excel to replace the } with a 0 and make it a negative number. How do I get the AS400 to convert it to a negative number? Regards, Jim Langston

  • #2
    FTP negative numbers

    How is the offending field described in your DDS? I had the opposite problem a while back - I had a flat file that was loaded with {'s and }'s. After my program finished massaging the numbers they wound up losing the }'s and {'s. Barbara Morris supplied me with the answer (thanks again!) that involved using MLLZO. In her post dated 04/06/99 (are these still out there?) Barbara said "The AS/400 resognizes your x'c' as a positive sign, but changes it to the preferred sign of x'f' after processing (or when writing it out as zoned numeric)." HTH, Joe

    Comment


    • #3
      FTP negative numbers

      it is defined as Zoned 7 2 (length 2, 2 decimals). According to DSPFFD anyway. Regards, Jim Langston

      Comment


      • #4
        FTP negative numbers

        I played with a similar file on our system and got the same results no matter what I tried......Until I tried the new CPYTOIMPF....it worked great! Would it be practical/possible to use the CPYTOIMPF command?

        Comment


        • #5
          FTP negative numbers

          Unfortunately, I don't think so. We have client access on this box, and supposedly have 10 licenses. but, the licenses are not entered, and I called the people who sold us the box for the licensing information, and they never got back to me. The net effect being, we have Client Access with 0 licenses. I had tried to set up ODBC to the AS/400 from WinNT but kept getting errors, my assumption being because of the lack of licenses. I am somewhat familiar with the IFS and how it works, but it is not something we really need nor want at this point. It would be more of a headache to administer it and ensure security, etc... and since I am it at this shop, I don't want to have to go that route right now. I guess I have a few solutions, none of which I am happy with. 1. Create an intermideary file on the AS/400 and write an RPG to convert the number to a string, and send that new file. 2. Send the file as I am and write something in Excell to convert it. I will probably do 2. But, what a pain. Regards, Jim Langston

          Comment


          • #6
            FTP negative numbers

            I may be dead wrong, but I do not think CA plays a part in CPYTOIMPF. I created a file w/o DDS that was somewhat longer than the file I needed the info from. I then ran the CPYTOIMPF command and it built a delimitted file (the file I created w/o DDS). I then FTP'd that file to the PC and imported it to EXCEL.

            Comment


            • #7
              FTP negative numbers

              Are you transferring the file in BIFF4 format? Dave

              Comment


              • #8
                FTP negative numbers

                I have no idea what format they are being transfered in. ftp 'file-server' user name password put jimconex/apinter.apinter quit It is, of course, ASCII mode and not binary. Regards, Jim Langston

                Comment


                • #9
                  FTP negative numbers

                  Well, I'm on V3R7M0, I do CPYTOIMPF and get Procedure or Command not found. I guess that is one of those new fangled V4RxMx commands. I coulda talked my boss into upgrading to V4RxMx, but with IBM saying once you go to V4 you're going to have to PREPAY for upgrades, it's not financially viable. Regards, Jim Langston

                  Comment


                  • #10
                    FTP negative numbers

                    If you can specify one of the BIFF formats, the resultant file will automatically be in an EXCEL format. No translation within EXCEL is necessary. This should take care of your negative number problem. Dave

                    Comment


                    • #11
                      FTP negative numbers

                      I had understood that BIFF was V4RxMx and not V3R7M0. Am I correct? I haven't even looked for BIFF on V3R7 since I had assumed it wasn't available. Regards, Jim Langston

                      Comment


                      • #12
                        FTP negative numbers

                        Are y'all saying that you can FTP in BIFF format??????? I know you can do a CA download straight to EXCEL, but not FTP.

                        Comment


                        • #13
                          FTP negative numbers

                          I believe BIFF has been available in CA/400 since the first release. Dave

                          Comment


                          • #14
                            FTP negative numbers

                            Joe, You may be right about this one. I have been using CA/400 to do the file transfers, but I thought that file transfers under TCP/IP used FTP under the covers. Dave

                            Comment


                            • #15
                              FTP negative numbers

                              If I can butt in: I believe the pre-V4RX command that will accomplish what you want is CPYTOSTMF, which should convert any zoned decimal numbers correctly into ASCII. As to how EXCEL will interpet said numbers ...

                              Comment

                              Working...
                              X