September 2003



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.

The LawsonGuru Letter is not affiliated with Lawson Software.



In this issue:
1. Scripting to Save Time
2. Managing Lawson Customizations
3. Reader feedback
4. Worthwhile Reading
5. Survey: Can you live without LID?
6. Lawson tips & tricks
As a reminder, I invite articles from anyone--whether a Lawson employee, client or partner--with an opinion or topic of interest. Simply send me an email at mailto:letter-editor@lawsonguru.com to get started.


1. Scripting to Save Time

Note: This article is now obsolete for newer versions of the Lawson Application Maintenance Toolkit (AMT).

If you're not yet running Lawson v8, you'll be in for a treat when you upgrade. Instead of having to type in COBOL code from the old "paper patches", you'll can now download transfer packages (CTPs) and maintenance services packs (MSPs). To use an overused cliché¬ CTPs and MSPs are both a blessing and curse: while they greatly simply patch installation, you have less control over what gets installed.

With paper patches, you could exercise more control over what patch code you actually implemented. By contrast, a CTP may contain one updated source file, or perhaps hundreds. Fortunately, source code now contains version information, and since installed version information is maintained on your server, the Lawson delivery tools know exactly which source files needs to be updated.
Of course, if you've made modifications to the base Lawson code, CTP and MSP installations may overwrite your modifications. Always make sure you've backed up your Lawson system before installing a CTP or MSP.

Even though the installation of CTPs and MSPs is much more automated, it's still a lot of work to get them installed, particularly if you maintain a number of product lines for production, development, training, testing, etc. If you're like me, spending your time loading patches and/or services packs, and compiling program is the last thing you want to do. So, I'm sharing some of my "power Lawson techniques" with you. The primary theme is very simple: Use some simple scripts to do your work for you.

Note: The syntax of these scripts is for UNIX platforms; to run them on with Lawson on Windows platforms, you will need to make some minor changes. Also, the usual disclaimers apply: these scripts are meant as a guideline only, they are not bullet-proof, and they are obviously not supported.

Automate CTP Installation

This script can save you hours when you want to install a list of CTPs. Save the CTP .tar files in a directory called /tmp/patches, and create a simple text file, called patchlist.txt, with the number of each CTP to be installed (put each one on a separate line), e.g.:
/tmp/patches/patchlist.txt
--------------------------
12045
12302
14405

The script then executes the Lawson installation commands for each CTP in the list.

#!/bin/ksh
#
# installs and compiles programs for each CTP in patchlist.txt
#
. /opt/lawson/lawson/lawson.env
for patch in `cat /tmp/patches/patchlist.txt`
do
cd /tmp/patches
if [ ! -d "/tmp/patches/$patch" ]
then
mkdir /tmp/patches/$patch
fi
cp /tmp/patches/8*_patch_$patch.tar /tmp/patches/$patch
cd /tmp/patches/$patch
tar -xvf 8*_patch_$patch.tar
perl $GENDIR/bin/lasetup patch prod > /tmp/patches/lasetup_patch_$patch.log 2>&1
perl $GENDIR/bin/appmetaload prod $patch > /tmp/patches/appmetaload_$patch.log 2>&1
perl $GENDIR/bin/patchcompile prod $patch > /tmp/patches/patchcompile_$patch.log 2>&1
done
#

Automate MSP Installation

The MSP installation takes a long time, and during the process, a number of questions are asked. One technique I use to manage this process is to "pipe in" the answers, and run the script unattended in the background. To do this, I create a file, called YES.TXT, which "Y" on each of 15 lines, e.g.:

/tmp/patches/YES.TXT
--------------------
Y
Y
.
.
.
Y

Save the MSP .tar file in a directory called /tmp/patches, and use a script to install the Lawson Application MSP (Maintenance Service Pack). It also incorporates any post-MSP transfer packages (CTPs) that are listed in patches.txt (see the previous CTP installation script).

#!/bin/ksh
. /opt/lawson/lawson/lawson.env
#
perl $GENDIR/bin/lasetup staged /tmp/patches /tmp/patches/msp6 802_MSP6 test <License Key> <Client ID> > /tmp/lasetup.log 2>&1
#
appinstall prod < /tmp/patches/YES.TXT > /tmp/patches/appinstall.log 2>&1
#
#Install post MSP CTPs
for patch in `cat /tmp/patches/patchlist.txt`
do
  cd /tmp/patches
  if [ ! -d "/tmp/patches/$patch" ]
  then
    mkdir /tmp/patches/$patch
  fi
  cp /tmp/patches/8*_patch_$patch.tar /tmp/patches/$patch
  cd /tmp/patches/$patch
  tar -xvf 8*_patch_$patch.tar
  perl $GENDIR/bin/lasetup patch prod > /tmp/patches/lasetup_patch_$patch.log 2>&1
  perl $GENDIR/bin/appmetaload prod $patch > /tmp/patches/appmetaload_$patch.log 2>&1
done
#
# compile the product line
cobcmp prod > /tmp/install/compile.log 2>&1

Summary

With just a couple of simple scripts, you'll likely save many hours when installing CTPs and MSPs. Now, you can use that time to do something productive.


2. Managing Lawson Customizations
If you have made customizations to Lawson programs, you will eventually find it necessary to merge your customizations with later Lawson versions. [Read More...]


- QUOTE OF THE ISSUE -
"I don't know the key to success, but the key to failure is trying to please everybody."
- Bill Cosby


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

