The LawsonGuru Letter, brought to you by Decision Analytics  

March 2006


In this issue:
1. Guest Spot: Lawson Import/Export Programs
2. New Features on
3. Worthwhile Reading
4. Lawson Tips & Tricks

The LawsonGuru Letter is a free periodic newsletter providing provocative commentary on issues important to the Lawson Software community.  The LawsonGuru Letter is published by—and is solely the opinion of—John Henley of Decision Analytics.

Visit Decision Analytics at For subscription information, see the bottom of this message.  The LawsonGuru Letter is not affiliated with Lawson Software.

  1. Guest Spot: Lawson Import/Export Programs )  
  My company recently went through a reorganization that required us to set up a new Lawson company and move all of the Human Resources data from the old company to the new company.  In most cases, one would think this would be a fairly easy task--cut and paste, right?

Unfortunately, because some of our data is old and some of our required data items have changed, the conversion programs had quite a few errors.  So I began looking at my conversion options:
  • Lawson conversion programs (e.g. HR511 Employee Conversion, HR521 HR History Conversion)
  • Lawson MS Add-In
  • Manual entry (obviously, the absolute LAST resort)

As luck would have it, there is a fourth conversion option that was brought to my attention by the Lawson Guru!

I also began to think about all the different pieces that needed to be converted: not only the detail, but the setup.  If you’ve ever set up an employee group, or Step and Grade Schedule, or Grade Range Schedule, you’ll understand that these screens are painful.  They contain several detail lines that can span several pages (i.e. require a page down), each requiring a function code and possible additional data values on a tab or additional screen.  Furthermore, they don’t play nicely with the Lawson MS Add-In and there are no Lawson conversion programs for them.  As luck would have it, there is a fourth conversion option that was brought to my attention by the Lawson Guru!
Lawson Import/Export programs create an export file from a database table (and its related tables) and then you can import the created file.  In most cases you would use this between product lines, but in our case I needed to use it in the same product line and only change the company number.  This takes what could be a task of several hours and makes it less than 30 minutes.  The steps are as follows:
1.       Define the Import/Export program through the pgmdef utility.  Select the product line and system code ® F8 to insert a new program.  Create a program code à select Program Type “Import/Export” ® create a program name (here I use the main table in the program for PA95 – Grade Range Schedule).  Press Enter to save.

2.       Paint program to select the required table (and its related tables).  F6 with Option C opens a screen containing Primary Files.  F2 to find the required table.  The table will be highlighted in black and the related tables will be highlighted in blue.  Press Enter to save.

The paint screen will appear.  Press Enter to save. Press Esc to return to the program definition screen. 

3.       Generate the COBOL code for the newly defined program.  F4 with option C to Generate ® Press Enter to accept default options.


4.       Now you can customize the Program Description (PD) for the newly created program.  In my case, I added the following highlighted code, which replaced company 123 with 234 before the record is written to the output file:
008400 1080-DO-SGH-EFFECT-DATE.
      *(This is the header part of the record)
008700     MOVE SGH-COMPANY            TO WF1-SGH-COMPANY.
           IF (WF1-SGH-COMPANY = 123)
               MOVE 234                TO WF1-SGH-COMPANY.

014600 1120-DO-SGD-PAY-STEP.
      *(This is the detail part of the record)
014900     MOVE SGD-COMPANY            TO WF2-SGD-COMPANY.
           IF (WF2-SGD-COMPANY = 123)
               MOVE 234                TO WF2-SGD-COMPANY.

Save your changes and recompile the program with qcompile.
5.       View the work file definition for the Import/Export program to determine the filename and location of the output using the workdef utility.  In the example below, the filename is VN503D and is located in the product line work directory $LAWDIR/prod/work/VN503D/ (the folder name is the same as the filename).

6.       Add and Submit the Import/Export job.  There are no job parameters.

7.       Navigate to the work directory and view the output file to make sure that the output is what you expect:

8.       Now you are ready to import the data.  From the work directory initiate the import command impexp with the appropriate options.

For example, use:


  • impexp –f prod VN503D if you want to add records and
  • impexp –a prod VN503D if you want to change records
View the imported data from the online form (in this example PA95) to ensure that you receive the expected results. 
These steps are also covered briefly in Lawson Knowledge Base article 77703.
There are different uses for customizing the Import/Export PD.  Not only can you change a data value (as I did in the example above), but you can filter for a particular data value.  You also have all of the COBOL tools and Lawson APIs available to you if you really want to get fancy. 
A couple words of warning:  The Import/Export programs do not perform any edits on the data.  If you need to remove imported data, you will have to do so from the database view of the tables or by adding logic to the export program.  If you’re doing an import where a lot of tables are involved, that just adds extra complication if you need to undo the import.  Make sure you understand the Lawson database model for the data you are exporting and importing, so that you maintain proper referential integrity in the database.  Just BE CAREFUL, and be sure that using an Import/Export program is your best option.
  2. New Features on )  


  I want to direct your attention to two new additions I’ve made to the web site.

Job Fair Forums

In addition to the Forums, where you can post your Lawson–related questions and get answers from your fellow Lawson users, two new “Job Fair” forums are now available:
  • Positions Available: Lawson clients and recruiting firms can post their current Lawson-related job openings
  • People Available: Lawson professionals and consultants seeking employment opportunities

    New “Tips & Tricks” Section

    It’s always gratifying to meet with LawsonGuru readers at client sites and regional user group conferences, and to hear how many of them implement the monthly Tips & Tricks. I’ve collected all of the previously published tips (as well as many others) and put them into a new “Tips & Tricks” section on the site:

      3. Worthwhile Reading )  
      Beating the Boomer Brain Drain Blues
    The oldest baby boomers are six years away from retirement. Will your company continue to thrive if they take their knowledge with them? Here’s how to identify who has key knowledge and how to keep it within the company walls.
    CIO Magazine, January 15, 2006


    “Don't just do something. Stand there.”

    -- Rochelle Myer

    SQL Server's extreme makeover
    Microsoft's flagship database pumps up to enterprise class with high availability, slick disaster recovery, rebuilt integration services, stronger analytics, and other heavy-duty enhancements.
    Infoworld, January 16, 2006

    Oracle Starts To Cut And Paste From PeopleSoft Apps
    Oracle has come a long way from the take-no-prisoners approach it took during its pursuit of PeopleSoft before acquiring the company last year. Since then Oracle executives have worked hard to keep PeopleSoft customers in the fold, but the company has never been all that clear about just how PeopleSoft and JD Edwards applications would mesh with Oracle's.
    Information Week, January 16, 2006

    SQL Tools Make Fast Work
    Different SQL tools run code, return results, and offer helpful differences.
    Oracle Magazine, January/February 2006
      4. Lawson Tips & Tricks )  

    Is there a way to see the Lawson security classes that are not currently used?

    In other words, there may be some security classes that are valid, but which are not assigned to any active users?

    The answer, of course, can be found in the laua security module.

    From the main screen,

    • Press F6 (Define)
    • Press A (Security Class)
    • Press F5 (Unused)

    This will list the security classes to which no users are assigned:

    From that list, you can select a product line, and then press F9 to delete the unused class.


    Please share The LawsonGuru Letter in whole or in part as long as copyright and attribution are always included.

    Decision Analytics is an independent consultancy, focusing on Lawson technical projects, and specializing in reporting, customization/modification, data conversion, and integration/interfaces. Please visit for more information.