Update errors - file already lock or operation sequence invalid - IBM AS400

This is a discussion on Update errors - file already lock or operation sequence invalid - IBM AS400 ; Any advice? Program A has a record Program A calls Program B with the some of the same data for header information to create another record. Program B needs to add the new record and update the file XXX, that ...

+ Reply to Thread
Results 1 to 4 of 4

Thread: Update errors - file already lock or operation sequence invalid

  1. Update errors - file already lock or operation sequence invalid

    Any advice?

    Program A has a record Program A calls Program B with the some of the
    same data for header information to create another record.

    Program B needs to add the new record and update the file XXX, that
    was also used in program Progam A.

    One of two errors......

    I/O error CPF5032 was detected in file XXXXX

    or

    Update or delete in file XXXX without prior input operation

    I know the record was locked so in Program A, I made certain that
    CHAIN(N) was used.

    Should I just have 2 F specs with the same file and rename the file
    info.


  2. Re: Update errors - file already lock or operation sequence invalid

    On Apr 4, 8:58 am, mk4ucch...@hotmail.com wrote:
    > Any advice?
    >
    > Program A has a record Program A calls Program B with the some of the
    > same data for header information to create another record.
    >
    > Program B needs to add the new record and update the file XXX, that
    > was also used in program Progam A.
    >
    > One of two errors......
    >
    > I/O error CPF5032 was detected in file XXXXX
    >
    > or
    >
    > Update or delete in file XXXX without prior input operation
    >
    > I know the record was locked so in Program A, I made certain that
    > CHAIN(N) was used.
    >
    > Should I just have 2 F specs with the same file and rename the file
    > info.


    Are you doing a chain to the file in program B so program B can do the
    update to the file?


  3. Re: Update errors - file already lock or operation sequence invalid

    On Apr 4, 8:32 pm, jbw...@gmail.com wrote:
    > On Apr 4, 8:58 am, mk4ucch...@hotmail.com wrote:
    >
    >
    >
    >
    >
    > > Any advice?

    >
    > > Program A has a record Program A calls Program B with the some of the
    > > same data for header information to create another record.

    >
    > > Program B needs to add the new record andupdatethe file XXX, that
    > > was also used in program Progam A.

    >
    > > One of twoerrors......

    >
    > > I/O error CPF5032 was detected in file XXXXX

    >
    > > or

    >
    > > Updateor delete in file XXXX without prior inputoperation

    >
    > > I know the record was locked so in Program A, I made certain that
    > > CHAIN(N) was used.

    >
    > > Should I just have 2 F specs with the same file and rename the file
    > > info.

    >
    > Are you doing a chain to the file in program B so program B can do theupdateto the file?- Hide quoted text -
    >
    > - Show quoted text -


    Yes, I'm doing a chain to the file in program multiple times in
    program B.

    I was thinking about changing all chains to this file to CHAIN(N) then
    prior to updating do a chain or Setll followed by a READE.






  4. Re: Update errors - file already lock or operation sequence invalid

    On Apr 4, 8:58 am, mk4ucch...@hotmail.com wrote:
    > Any advice?
    >
    > Program A has a record Program A calls Program B with the some of the
    > same data for header information to create another record.
    >
    > Program B needs to add the new record andupdatethe file XXX, that
    > was also used in program Progam A.
    >
    > One of two errors......
    >
    > I/O error CPF5032 was detected in file XXXXX
    >
    > or
    >
    > Updateor delete in file XXXX without prior inputoperation
    >
    > I know the record was locked so in Program A, I made certain that
    > CHAIN(N) was used.
    >
    > Should I just have 2 F specs with the same file and rename the file
    > info.



    April 8, 2007....

    Problem resolved.....program A had a record lock that I missed using
    CHAIN(N)....Program B now updates and writes records just fine.....

    Thanks for your input......




+ Reply to Thread