February 2004

The LawsonGuru Letter is a free periodic newsletter containing provocative commentary about 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 https://www.danalytics.com.  For subscription information, see the bottom of this message.
The LawsonGuru Letter is not affiliated with Lawson Software.

In this issue:
1. Editorial Housekeeping
2. A Look Inside Lawson's Data Dictionary
3. Worthwhile Reading
4. Reader Feedback
5. Survey: How's your Upgrade?
6. Lawson Tips & Tricks

1. Editorial Housekeeping
It's been a year-and-a-half since I started the LawsonGuru Letter, and I have to admit that I'm thoroughly enjoying it! It gives me a closer connection to a lot more Lawson clients, and I'm able to disseminate a lot of what I know about Lawson to you.

As you know, I write this newsletter and send it to you every month--for free--and I want it to be something you look forward to reading every month. I know I've said it before, and it still sounds corny, but I want the LawsonGuru Letter to be an integral part of your Lawson life!

I'm always looking for people to write Guest Spot articles. You don't have to be a professional writer (since I'm doing this for free, I guess that means I'm not one either!). We've been fortunate to have had several excellent pieces in the past. You are getting a tremendous amount of useful information for free. Do your part to keep this newsletter going. All you need is a good idea. Send me an email at mailto:letter-editor@lawsonguru.com when you're ready.

Now, as you've probably already noticed, I'm making a significant change this month, and am utilizing a newsletter delivery service, Constant Contact.

With the new anti-spam legislation now in place, it's getting harder than ever to get this newsletter out to the maximum number of people without getting caught in the spam filters. Hopefully, by using a reputable vendor to do the emailing, I can reduce the "bounce rate" (something I admit to knowing nothing about before I started this newsletter!), and increase the delivery ratio.

I also wanted to get out of the "list management" business. It takes a lot of time to add new addresses, and chase down people who've changed jobs, and forgotten to tell me (the nerve!) to change their email addresses. By off-loading this task to a service, the onus is now on you to keep your subscription information up-to-date--just click on the "Update Profile" link at the bottom of this message. To add yourself as a new subscriber, simply visit https://www.danalytics.com, enter your email address in the "Join the LawsonGuru Letter mailing list" box, and click "Go".

You can also click the "Forward to a colleague" link to send this newsletter to your co-workers, friends, and neighbors. I really hope you'll use this feature, so that we can keep this newsletter growing!
Lastly, you can now receive the LawsonGuru Letter in either an HTML-formatted or a plain-text version. I personally think that reading an HTML document is a lot easier than plain-text, but some disagree. One of the reasons I chose Constant Contact is that you can decide for yourself which version you want--just click on the "Update Profile" link at the bottom of this message.

Let me know how you like it--send me your thoughts to mailto:letter-comments@lawsonguru.com.

"Information Technology forces you to organize your processes more logically. The computer can handle only things to which the answer is yes or no.  It cannot handle maybe."
- Peter Drucker

