ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

cpy from savf to network file

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

  • cpy from savf to network file

    Hi All:

    I'm trying to copy a save file to a network share.

    PHP Code:
     CPY OBJ('\\qsys.lib\savlib2.lib\ebs.file'TODIR('//qntc/fcofiles/iseries/'TOCCSID(1252REPLACE(*YES
    I can watch the file grow in size in the qntc folder and when it is about to complete I get the following error:

    PHP Code:
    Message ID . . . . . . :   CPFA0AD       Severity . . . . . . . :   40        
    Message type 
    . . . . . :   Information                                        
    Date sent  
    . . . . . . :   02/10/16      Time sent  . . . . . . :   14:03:28  
                                                                                  
    Message 
    . . . . :   Function not supported by file system.                    
    Cause . . . . . :   An attempt was made to use function which was not       
      supported by the file system 
    for path /qntc/fcofiles/iseries/ebs.file.  The 
      path selected may not be valid 
    for the function, or it may not be in the    
      same file system
    .                                                           
    Recovery  . . . :   Check the path name for accuracy.  You may need to use    
      
    another path for the operation.  Check the job log for possible additional  
      messages

    (there are no other job log messages)

    the weirdest part is that I can use the same command to an ifs folder
    PHP Code:
     CPY OBJ('\\qsys.lib\savlib2.lib\ebs.file'TODIR('//usrfls/out/gls400/'TOCCSID(1252REPLACE(*YES
    NO ERROR
    I can then drag and drop the file into fcofiles/iseries without any error.

    I've tried to let the ccsid default and I get cpfa098
    PHP Code:
     The CCSID of the target file could not be set to match the CCSID of the source file
    I prefer to use cpy (as opposed to ftp)
    I've also tried cpytostmf and get cpda09b
    PHP Code:
    CCSID conversion could not be performed
    Any thoughts or suggestions are appreciated
    V7R2

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

  • #2
    Re: cpy from savf to network file

    I always, without exception, binary FTP save files. This should work, however, I would think.

    Just out of curiosity, what happens if you move the file from the IFS to the network share? Same error?

    It sounds like a possible permissions problem on the network share location.

    Comment


    • #3
      Re: cpy from savf to network file

      I can drag and drop the file from IFS to the shared drive with no problem.
      I use the same userid and password on IBM and the network

      Drag and drop from qsys.lib/savlib2.lib to share worked.
      (I'd swear that I got a out of memory error when I tried that before)

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

      Comment


      • #4
        Re: cpy from savf to network file

        Interesting, might be a support ticket issue you're having in that case. I haven't run into this particular problem.

        Comment


        • #5
          Re: cpy from savf to network file

          update: I just successfully copied the same file to different server.

          @egami ....thanks for the assist and your time

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

          Comment


          • #6
            Re: cpy from savf to network file

            Umm... this probably won't have any affect on anything, but just out of curiosity, why are you adding extra slashes and sometimes putting them in backwards?

            You did this:
            Code:
             CPY OBJ('\\qsys.lib\savlib2.lib\ebs.file') TODIR('//usrfls/out/gls400/') TOCCSID(1252) REPLACE(*YES)
            Why do you have \\ and // at the start of the paths? That won't hurt anything, but it's a weird thing to do. It doesn't actually mean anything, it's identical to using a single slash.

            And why are you using backslashes (\\\) in the OBJ parameter and foreslashes (///) in the TODIR parameter? Weird that you'd change the way you do it in the middle of a command. I think CL commands automatically replace backslashes just to save people from themselves... so, again, this wouldn't stop it from working, but it's just a weird thing to do. Technically, you should always be using foreslashes all the time. As far as I know, Windows/DOS is the only place where they use backlashes in path names, all other OSes everywhere use the original (and more correct) foreslash as a directory separator.

            Comment


            • #7
              Re: cpy from savf to network file

              @scott:
              you are correct sir....I copied from another source.
              The foreslash did not make any difference with the issue.

              Thanks for your time and effort

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

              Comment


              • #8
                Re: cpy from savf to network file

                Originally posted by GLS400 View Post
                update: I just successfully copied the same file to different server.

                @egami ....thanks for the assist and your time

                GLS
                No problem, seemed like an issue on the target. Is it possible that it's a space issue in the previous target location?

                Comment


                • #9
                  Re: cpy from savf to network file

                  You can use CPYTOSTMF and CPYFRMSTMF

                  CPYTOSTMF example:
                  Code:
                  CPYTOSTMF FROMMBR( '/qsys.lib/MyLib.lib/savf.file' ) TOSTMF( savf.savf ) +
                    STMFOPT(*REPLACE)
                  CPYFRMSTMF example:
                  Code:
                  CPYFRMSTMF FROMSTMF( savf.savf ) TOMBR( '/qsys.lib/MyLib.lib/savf.file' ) +
                    MBROPT(*REPLACE)
                  The streamfile needs a .SAVF extension because the commands (seem to) know how to handle such files. (E.g., you won't need to create an empty SAVF first.) You can rename the extension before or after the copy, but it seems like a good idea to use .SAVF permanently. The name itself can be any valid name. And the command parameters are simple and very minimal.
                  Tom

                  There are only two hard things in Computer Science: cache invalidation, naming things and off-by-one errors.

                  Why is it that all of the instruments seeking intelligent life in the universe are pointed away from Earth?

                  Comment


                  • #10
                    Re: cpy from savf to network file

                    Thanks Tom

                    Your tip worked great.

                    My only issue now is creating a "NEW" network save file.
                    Help text on CPYTOSTMF says
                    If the stream file does not exist, it is created.
                    If the file does not exist when using STMFOPT *none or *replace I get a
                    CPDA09B "ccsid conversion could not be performed".
                    If I use *add I get CPDA1CE ..... "STMFOPT(*ADD) not allowed when copying a save file."

                    If I create an empty xxx.savf I can use the *replace with no issues.
                    All of the above can easily be handled...just a pain in the a**.

                    Thanks Again
                    GLS
                    The problem with quotes on the internet is that it is hard to verify their authenticity.....Abraham Lincoln

                    Comment

                    Working...
                    X