Record locks - IBM AS400

This is a discussion on Record locks - IBM AS400 ; I have recently encountered record locks which I cannot explain on a Model 250 at V4R5. The cause is a RPGII program that deletes obsolete records from a Special Prices (opened as UP) if the Customer is not on the ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: Record locks

  1. Record locks

    I have recently encountered record locks which I cannot explain on a Model
    250 at V4R5. The cause is a RPGII program that deletes obsolete records
    from a Special Prices (opened as UP) if the Customer is not on the Customer
    Master (IC) or the Product is not on the Product Master (IC). When the
    program exits, because the last record read was not deleted, it has a record
    lock. That is in retrospect to be expected, but I don't understand why the
    two input only files also have record locks. The mystery deepens, because
    to make it available via an ODBC link, the flat file Product Master is then
    CPYFd to a native file - which cannot be accessed via ODBC until the
    procedure has finished, and which shows as having an object lock, but
    without having a current record. Has this lock been inherited as part of
    the CPYF.
    It looks as if I will have to change the IC files to UC and do a dummy
    output to all three files at LR time - as long as the last record was not
    deleted.

    Any ideas please?

    Many thanks

    Peter Kinsman




  2. Re: Record locks

    Hi Peter,

    the table lock looks like running under comitment control, doesn't it?

    Dieter Bender

    Peter Kinsman wrote:

    > I have recently encountered record locks which I cannot explain on a Model
    > 250 at V4R5. The cause is a RPGII program that deletes obsolete records
    > from a Special Prices (opened as UP) if the Customer is not on the
    > Customer
    > Master (IC) or the Product is not on the Product Master (IC). When the
    > program exits, because the last record read was not deleted, it has a
    > record
    > lock. That is in retrospect to be expected, but I don't understand why
    > the
    > two input only files also have record locks. The mystery deepens, because
    > to make it available via an ODBC link, the flat file Product Master is
    > then CPYFd to a native file - which cannot be accessed via ODBC until the
    > procedure has finished, and which shows as having an object lock, but
    > without having a current record. Has this lock been inherited as part of
    > the CPYF.
    > It looks as if I will have to change the IC files to UC and do a dummy
    > output to all three files at LR time - as long as the last record was not
    > deleted.
    >
    > Any ideas please?
    >
    > Many thanks
    >
    > Peter Kinsman



+ Reply to Thread