FTP problem with save/savf file. - IBM AS400

This is a discussion on FTP problem with save/savf file. - IBM AS400 ; Hello, I am fairly new to the IBM world. I have a system with V5R4 installed on it. I was trying to ftp a save file from a cd rom disk (optical media) onto the hard drive (of the same ...

+ Reply to Thread
Results 1 to 10 of 10

Thread: FTP problem with save/savf file.

  1. FTP problem with save/savf file.

    Hello,

    I am fairly new to the IBM world.
    I have a system with V5R4 installed on it. I was trying to ftp a save
    file from a cd rom disk (optical media) onto the hard drive (of the
    same machine). I get only part of the file. ftp's put command throws
    the following error.
    "426 - Cannot write to member xxxxxx in file yyyyyy in library
    zzzzzzz."
    I am trying to analyze the error.

    The file that I was trying to ftp is a fairly big file. About 100MB. I
    get about 47MB of data on to the target save file.

    The following are the steps that I followed to do this:
    1. crtsavf file(mylibrary/filename) maxrcds(*nomax)
    2. ftp to loopback address
    3. put /QOPT/folder/filename /QSYS.LIB/mylibrary.lib/filename.file

    It gets about 47MB and then throws the above error ("426 - Cannot
    write to member xxxxxx in file yyyyyy in library zzzzzzz.")

    Any thoughts on why this is happening and how to fix this?
    I was also wondering if there are any patches (or something
    equivalent) that are available for ftp (or TCP/IP) that would fix this
    problem?

    Any insights would be appreciated.
    Thanks and Regards,
    Ravi


  2. Re: FTP problem with save/savf file.

    You need to add the BIN commad to transfer in binary

    The file type is SAVF not FILE, use (r for replace.

    I use get not put

    get /QOPT/folder/file /QSYS.LIB/mylib.lib/filename.savf (r

    Good luck.

    Denny

    On Wed, 17 Oct 2007 22:09:47 -0000, crsekhar@gmail.com wrote:

    >Hello,
    >
    >I am fairly new to the IBM world.
    >I have a system with V5R4 installed on it. I was trying to ftp a save
    >file from a cd rom disk (optical media) onto the hard drive (of the
    >same machine). I get only part of the file. ftp's put command throws
    >the following error.
    >"426 - Cannot write to member xxxxxx in file yyyyyy in library
    >zzzzzzz."
    >I am trying to analyze the error.
    >
    >The file that I was trying to ftp is a fairly big file. About 100MB. I
    >get about 47MB of data on to the target save file.
    >
    >The following are the steps that I followed to do this:
    >1. crtsavf file(mylibrary/filename) maxrcds(*nomax)
    >2. ftp to loopback address
    >3. put /QOPT/folder/filename /QSYS.LIB/mylibrary.lib/filename.file
    >
    >It gets about 47MB and then throws the above error ("426 - Cannot
    >write to member xxxxxx in file yyyyyy in library zzzzzzz.")
    >
    >Any thoughts on why this is happening and how to fix this?
    >I was also wondering if there are any patches (or something
    >equivalent) that are available for ftp (or TCP/IP) that would fix this
    >problem?
    >
    >Any insights would be appreciated.
    >Thanks and Regards,
    >Ravi


  3. Re: FTP problem with save/savf file.

    Re: FTP PUT subcommand a save file from /QOPT to /QSYS.LIB on the
    same system, into a pre-created save file with *nomax records; failing
    with FTP error msg426.

    Before issuing the PUT, issue the following:
    quote rcmd ovrprtf *prtf hold(*YES) splfown(*curusrprf) ovrscope(*job)
    After the failing PUT, issue the following:
    quote rcmd dspjoblog output(*PRINT)
    syscmd wrksplf select(*current)

    Review the QPJOBLOG that was just created for the FTP server job.
    Investigate the error condition that was logged [in the FTP server
    session], for which the 426 error was then presented in the FTP client
    session as response to that error condition.

    P.S. Re: fixes, the PTF identifier SF99315 names the v5r4m0 "TCP/IP
    GROUP PTF"

    Regards, Chuck
    --
    All comments provided "as is" with no warranties of any kind
    whatsoever and may not represent positions, strategies, nor views of my
    employer

    crsekhar@gmail.com wrote:
    > <>


  4. Re: FTP problem with save/savf file.

    Hi Denny,

    I was in bin mode while ftping the file. My apologies for not being
    clear.

    We can either use GET or PUT. In fact, I tried both. When I used GET,
    I used (REPLACE option. But, for PUT, we don't need to use the
    (REPLACE option, I believe.

    It is the same case in both scenarios. I am struggling to figure out
    what is happening.

    Thanks and Regards,
    Ravi

    On Oct 17, 3:44 pm, Denny wrote:
    > You need to add the BIN commad to transfer in binary
    >
    > The file type is SAVF not FILE, use (r for replace.
    >
    > I use get not put
    >
    > get /QOPT/folder/file /QSYS.LIB/mylib.lib/filename.savf (r
    >
    > Good luck.
    >
    > Denny
    >
    > On Wed, 17 Oct 2007 22:09:47 -0000, crsek...@gmail.com wrote:
    > >Hello,

    >
    > >I am fairly new to the IBM world.
    > >I have a system with V5R4 installed on it. I was trying to ftp a save
    > >file from a cd rom disk (optical media) onto the hard drive (of the
    > >same machine). I get only part of the file. ftp's put command throws
    > >the following error.
    > >"426 - Cannot write to member xxxxxx in file yyyyyy in library
    > >zzzzzzz."
    > >I am trying to analyze the error.

    >
    > >The file that I was trying to ftp is a fairly big file. About 100MB. I
    > >get about 47MB of data on to the target save file.

    >
    > >The following are the steps that I followed to do this:
    > >1. crtsavf file(mylibrary/filename) maxrcds(*nomax)
    > >2. ftp to loopback address
    > >3. put /QOPT/folder/filename /QSYS.LIB/mylibrary.lib/filename.file

    >
    > >It gets about 47MB and then throws the above error ("426 - Cannot
    > >write to member xxxxxx in file yyyyyy in library zzzzzzz.")

    >
    > >Any thoughts on why this is happening and how to fix this?
    > >I was also wondering if there are any patches (or something
    > >equivalent) that are available for ftp (or TCP/IP) that would fix this
    > >problem?

    >
    > >Any insights would be appreciated.
    > >Thanks and Regards,
    > >Ravi




  5. Re: FTP problem with save/savf file.

    FTP cannot create a SAVF, but it can populate an existing one. Create
    an empty SAVF first, the FTP using "bin" as suggested.


  6. Re: FTP problem with save/savf file.

    When using NAMEFMT 1, which the OP apparently was using, instead of
    naming the target as a .FILE, specifying the target as a .SAVF [on the
    PUT] will create a save file if one does not already exist. Of course
    it is moot, as the OP stated the save file was pre-created.

    Regards, Chuck
    --
    All comments provided "as is" with no warranties of any kind
    whatsoever and may not represent positions, strategies, nor views of my
    employer

    Graybeard wrote:
    > FTP cannot create a SAVF, but it can populate an existing one. Create
    > an empty SAVF first, the FTP using "bin" as suggested.


  7. Re: FTP problem with save/savf file.

    On Wed, 17 Oct 2007 22:09:47 -0000, crsekhar@gmail.com wrote:

    Instead of ftp try
    cpyfrmstmf /QOPT/folder/filename /QSYS.LIB/mylibrary.lib/filename.file





  8. Re: FTP problem with save/savf file.

    On Oct 17, 3:44 pm, Denny wrote:
    > You need to add the BIN commad to transfer in binary
    >
    > The file type is SAVF not FILE, use (r for replace.
    >
    > I use get not put
    >
    > get /QOPT/folder/file /QSYS.LIB/mylib.lib/filename.savf (r
    >
    > Good luck.
    >
    > Denny
    >
    > On Wed, 17 Oct 2007 22:09:47 -0000, crsek...@gmail.com wrote:
    > >Hello,

    >
    > >I am fairly new to the IBM world.
    > >I have a system with V5R4 installed on it. I was trying to ftp a save
    > >file from a cd rom disk (optical media) onto the hard drive (of the
    > >same machine). I get only part of the file. ftp's put command throws
    > >the following error.
    > >"426 - Cannot write to member xxxxxx in file yyyyyy in library
    > >zzzzzzz."
    > >I am trying to analyze the error.

    >
    > >The file that I was trying to ftp is a fairly big file. About 100MB. I
    > >get about 47MB of data on to the target save file.

    >
    > >The following are the steps that I followed to do this:
    > >1. crtsavf file(mylibrary/filename) maxrcds(*nomax)
    > >2. ftp to loopback address
    > >3. put /QOPT/folder/filename /QSYS.LIB/mylibrary.lib/filename.file

    >
    > >It gets about 47MB and then throws the above error ("426 - Cannot
    > >write to member xxxxxx in file yyyyyy in library zzzzzzz.")

    >
    > >Any thoughts on why this is happening and how to fix this?
    > >I was also wondering if there are any patches (or something
    > >equivalent) that are available for ftp (or TCP/IP) that would fix this
    > >problem?

    >
    > >Any insights would be appreciated.
    > >Thanks and Regards,
    > >Ravi


    Thanks, Denny for the reply.
    However, I was in BIN mode when I did the ftp. Also, I tried using
    both PUT and GET (with (r option).
    I am still facing the same problem. In both methods (GET and PUT), the
    same exact size of the save file is obtained which is less than the
    original size of the file on the CD-ROM.

    Thanks and Regards,
    Ravi


  9. Re: FTP problem with save/savf file.

    Thank you all for your responses. I appreciate each and every reply.

    Thomas Zeilfelder: Your reply was educational. I searched for a
    command which would help me bypass the ftp step to copy something from
    a CD. I got it now through your reply. Thanks for that. I tried
    cpyfrmstmf command. The target file had exactly same size as before
    (when I tried using the ftp). I was not able to retrieve the whole
    file.

    CRPence: Your suggestion helped me to figure out the problem. I have
    generated the log and analyzed it. It appears that the source save
    file is bad.
    Excerpt from the log file:
    "Message: Incorrect record for output operation to save file."
    "Cause: An incorrect record was output to save file FILENAME in
    LIBRARY. The condition code is 1.
    ....
    1 -- A record is out of sequence. The data you are trying to write
    into the save file may not be from a save file.
    ...."


    I was wondering if there is a way to fix the save file? I have got
    this save file from somewhere and it is a pain to ask the sender to
    recreate the save file and send it across.
    Is there any PTF (or fix) for ftp (or any other) that would
    automatically (or other way) take care of this and fix the save file
    and make it usable?

    Thanks again for your everything.
    Regards,
    Ravi


    On Oct 17, 11:27 pm, thomas.zeilfel...@gmx.net (Thomas Zeilfelder)
    wrote:
    > On Wed, 17 Oct 2007 22:09:47 -0000, crsek...@gmail.com wrote:
    >
    > Instead of ftp try
    > cpyfrmstmf /QOPT/folder/filename /QSYS.LIB/mylibrary.lib/filename.file




  10. Re: FTP problem with save/savf file.

    Re: Is there a way to /fix/ a save file record which is corrupted, as
    identified by the error message CPF5175 upon insert into a save file?

    It could be possible to correct the data or the hash [which provides
    a check for the data], since one or the other was corrupted. A
    reference back to the original data is required. I would not recommend
    that action, unless the data is known exactly, and the correct hash can
    be generated [or copied from the original save] for that row of data.

    The system only knows there is an error with the data or hash, it
    does not know what the correct value is. There is no way for the system
    to correct the unknown. The system could only ask for a re-transmit,
    under the assumption that the prior transmission was in error. Changing
    the data to hash to the expected value or ignoring the mismatch in the
    hash would hardly provide any integrity; and doing either would vitiate
    the use of hashing, to the extent that there would be effectively no
    point in having generated a hash in the first place.

    Because at least one row or its hash is corrupted, the most obvious
    as the best action is to transport again, a copy of the save after
    having eliminated the bad router, CD, or whatever caused the blip(s) in
    the earlier copy or copies. There is no way to predict if there was
    more corrupted data, except if/when identified by the error msgCPF5175;
    i.e. the error which was kind enough to warn of the problem, and thus
    having prevented the propagation of that corruption to the target system.

    If one were to assume it was only the one bad row [and actually to be
    correct; hopefully with obviousness], there is the option to patch the
    current copy of the data to match the original. The data can be held in
    a flat file which offers methods to update the binary data, before again
    trying to copy the changed data into a save file. There are no methods
    provided to change data in a save file, just methods for insert/append
    and clear of the data encapsulated in that object type.

    FWiW, a pseudo-example to explain a caveat trying to /fix/ the data:
    Given: two strings of data where one represents a customer Id and
    the other a calculated Hash, where the data received as Id does not hash
    into the expected value.
    Given: the correct values for Id and Hash in a row of data are:
    '8775551212' & x'020D'
    With those givens, the scenario could be any of the following:
    a> Id is incorrect, Hash is correct: '8005551212' & x'020D'
    b> Id is correct, Hash is incorrect: '8775551212' & x'01DF'
    c> Id is incorrect, Hash is incorrect: '7775551212' & x'01D1'
    It should be obvious that unless what data _should_ exist is known,
    there is really no way to /fix/ the data or the hash, without possibly
    leaving an incorrect value for the customer Id. This is because not
    only do multiple Id values hash into the same hex value, but because it
    must be known whether the data or the hash is incorrect. Additionally
    if the corrupted data is not encapsulated data, but instead definitional
    for the object, that could manifest itself in other functional ways not
    related to the data. If the object and data have enough value such that
    the desire is to be able to restore, then they probably also have enough
    value such that they should be restored without the error in some prior
    copy/store being carried forward.?

    Regards, Chuck
    --
    All comments provided "as is" with no warranties of any kind
    whatsoever and may not represent positions, strategies, nor views of my
    employer

    crsekhar@gmail.com wrote:
    > <> Your suggestion helped me to figure out the problem. I have
    > generated the log and analyzed it. It appears that the source save
    > file is bad.
    > Excerpt from the log file:
    > "Message: Incorrect record for output operation to save file."
    > "Cause: An incorrect record was output to save file FILENAME in
    > LIBRARY. The condition code is 1.
    > ...
    > 1 -- A record is out of sequence. The data you are trying to write
    > into the save file may not be from a save file. ..."
    >
    > I was wondering if there is a way to fix the save file? I have got
    > this save file from somewhere and it is a pain to ask the sender to
    > recreate the save file and send it across.
    > Is there any PTF (or fix) for ftp (or any other) that would
    > automatically (or other way) take care of this and fix the save file
    > and make it usable?



+ Reply to Thread