Delete Subfile Records - IBM AS400

This is a discussion on Delete Subfile Records - IBM AS400 ; I have to write an application to write subfile records then delete 1 or more subfile records at the end. Say I wrote subfile records 1 through 15 on the screen. How can I delete records 14 and 15? Thanks ...

+ Reply to Thread
Results 1 to 5 of 5

Thread: Delete Subfile Records

  1. Delete Subfile Records

    I have to write an application to write subfile records then delete 1
    or more subfile records at the end. Say I wrote subfile records 1
    through 15 on the screen. How can I delete records 14 and 15? Thanks
    so much.


  2. Re: Delete Subfile Records

    SFBayF@aol.com wrote:

    > I have to write an application to write subfile records then delete 1
    > or more subfile records at the end. Say I wrote subfile records 1
    > through 15 on the screen. How can I delete records 14 and 15? Thanks
    > so much.


    If you populate your subfile from DB2 and your deletes are against the
    database, you have to clear the subfile and populate it again from the
    database. If it's populated otherwise, you could use an array and remove
    the entries from this and clear/repopulate the subfile.
    Knut


  3. Re: Delete Subfile Records

    On Jun 7, 4:08 am, SFB...@aol.com wrote:
    > I have to write an application to write subfile records then delete 1
    > or more subfile records at the end. Say I wrote subfile records 1
    > through 15 on the screen. How can I delete records 14 and 15? Thanks
    > so much.


    How are the records being selected for delete - is the user selecting
    the ones they want deleted?


  4. Re: Delete Subfile Records

    On Jun 7, 11:46 am, Alida wrote:
    > On Jun 7, 4:08 am, SFB...@aol.com wrote:
    >
    > > I have to write an application to writesubfilerecords thendelete1
    > > or moresubfilerecords at the end. Say I wrotesubfilerecords 1
    > > through 15 on the screen. How can Ideleterecords 14 and 15? Thanks
    > > so much.

    >
    > How are the records being selected fordelete- is the user selecting
    > the ones they want deleted?


    Yes. I guess I have to use array to store the image, clear subfile,
    and re-display subfile...


  5. Re: Delete Subfile Records

    While not totally understanding the problem...

    You can set the subfile record number and issue the DELETE opcode against a
    subfile, then resdisplay the subfile. As I recall, it will leave blank
    lines for the deteted records.

    Sam

    wrote in message
    news:1181355346.836245.56890@j4g2000prf.googlegrou ps.com...
    > On Jun 7, 11:46 am, Alida wrote:
    >> On Jun 7, 4:08 am, SFB...@aol.com wrote:
    >>
    >> > I have to write an application to writesubfilerecords thendelete1
    >> > or moresubfilerecords at the end. Say I wrotesubfilerecords 1
    >> > through 15 on the screen. How can Ideleterecords 14 and 15? Thanks
    >> > so much.

    >>
    >> How are the records being selected fordelete- is the user selecting
    >> the ones they want deleted?

    >
    > Yes. I guess I have to use array to store the image, clear subfile,
    > and re-display subfile...
    >




+ Reply to Thread