2. A Look Inside Lawson's Data Dictionary
In the December 2003 issue (see http://www.danalytics..com/guru/letter/archive/2003-12.htm, I provided an "In-Depth Look at Lawson's Microsoft Add-Ins". In addition to giving that presentation at the North East Lawson User Group's annual Fall Conference in Cooperstown, I also gave a technical presentation on Lawson's Data Dictionary.
This month, I want to share some material from that presentation. To download an updated copy of the presentation, including screen shots and diagrams, visit https://www.lawsonguru.com (web site registration required).





  • This article covers the Lawson Environment and Applications running on Unix/Windows platforms, not AS/400.
  • The examples shown here use DEV802 as the Lawson product line; substitute your own product line as appropriate.
    What is a Data Dictionary?
    A data dictionary is simply a data repository, with data describing data. A common term for this is Meta Data. Where does Lawson store it's meta data? Why, GEN, of course!
    What's in Lawson's Data Dictionary?


  • Product Lines
  • Elements
  • Files/Tables
  • Relationships
  • Conditions
  • Programs
    If you were to map out the meta data portion of Lawson's GEN database, it would look something like this:

    Lawson GEN ERD

    Product Line / System Code Definition

  • Product Line
  • Platform
  • System Codes
  • DB Spaces
    System Code metadata is stored in the GEN table SYSTEM
    Use rngdbdump to get information about a Lawson System Code:
    $ rngdbdump -c GEN SYSTEM -v ProductLine=DEV802 | lashow
    Element Definition
  • "Element" is a fancy name for "Field"
  • When you add a new field to a file, it can either reuse an existing Element's definition (e.g. TO-COMPANY uses Element COMPANY), or it becomes a new "Element", which can then be used in other tables
  • Super Elements and Element Groups have been retired in the 8.x Environment
    File Definition
  • File Name
  • Product Line
  • System Code
  • File Prefix
  • Fields (Elements) - Name, Type, Length/Size
  • Generate your own list of the Lawson tables and their prefixes using the rngdbdump utility against the FILEDEF table in the GEN product line (provided you have the appropriate security):
    $ rngdbdump -c -iFDFSET2 GEN FILEDEF -f Prefix FileName -k DEV802 | lashow
    $ rngdbdump -c -iFDFSET3 GEN FILEDEF -f SystemCode Prefix FileName -k DEV802 | lashow
    Record Conditions
  • Commonly used to "subset" records for conditional indexes
  • Conditions can be on multiple values, elements, or based on existence/non-existence of a relationship
    Index Definitions
  • Every file MUST have at least 1 index
  • Lawson naming conventions specifies combining the 3 character file prefix with the 3 characters "SET" and a a single digit: 1=primary, 2-9=secondary
  • Primary Index must specify 'No Duplicates' and 'Can't Change Key(s)'
  • Conditional Indexes combine Record Conditions with indexes, e.g. GLTSET8 uses the "Unposted" condition
    Index metadata is stored in:
  • FILEIND (index)
  • FILEINDFLD (fields that make up the index)
    Use rngdbdump to get information about a Lawson index:
    $ rngdbdump -c GEN FILEIND -v ProductLine=DEV802 FileName=GLTRANS | lashow
    $ rngdbdump -c GEN FILEINDFLD -v ProductLine=DEV802 FileName=GLTRANS IndexName=GLTSET1 | lashow
    Use the dbindusage report to get usage information about a Lawson index:
    $ dbindusage DEV802 GLTRANS GLTSET1 | lashow
    File Relationships
  • A logical connection between two database files, a.k.a. "join"
  • Used to "relate" one or more records from one file, to one or more records in another file, according to a set of rulesUsed to "relate" one or more records from one file, to one or more records in another file, according to a set of rules
  • Relationship types: one-to-one, one-to-many, dependent, self-referential
    Relationship metadata is stored in:
  • FILEREL (relationship)
  • FILERELFLD (fields that make up the relationship)
    Use rngdbdump to get information about a Lawson relationship:
    $ rngdbdump -c GEN FILEREL -v ProductLine=DEV802 FileName=GLTRANS | lashow
    $ rngdbdump -c GEN FILERELFLD -v ProductLine=DEV802 FileName=GLTRANS RelName=ACCOUNT | lashow
    Database Implementation Specifics
  • One of the beauties of Lawson's n-tiered architecture is that it is totally separated from the database. This allows "plug-and-play" implementation of a desired database.
  • This also means that "metadata" is not stored in the database, but rather in the GEN repository.
  • Reserved Words: certain table names, field names, etc. are "reserved words" in a given database syntax, e.g. PLAN becomes R_PLAN
  • Underscores, not hyphens, are used in table/field names
  • Descending values in indexes are "faked" (using a one's complement algorithm)
  • Array columns are stored regardless actual data usage (e.g., AMOUNT_01, AMOUNT_02)
    Subset Switches
    Record Conditions are used to include records in a given "index set" to speed retrieval; records that meet that condition have the flag/switch set "Y".
  • First field in a subset index
  • If you use SQL to join tables, make sure you consider SS_SW's
    • GLTSET8_SS_SW - Unposted Transactions
    • PRDSET5_SS_SW - Payroll Distribution with an Activity

    LawDev802.lawson.ACTRANS ATN,
    LawDev802.lawson.PRDISTRIB PRD

    Caution: If you ever update the database directly, be sure to use the Lawson sqlfix utility to update the _SS_SW columns!
    This article has given you some ideas on what Lawson metadata is, and where it is stored. Keep exploring!

    3. Worthwhile Reading
    Ad hoc BI is killing us!
    It's back to the future as all the major BI suppliers have moved to add the reporting capabilities they once ridiculed as old-fashioned and out of touch to their suites.
    Application Development Trends, January 2004
    The new enterprise portal
    The browser-based portal is fast becoming the enterprise UI and the nexus for a new breed of integration and app dev
    Infoworld, January 12, 2004
    ERP Linked To RFID As Vendors Rebuild Apps
    Translating data from RFID tags to supply-chain software key to deriving value
    Information Week, January 19, 2004
    Business Objects draws post-merger Crystal roadmap
    Business information software company Business Objects announced a roadmap for integrating its own products with those of Crystal Decisions Inc., which it bought last July.
    Infoworld, January 8, 2004

    4. Reader Feedback
    Send your comments to mailto:letter-comments@lawsonguru.com.

    Some comments on the January 2004 issue (see https://www.danalytics.com/guru/letter/archive/2004-01.htm):

    "I totally agree with your 'Lawson Thoughts for the New Year'. We have asked many times if they had a committed technology direction. None given."

    "Just read your newsletter and I don't see how Lawson can justify not allowing CUE admission to consultants. Particularly to the independents like you, who are genuinely interested in Lawson and who are on the front-line assisting Lawson clients--by making the Lawson software do what they say it can do in spite of the missing functionality (and keeping them from throwing the product out the window). You should switch to PeopleSoft!"

    5. Survey: How's your Upgrade?
    By now, most of you on Unix and Windows who need to upgrade should already be starting, if not finished, or nearly done.
    How's it going? Tell us the good and the bad.
    Share your experience: mailto:letter-survey@lawsonguru.com.
    6. Lawson Tips & Tricks
    Share your tips. Send them to mailto:letter-tips@lawsonguru.com.
    I'm constantly amazed with the topica crowd. It seems that whenever I prepare a tip for publication, it never fails that I see it on topica just days before I send this out. No sooner had I put together this month's tip, when lo and behold, it's the subject of a topica thread.
    Well, here it is anyway:
    If you need to troubleshoot the behavior of a particular Logan/IOS CGI program, you can try turning on logging for that program.
    A "touch" file can be created in the Lawson for the particular CGI program. For example, to log messages related to the dme CGI program, create an empty file called dme.log.
    After you've finished troubleshooting, be sure to delete the .log file.
    According to the Lawson knowledge base, the following cgi programs are coded to write to ".log" files if one exists:
    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 https://www.danalytics.com.
    For subscription information, see the bottom of this message.
    © Copyright 2004, Decision Analytics. All rights reserved. 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 customization/modification, data conversion, and integration/interfaces.  Please visit https://www.danalytics.com for more information.
    Decision Analytics. Integrating Lawson with the Real World.