ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

copy from IFS directory to QDLS folder

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

  • copy from IFS directory to QDLS folder

    Hi

    Is it possible to copy files from IFS directories to QDLS folders?

    What I did is, I mapped to IFS root through windows, then I copied a document in IFS directory and tried to paste it in QDLS folder. But it is allowing me copy the file.

    Is there anything that I'm missing here?

    Thanks
    Vana

  • #2
    Re: copy from IFS directory to QDLS folder

    I think we are all missing something here.... Why would you copy a file from the IFS to the depreciated QDLS?


    Thanks
    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


    • #3
      Re: copy from IFS directory to QDLS folder

      QDLS (even though it's a "part" of the IFS) works totally different than true IFS. i *think* your bes toption is to CPYFRMIMPF to a temp file then use CPYTOPCD to get it into the QDLS...but as Jamie said...why?? (I'm gonna take a wild guess and say that you are either using SNDDST (which using MMAIL or equivalent to email from the IFS OR you have users with mapped drives to QDLS (if that's the case then just bite the bullet and set them up to map a drive to a directory on the IFS).
      I'm not anti-social, I just don't like people -Tommy Holden

      Comment


      • #4
        Re: copy from IFS directory to QDLS folder

        Hi

        Thanks to Jamie and Tom for your replies.

        I know QDLS is depreciated. But, my current applications uses them. We are working on a temporary solution, before we come up with changes to shift things from QDLS to IFS.

        For this, we are offloading some of the older documents in QDLS folders to IFS. But there is a possibility that users might require some old documents that are offloaded, so they should be able to copy the document from IFS directory (to which it is offloaded) and then copy to QDLS folders (Which is used by application programs).

        So, I was checking whether if I map IFS directory to a user, can they be able to copy the documents from IFS to QDLS or not.

        Hope you got it now.

        Thanks
        Vana

        Comment


        • #5
          Re: copy from IFS directory to QDLS folder

          Hi Vana:

          This worked for me:

          Code:
          CPY OBJ('/tmp/flow.txt') TOOBJ('/qdls/gls/flow.txt')
          Best of Luck
          GLS
          The problem with quotes on the internet is that it is hard to verify their authenticity.....Abraham Lincoln

          Comment


          • #6
            Re: copy from IFS directory to QDLS folder

            this works to

            Code:
            MOV OBJ('qdls/jamie/daily') TOOBJ('/home/jamie/daily.txt')
            you can use this to map a ifs drive automagically from greenscreen
            search the forum for entire example:

            Code:
              *                                                               
             c                   call(e)   'QZLSADFS'                         
             c                   parm      InShareName   ShareName            
             c                   parm      InsharePath   SharePath            
             c                   parm                    PathLength           
             c                   parm      0             PathCCSID            
             c                   parm      InShareText   ShareText            
             c                   parm      2             Permission           
             c                   parm      100           MaxUsers             
             c                   parm                    APIError             
              *
            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: copy from IFS directory to QDLS folder

              Don't forget that QDLS is based on the old 8.3 formats. So, you can't have your cake (like the ifs) and eat it too.

              Comment


              • #8
                Re: copy from IFS directory to QDLS folder

                Hi

                Thanks to all for your replies.

                Commands that you have provided, works fine. But it will be difficult for business user to copy lot of files using these commands.

                I thought if they can map both IFS Diectories and QDLS Folders, then copy documents from IFS to QDLS folders directly in the windows explorer style.

                Do you think its possible?

                Thanks
                Vana

                Comment


                • #9
                  Re: copy from IFS directory to QDLS folder

                  yes you can map a drive to QDLS....but the naming convetion of files in the IFS is very strict.
                  the snippet of code I posted allows you to create IFS shares on a local PC.

                  then the user can copy files directly to the IFS
                  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


                  • #10
                    Re: copy from IFS directory to QDLS folder

                    Thanks Jamie

                    Its working fine now. I was facing problems because I was not having write authority on / directory.

                    Thanks
                    Praveen

                    Comment


                    • #11
                      Re: copy from IFS directory to QDLS folder

                      Jamie and others -

                      I was going to do something similar. I have a formatted text file that I would like to import. I was going to download it to the IFS and then move it to QDLS so that I could use the CPYFRMPCD command.

                      I *thought* that I could use a TRNTBL which is a DDS structure setup so that it defined my .txt file and I could translate the data right into my DB2 file, but I'm struggling with this a bit.

                      Anyway .... should I use another method to get a .txt file into my system? Should I be using an IFS read into a data structure in my RPG?
                      Your friends list is empty!

                      Comment


                      • #12
                        Re: copy from IFS directory to QDLS folder

                        Never mind, I ended up just reading the IFS file row by row.
                        Your friends list is empty!

                        Comment


                        • #13
                          Re: copy from IFS directory to QDLS folder

                          To automate the cpy from the IFS to QDLS, you can use the QIBM_QPWFS_FILE_SERV exit point.
                          Check for the resquested function "X'0001' - Create stream file or directory request".
                          Patrick

                          Comment

                          Working...
                          X