CPYF OF LF files ??? - IBM AS400

This is a discussion on CPYF OF LF files ??? - IBM AS400 ; Hello. First i have copied the PFs from LIB1 to LIB2. Second i have copied the LFs form LIB1 to LIB2. I can "see" all PFs in LIB2 BUT not the LFs !! Why??? The CPYF cmd on the LFs ...

+ Reply to Thread
Results 1 to 10 of 10

Thread: CPYF OF LF files ???

  1. CPYF OF LF files ???

    Hello.

    First i have copied the PFs from LIB1 to LIB2.
    Second i have copied the LFs form LIB1 to LIB2.

    I can "see" all PFs in LIB2 BUT not the LFs !! Why???

    The CPYF cmd on the LFs war always succesfuly.

    If i try again to copy a LF which was succefuly copied with option
    (*create), i have the msg that that file already exist ! But in LIB2
    i can "see" only the PFs(cmd wrklib lib2)

    thanks.


  2. Re: CPYF OF LF files ???

    On Feb 21, 8:51 am, "marsias" wrote:
    > Hello.
    >
    > First i have copied the PFs from LIB1 to LIB2.
    > Second i have copied the LFs form LIB1 to LIB2.
    >
    > I can "see" all PFs in LIB2 BUT not the LFs !! Why???
    >
    > The CPYF cmd on the LFs war always succesfuly.
    >
    > If i try again to copy a LF which was succefuly copied with option
    > (*create), i have the msg that that file already exist ! But in LIB2
    > i can "see" only the PFs(cmd wrklib lib2)
    >
    > thanks.


    If you used CPYF to copy LFs what you end up with is a physical file
    containing data from the logical. Its most likely sequenced & will
    only contain data matched by any select/omit lines. What you most
    likely should have done is to CRTDUPOBJ your LFs. This results in
    either an LF pointing at the original PF or if the target library for
    the duplicate contains a duplicate of the original PF then it will
    point at this PF.

    HTH
    Jonathan


  3. Re: CPYF OF LF files ???

    On Feb 21, 3:51 am, "marsias" wrote:
    > Hello.
    >
    > First i have copied the PFs from LIB1 to LIB2.
    > Second i have copied the LFs form LIB1 to LIB2.
    >
    > I can "see" all PFs in LIB2 BUT not the LFs !! Why???
    >
    > The CPYF cmd on the LFs war always succesfuly.
    >
    > If i try again to copy a LF which was succefuly copied with option
    > (*create), i have the msg that that file already exist ! But in LIB2
    > i can "see" only the PFs(cmd wrklib lib2)
    >
    > thanks.


    On copying logicals, if you do not adjust your library list
    accordingly they probably will not copy since they are setup to look
    at physical files that are probably all ready in your library list.


  4. Re: CPYF OF LF files ???

    Hello.

    thank for the responses !!.

    If i am right, i can copy the LFs , to another LIB by create first a
    Dump-obj(crtdupobj) ??

    Means this, if i copy with CPYF the LF to another LIB, a PF will
    created on the Targed LIB and i dont need to copy the PFs assossiate
    the the LF??

    thanks.


  5. Re: CPYF OF LF files ???

    I've never had much luck copying LF's. It always seems to cause more
    problems than it's worth. I would just recompile the LF's to the
    library you need.


    that 1 guy


  6. Re: CPYF OF LF files ???

    On Feb 21, 7:03 am, "marsias" wrote:

    > Means this, if i copy with CPYF the LF to another LIB, a PF will
    > created on the Targed LIB and i dont need to copy the PFs assossiate
    > the the LF??
    >

    This really only makes sense if you *want* a new physical file instead
    of a logical file.. Depends on what you're looking for.

    Scott



  7. Re: CPYF OF LF files ???

    On Feb 21, 11:03 am, scl...@gmail.com wrote:
    > On Feb 21, 7:03 am, "marsias" wrote:
    >
    > > Means this, if i copy with CPYF the LF to another LIB, a PF will
    > > created on the Targed LIB and i dont need to copy the PFs assossiate
    > > the the LF??

    >
    > This really only makes sense if you *want* a new physical file instead
    > of a logical file.. Depends on what you're looking for.
    >
    > Scott


    Copy physicals to library B, put library b at the top of your library
    list, then copy logicals from library a to b.


  8. Re: CPYF OF LF files ???

    CPYF cannot create a logical file. It will only create physical files.

    By definition, you cannot CPYF TO a logical file. A logical file does
    not contain any records. The "records" are in the physical that the
    logical is created over.

    Look at the help text from the CPYF promp screen.

    Use CRTDUPOBJ. It will work correctly IF the original physical and
    attached logical are in the same library.

    Denny


    On 21 Feb 2007 09:57:41 -0800, "JackO" wrote:

    >On Feb 21, 11:03 am, scl...@gmail.com wrote:
    >> On Feb 21, 7:03 am, "marsias" wrote:
    >>
    >> > Means this, if i copy with CPYF the LF to another LIB, a PF will
    >> > created on the Targed LIB and i dont need to copy the PFs assossiate
    >> > the the LF??

    >>
    >> This really only makes sense if you *want* a new physical file instead
    >> of a logical file.. Depends on what you're looking for.
    >>
    >> Scott

    >
    >Copy physicals to library B, put library b at the top of your library
    >list, then copy logicals from library a to b.


  9. Re: CPYF OF LF files ???

    Hi,

    CRTDUPOBJ copies objects and has an option data (*YES or *NO) with data(*NO)
    in combination with a physical file it creates an empty file, logical files
    are always 'empty'.
    CPYF copies records from a file to another and has a parameter create(*yes
    or *no) and member options (*add and *replace). Using create *yes creates a
    physicyl file by the fly with the needed fields, the copy itself is record
    by record from one file (PF or LF) to another (PF or LF).

    Dieter Bender

    marsias wrote:

    > Hello.
    >
    > First i have copied the PFs from LIB1 to LIB2.
    > Second i have copied the LFs form LIB1 to LIB2.
    >
    > I can "see" all PFs in LIB2 BUT not the LFs !! Why???
    >
    > The CPYF cmd on the LFs war always succesfuly.
    >
    > If i try again to copy a LF which was succefuly copied with option
    > (*create), i have the msg that that file already exist ! But in LIB2
    > i can "see" only the PFs(cmd wrklib lib2)
    >
    > thanks.



  10. Re: CPYF OF LF files ???

    NO. The TOFILE on CPYF cannot be an existing logical. If CRTFILE(*YES)
    is specified, the created file will always be a physical.

    Denny

    On Thu, 22 Feb 2007 10:05:15 +0100, Dieter Bender
    wrote:

    >Hi,
    >
    >CRTDUPOBJ copies objects and has an option data (*YES or *NO) with data(*NO)
    >in combination with a physical file it creates an empty file, logical files
    >are always 'empty'.
    >CPYF copies records from a file to another and has a parameter create(*yes
    >or *no) and member options (*add and *replace). Using create *yes creates a
    >physicyl file by the fly with the needed fields, the copy itself is record
    >by record from one file (PF or LF) to another (PF or LF).
    >
    >Dieter Bender
    >
    >marsias wrote:
    >
    >> Hello.
    >>
    >> First i have copied the PFs from LIB1 to LIB2.
    >> Second i have copied the LFs form LIB1 to LIB2.
    >>
    >> I can "see" all PFs in LIB2 BUT not the LFs !! Why???
    >>
    >> The CPYF cmd on the LFs war always succesfuly.
    >>
    >> If i try again to copy a LF which was succefuly copied with option
    >> (*create), i have the msg that that file already exist ! But in LIB2
    >> i can "see" only the PFs(cmd wrklib lib2)
    >>
    >> thanks.


+ Reply to Thread