PF/LF (Descend) Question - IBM AS400

This is a discussion on PF/LF (Descend) Question - IBM AS400 ; Here is the PF: A R FMT1 A ZIP 5A A CUST 20A A NAME 20A Here is the LF: A R FMT1 PFILE(*LIBL/TESTPF) A K ZIP DESCEND When I query the LF it will not put the zipcode records ...

+ Reply to Thread
Results 1 to 5 of 5

Thread: PF/LF (Descend) Question

  1. PF/LF (Descend) Question

    Here is the PF:

    A R FMT1
    A ZIP 5A
    A CUST 20A
    A NAME 20A

    Here is the LF:

    A R FMT1 PFILE(*LIBL/TESTPF)
    A K ZIP DESCEND

    When I query the LF it will not put the zipcode records in desending
    order, any help would be appreciated.


  2. Re: PF/LF (Descend) Question

    How are you accessing the file to determine it's not in descending
    zipcode order?

    You sure you are access the lf and not the pf?

    --
    Bob Comer


    On Mon, 31 Dec 2007 12:21:01 -0800 (PST), jacko
    wrote:

    >Here is the PF:
    >
    >A R FMT1
    >A ZIP 5A
    >A CUST 20A
    >A NAME 20A
    >
    >Here is the LF:
    >
    > A R FMT1 PFILE(*LIBL/TESTPF)
    > A K ZIP DESCEND
    >
    >When I query the LF it will not put the zipcode records in desending
    >order, any help would be appreciated.


  3. Re: PF/LF (Descend) Question

    On Dec 31, 2:21*pm, jacko wrote:
    > Here is the PF:
    >
    > A * * * * *R FMT1
    > A * * * * * *ZIP * * * * * *5A
    > A * * * * * *CUST * * * * *20A
    > A * * * * * *NAME * * * * *20A
    >
    > Here is the LF:
    >
    > * A * * * * *R FMT1 * * * * * * * * * * *PFILE(*LIBL/TESTPF)
    > * A * * * * *K ZIP * * * * * * * * * * *DESCEND
    >
    > When I query the LF it will not put the zipcode records in desending
    > order, any help would be appreciated.



  4. Re: PF/LF (Descend) Question

    On Dec 31, 3:39*pm, qgenes...@hotmail.com wrote:
    > On Dec 31, 2:21*pm, jacko wrote:

    If you are looking at it (f5) the report on the screen from query it
    won't. but if you print and use the thing in the program it will.
    Also make sure you are all set with this:

    DSPDBR TESTPF
    (make sure your logical is on the right TESTPF) and you are using the
    logical (whose name is ?????) when doing business
    >
    > > Here is the PF:

    >
    > > A * * * * *R FMT1
    > > A * * * * * *ZIP * * * * * *5A
    > > A * * * * * *CUST * * * * *20A
    > > A * * * * * *NAME * * * * *20A

    >
    > > Here is the LF:

    >
    > > * A * * * * *R FMT1 * * * * * * * * * * *PFILE(*LIBL/TESTPF)
    > > * A * * * * *K ZIP * * * * * * * * * * * DESCEND

    >
    > > When I query the LF it will not put the zipcode records in desending
    > > order, any help would be appreciated.- Hide quoted text -

    >
    > - Show quoted text -



  5. Re: PF/LF (Descend) Question

    A query result set has no defined order without an explicit ORDER BY
    clause. A default query of a keyed LF [e.g. either SELECT * FROM
    KEYED_LF or RUNQRY *NONE KEYED_LF] is no different than a query of the
    PF; i.e. order is undefined.

    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

    jacko wrote:
    > Here is the PF:
    >
    > A R FMT1
    > A ZIP 5A
    > A CUST 20A
    > A NAME 20A
    >
    > Here is the LF:
    >
    > A R FMT1 PFILE(*LIBL/TESTPF)
    > A K ZIP DESCEND
    >
    > When I query the LF it will not put the zipcode records in desending
    > order, any help would be appreciated.


+ Reply to Thread