IS there a Way to Delete particular data in GEN TABLES ?

Author
Messages
Vijay S
Veteran Member
Posts: 174
Veteran Member
    Hi,

    We are on Lawson 7.2.3 (informix), I know its pretty old but client is quite happy to continue with it.

    Is there any command line utlity (opposite to importdb command) that can delete some particular records from  a GEN table ? The tables can't be accesed via SQL's and there is not any API for the same. Currently, I am figuring a way to delete some records (not all) from USEREXE table.
     
    Thanks,
    Vijay
    Ragu Raghavan
    Veteran Member
    Posts: 468
    Veteran Member
      I used to go to pgmdef and paint screens to modify the job status (QUEUEDJOB, I think) in the GEN tables. Maybe you can paint a screen to delete the rows from USEREXE?
      Kwane McNeal
      Veteran Member
      Posts: 479
      Veteran Member
        Ragu's method is about the only method available, unless you do the delete all/add back method

        0) rngdbdump entire table
        1) modify file to include only records you want to reimport
        2) stoplaw
        3) delete $LADBDIR/GEN/TABLE (and TABLE.i)
        4) startladb -s
        5) importdb file back into table
        6) dbmode -m
        7) startlaw

        This method was traditionally used when you had a lot of records to delete, and a paint screen was going to take too long.

        Kwane
        Ryan Speight
        Basic Member
        Posts: 5
        Basic Member
          If it is a bulk delete, I think you will need to use the MS add-ins or directly connect to the DB and run a SQL query. MS add-ins is a pain but it does inforce referential integrety (lawson does not do a real good job of doing this at the database level, a lot of it is managed through the app).
          John Henley
          Senior Member
          Posts: 3348
          Senior Member
            Posted By Ryan Speight on 03/07/2013 11:23 AM
            If it is a bulk delete, I think you will need to use the MS add-ins or directly connect to the DB and run a SQL query. MS add-ins is a pain but it does inforce referential integrety (lawson does not do a real good job of doing this at the database level, a lot of it is managed through the app).

            This does not apply, since client is still on 7.2.x, and GEN is not in a SQL database.
            Thanks for using the LawsonGuru.com forums!
            John
            Kwane McNeal
            Veteran Member
            Posts: 479
            Veteran Member
              Ryan,
              The version of Lawson that he's using didn't have an IOS layer that used servlets, so any current version of AddIns would never work. Also in that version IOS was a separate, licensable, PAID product. It's unlikely the client even has it. Portal was experimental in that release (it was called SEAPort back then), etc.

              Now I'm making the assumption that he's actually using Env 7.3.x with Apps 7.2.3. If he is in fact using Env 7.2.x (I was only aware of one client who had that as their Env release), there is NO LOGAN/IOS layer available for him, since that wasn't released GA until Env7.3.2

              GEN wasn't in a relational database, it was still in Lawson's modified VSAM system called 'lafile' (Lawson Associates Hierarcial File Database Storage).

              Lawson never exposed any lafile APIs, although you could compile into the lacobrts the code you needed, if you were strong at heart.

              Kwane
              Ryan Speight
              Basic Member
              Posts: 5
              Basic Member
                Yikes!  Thanks for the clarification.  I did not see catch the version info.  In that case, the only way I can think of to do that is via a paint screen.

                I have done this in the past but it is dangerious and can't be done depending on the GEN table of interest:

                1) Export the table data using rngdbdump. 
                2) Truncate the table using the built in executables.
                3) Use import DB to repopulate the data with only the information you want to be in the table.

                This method is highly ill advised though and should be used as a last resort.  The paint screen is the safest bet but can be time consuming if you have a lot of records to remove.
                I am also assuming that this version of Lawon even has the necessary executables.  I didn't start working with Lawson until 7.3.3 and we are now at 9.0.1.

                Lawson has never been good about providing a means for data archiving or mass record removal.  The only inherent means they provide are the application token screens (and paint screens).
                John Henley
                Senior Member
                Posts: 3348
                Senior Member
                  Keep in mind that creating a paint screen for GEN is not trivial.
                  Thanks for using the LawsonGuru.com forums!
                  John
                  Vijay S
                  Veteran Member
                  Posts: 174
                  Veteran Member
                    Thanks to all of you, I'll create a quick paint for USEREXE. Lets see.
                    ---