ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Moving a formatted xls file to the IFS

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

  • Moving a formatted xls file to the IFS

    Okay, I'm creating a formatted XLS file and I need to get the formatted xls file to the IFS for transfer to an FTP site. I'm assuming its possible, I just don't have the slightest clue what to do and I'm not sure what to search for on the web. I've tried Copying xls to IFS, and moving xls to IFS but the examples I have found refer to xls files that have data to be imported or exported.

    In my case, we've built the data and now we've put in banners and formatting and such to make it "pretty" for the client, and we manually move it to the folder for transfer to the FTP site. I want to automate the move ..... can this be done?

    Thanks
    Roxann

  • #2
    Re: Moving a formatted xls file to the IFS

    Question;
    You created the xls file on the IFS right? because if you have not, then I don't know how to create a XLS file in a data base file.
    From where are you manually moving the file from? A simple Mov is used to move one file on the ifs from a folder to a different folder.
    Hunting down the future ms. Ex DeadManWalks. *certain restrictions apply

    Comment


    • #3
      Re: Moving a formatted xls file to the IFS

      Hi Eric --- You know how you created the report server, and it creates the bannered excel file. I need to be able to get that excel file to the IFS cdburn folder so that I can send the report along with the invoices to the client.

      Right now we have the excel file being emailed to the user who runs the program and then we manually drag and drop the file into the cdburn folder. I want to be able to automatically have the excel file not only email to billing so that they have their standard copy but also put one in the CDBURN folder so a copy goes to the client as well.

      I'm looking at the COPY command :


      0045.01 IF (&PEmail3 *EQ 'IFSCOPY') DO
      0046.00 COPY OBJ(&MYIFS) TODIR(&Xlsbody03) REPLACE(*YES)
      0047.00
      0048.01 ENDDO

      Not sure if this will work but I thought I'd give it a try - I'm putting the code in the PC001C01 program you wrote -- just before the RMVLNK(&MYIFS)

      Rox

      --- Laura says hello.

      Comment


      • #4
        Re: Moving a formatted xls file to the IFS

        if it's already in the IFS CPY would work or if it's no longer needed in the original directory just use MOV

        and tell Laura I said hello back lol
        I'm not anti-social, I just don't like people -Tommy Holden

        Comment


        • #5
          Re: Moving a formatted xls file to the IFS

          Hello --- finally testing and its not working. I've tried the MOV command and I switched back to the COPY command and I am getting the same error:

          Additional Message Information

          Message ID . . . . . . : CPFA0A7 Severity . . . . . . . : 40
          Message type . . . . . : Escape
          Date sent . . . . . . : 03/01/12 Time sent . . . . . . : 16:17:50

          Message . . . . : Path name too long.
          Cause . . . . . : Path /QDLS/CDBURN/BURJD01/Glazer_20120301.xls has one or
          more components that exceed maximum size allowed by the file system.
          Recovery . . . : Correct the error and retry the operation.

          What's wrong with my path name? The above is 44 long and the field is 50 long so I'm confused .... and I'm only passing the /QDLS/CDBURN/BURJD01 as the directory name. It's getting the Glazer_2012... from the object name.

          Here's the snapshot of the code:

          0044.01
          0044.02 If (&PIFSDir *NE ' ') DO
          0044.03 CPY OBJ(&MYIFS) TODIR(&PIFSDIR) REPLACE(*YES) +
          0044.04 OWNER(*KEEP) AUT(*OBJ)
          0044.05 EndDo

          Thanks
          Roxann

          Comment


          • #6
            Re: Moving a formatted xls file to the IFS

            thats cause you are using QDLS and not the root...
            QDLS only allows names of like 8 *char and 3 for extension or something
            Ridiculous like that.

            Try ROOT no such limitations exist!

            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: Moving a formatted xls file to the IFS

              Thanks Jamie -- just figured that out.

              My co-worker got it working by shortening the name on the spreadsheet. So I have to keep this working temporarily while I identify all the programs we currently have in place that use the \QDLS\CDBURN processing so I can get all of them changed to use CDBURN in the root and then I can change this. No small feat by any means ... but definitely doable.

              Thanks for all the help everyone!

              Roxann

              Comment


              • #8
                Re: Moving a formatted xls file to the IFS

                Hey Rox, a good while back we moved all the processes to use the /root. I see that we left the qdls, but when I left there were no cd burn processes that used that location.

                Good luck.
                Hunting down the future ms. Ex DeadManWalks. *certain restrictions apply

                Comment


                • #9
                  Re: Moving a formatted xls file to the IFS

                  @DeadMan -- oh how I wish things were the way they were when you left. I had thought that was the way that it was .... I had thought you had changed it but alas one of your former co-workers (and not I) made changes to the CDBURN process and EVERYTHING got changed back the old way. Why ..... I haven't a clue..... but I get the "FUN" project of switching it all back to /root.

                  There are many days that I do a lot of because I simply do not understand why my co-workers are doing what they are doing. Which is why they moved me into my own office .... they were worried I was going to stress my heart out too much.... I still but no one knows I'm doing it.

                  We just finished reviews for this year..... I had my best review of my entire career .... feels good .... but you'll find this funny .... I was told I need to learn how to be a bit more tactful apparently your former co-workers don't like me being quite so direct with my responses -- they say I'm not playing nice in the sandbox. Really... I was always thought you and I played well together. Go figure...

                  Have a great day! It's warm and sunny here today....

                  Comment


                  • #10
                    Re: Moving a formatted xls file to the IFS

                    lol when i do interviews or reviews I make sure to let the interviewer/reviewer be aware that I'm not the type of person you want face-to-face with users on a consistent basis (sometimes that also applies to fellow IT employees )
                    I'm not anti-social, I just don't like people -Tommy Holden

                    Comment


                    • #11
                      Re: Moving a formatted xls file to the IFS

                      Originally posted by tomholden View Post
                      I'm not the type of person you want face-to-face with users on a consistent basis
                      Wow! ...and I thought I was alone in this regard...lol

                      My preference is to let management know that I "speak what I am thinking". Very few people do this any more...its a lost personality characteristic in the new "politically correct" world...

                      Comment


                      • #12
                        Re: Moving a formatted xls file to the IFS

                        Originally posted by Terry Wincheste View Post
                        Wow! ...and I thought I was alone in this regard...lol

                        My preference is to let management know that I "speak what I am thinking". Very few people do this any more...its a lost personality characteristic in the new "politically correct" world...
                        better to warn them upfront than get a nasty surprise when an idiot comes at them full bore complaining that their feelings were "hurt" (political correctness is a plague upon society, people are just way too friggin "thin-skinned" grow up, grow a pair, man up, whatever you decide upon ) if people are too afraid to say what they mean then what good is "Freedom of speech"? we've been "censored by proxy"...
                        I'm not anti-social, I just don't like people -Tommy Holden

                        Comment


                        • #13
                          Re: Moving a formatted xls file to the IFS

                          I agree completely!

                          Comment


                          • #14
                            Re: Moving a formatted xls file to the IFS

                            Originally posted by tomholden View Post
                            better to warn them upfront than get a nasty surprise when an idiot comes at them full bore complaining that their feelings were "hurt" (political correctness is a plague upon society, people are just way too friggin "thin-skinned" grow up, grow a pair, man up, whatever you decide upon ) if people are too afraid to say what they mean then what good is "Freedom of speech"? we've been "censored by proxy"...
                            Now where's that "like" button?
                            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

                            Working...
                            X