In the Tips & Tricks section of the last issue (https://www.danalytics.com/guru/letter/archive/2003-08.htm), I offered a tip about needing to open up file protections on the lawson.sec/apps.sec file. This is an empty semaphore file created in the directory above $LAWDIR (e.g., /opt/lawson/) when Lawson security is turned on, and removed when Lawson security is turned off.

What I failed to mention (and which was thankfully pointed out to me by Andy McNeil from TJX!) is that if this file is deleted, it does indeed turn off Lawson security. If the permissions on this file and directory are not properly set, a rogue user with access to the UNIX prompt can turn security off!

The recommended approach on UNIX: the directory -above- LAWDIR (where lawson.sec gets written) should be owned by root, and group should be set to a group which includes only the server/Lawson administrators. Create a group called "lawadmin" and assign the Lawson Security Officers to it.

On Windows, you can do a GREAT deal more with security, using tools like SUBINACL.EXE, and properly planned groups.
Thanks to independent Lawson consultant Kwane McNeal for his input!


4. Worthwhile Reading

Under One Roof
Rather than invest in technology, more firms are outsourcing HR, sometimes with one provider.
CFO Magazine, August, 2003
http://www.cfo.com/article/1,5309,10300,00.html?f=featured

Putting Information Back Into IT
Business process management requires its own architectural paradigm; it is not an adjunct to existing technologies. This article looks at how BPMS may fully realize the business potential that has been promised for so long by IT.
Business Integration Journal, July 2003
http://www.bijonline.com/Article.asp?ArticleID=736&DepartmentID=7

A Special Two-part Report on IT & Health Care
Part 1: Paperless Medicine: Saving Money, Saving Lives
Health-care CIOs face intense pressure to install electronic medical records and order-entry systems, in spite of physician resistance and large up-front costs. Here's how early adopters are overcoming the obstacles.
CIO Magazine, August 1, 2003
http://www.cio.com/archive/080103/saving.html

Part 2: Mobile Medicine: Wireless: Just What the Doctor Ordered
As medical records go electronic, hospital CIOs are finding that wireless networks can get the records to where the doctors and nurses want to use them. CIOs in other industries would do well to watch and learn.
CIO Magazine, August 1, 2003
http://www.cio.com/archive/080103/mobile.html

In Their Orbit
What drives business-technology innovation? Look to large companies' supply chains, not just tech vendors.
Information Week, August 4, 2003
http://www.informationweek.com/story/showArticle.jhtml?articleID=12808009


5. Survey: Can you live without LID?
Lawson has been telling us for years now that LID will be going away. Now with the upcoming Environment release 8.1, this may indeed become reality. All application forms can be access from the Lawson Portal. In fact, Lawson's developers have been given free rein to create forms and portlets that run ONLY in Lawson Portal, and they will not guarantee them to work in LID. Sure, we "power users" will never want to abandon LID, especially for technical tasks. But for that, Lawson wants to sell us the web-enabled "Lawson Terminal". Reminds me of the AS/400 release 7.1, which came out with only LID and NED/JED. Try taking "green-screen" away from the AS/400 crowd! Well, Lawson had to do a quick retrofit in order to appease the customers. So, this month's survey is: "Can you live without LID?" I'm not sure I can. 

Send me your thoughts: mailto:letter-survey@lawsonguru.com.


 6. Lawson Tips & Tricks
Share your tips. Send them to mailto:letter-tips@lawsonguru.com.

If you're using web inbasket within Portal, you may notice that sometimes the inbasket content is "cut off" when it's displayed. In particular, requisitions with many lines may not be viewable on smaller monitor resolutions. This is actually very easy to remedy.

Inbasket content is displayed within Portal using an HTML IFRAME (think of it as a window within a window). The problem is that the IFRAME is fixed to the size of the container window, and content is cut off when it doesn't fit.
Since the inbasket content display is defined using a cascading style sheet, you can change the "overflow" CSS attribute to add scroll bars to the portal content pane automatically when the content doesn't fit.

Edit $WEBDIR/lawson/inbasket/execs/styles.js (make a backup copy first, of course), and in the definition of the PortalStyle variable, change the "overflow" attribute from "hidden" to "auto".

Old Version:
/*** PORTAL BODY STYLE ***/
var PortalStyle = 'BODY'
+ '{'
+ 'background-color: white;'
+ 'font-family: Arial;'
+ 'font-weight: normal;'
+ 'font-size: 10pt;'
+ 'height: 100%;'
+ 'margin: 0px;'
+ 'overflow: hidden;'
+ 'width: 100%;'
+ '}'

New Version:
/*** PORTAL BODY STYLE ***/
var PortalStyle = 'BODY'
+ '{'
+ 'background-color: white;'
+ 'font-family: Arial;'
+ 'font-weight: normal;'
+ 'font-size: 10pt;'
+ 'height: 100%;'
+ 'margin: 0px;'
+ 'overflow: auto;'
+ 'width: 100%;'
+ '}'

You'll now see a scrollable window within the portal content pane when the content is too big for the pane. In can be a little disconcerting to have double scroll bars, but it's better than not seeing the content at all.


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. To subscribe, send an email to: mailto:letter-subscribe@lawsonguru.com

To be removed from the subscription list, send to: mailto:letter-unsubscribe@lawsonguru.com


© Copyright 2003, 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.