Donations appreciated to help pay for the hosting and bandwidth

Xyon Technology Consulting LLC

David's Lawson Scripts




The fine print: Clinical trials have shown that this information may cause weakness, twitching and flatulence. The information on this system is FREE (excluding title, tax and dealer prep - batteries not included - partial assembly may be required - member FSLIC - substantial penalty for early withdrawal - but, your mileage may vary). Use at your own risk. If anything here melts your system, wilts your house plants, steals your pencils or starts a thermonuclear war, you are on your own.
Listed here are scripts, tips, tricks, notes and ideas that I've discovered/stolen/developed or had contributed over years of working with Lawson Software.   They are yours to use as you please, but PLEASE read and understand what they do before using them.

These evolve through contributions, modifications and use, so check back regularly for new/updated items.

I welcome your contributions/additions/corrections.

Last Updated 01 September, 2020

Got a question on something here, something you'd like to share or an idea you'd like to see developed? Let us know in our forum.

Lawson Shell and Perl Scripts
LEM - Lawson S3 Environment Monitor system - Produces webpages showing the status of all the monitored processes in all your environments. Notifications via email - with escalation. Follow the link to read more about LEM and register for the download. By: J. David Schronce LEM 20Oct2008
Create XML to mass change Lawson SSO passwords with ssoconfig from your list of ids and passwords. BACKUP YOUR LDAP BEFORE USE! - By: J. David Schronce 20Oct2008
Create a list of all your migrated RDIDs so you can use the script above - By: J. David Schronce 20Oct2008
Watch your 9.0 Application Upgrade Copy jobs run. Shows you number of upgraded records and percent complete in each running job. Allows you to calculate accurate completion times. - by J. David Schronce 21Oct2008
Double-check programs' pgmdef settings - by J. David Schronce - based on a "Tips and Tricks" entry in LawsonGuru
  • Programs which don't have the 'in production' flag set (and therefore aren't compiled by cobcmp or patchcompile)
  • Programs which have the type set to 'Prototyped and 4GL' (which will have empty .xml files created and generate Portal errors...) 07Feb2008
Count and display recently active Portal users - 8.0.X specific Does not work under LSF 9.X.. - by J. David Schronce 07Jan2008
Count recently active Portal users - 9.0.X specific also works under 8.X.. - by J. David Schronce 22Jan2008
Report on hourly Portal usage - both number of Users and number of servlet transactions. 8.0.X specific Does not work under LSF 9.X.. - by J. David Schronce 07Jan2008
Report on hourly Portal usage - both number of Users and number of servlet transactions. 9.0.X specific Also works under 8.X.. - by J. David Schronce 31Jan2008
List all the URLs available on your LOCAL webserver - by J. David Schronce
Ever have a time when you can't remember the URL for an environment? 'findweb' reads the httpd.conf files and looks up the URLs for you. 04Feb2008
Generate dbdoc and dburf html docs for all your systems to use with Portal Help - by J. David Schronce 22Jan2008
Dump and load the Report Writer Tables from PL to PL
(Clone Report Writer Reports) - by Alistair Hull 27Nov2007
Start/Stop all your regular Lawson processes from a single command, using consistent syntax - with logging and log rotation. - by J. David Schronce 24Sep2007
Clean up tmp* files in work directories that are "X" days older than any files left by any jobs currently in "Waiting" status - by J. David Schronce
The "SAFE" way to clean up the work directories. 24Sep2007
Removes old files from whatever directory you specify. It's great for removing those old log files and temp files you no longer need, with the added plus of an "OOPS!" feature that stores those "deleted" files for a specified number of days before "REALLY" deleting them. - by J. David Schronce
Updated 07/11/27 - Fixed "X" REGEX issue 24Sep2007
Compresses old files from whatever directory you specify. It's great for compressing those old log files and temp files you might need later. - by J. David Schronce 24Sep2007
Replicate /etc/password entries from another server. AIX Specific - by J. David Schronce 02Oct2007
Creates csv files of CTPs for each productline in every environment on a machine, then produces a spreadsheet comparing all of them. - by J. David Schronce calls
Creates csv files of versions of every environment on a machine, then produces a spreadsheet comparing all of them. - by J. David Schronce calls
Executes any program/script specified on the commandline in every active environment - by J. David Schronce 24Sep2007
List all versions of all components of all environments/productlines on a Lawson Applications server - by J. David Schronce
Creates both web pages and downloadable CSV files for easy lookup/comparison of Patches Installed Code versions, GENDIR/programs, jar and class files, much more... Both 8.X and LSF 9 compatible.
lavers.2.1.tar 18Sep2007
Package and Unpack Productlines - for copying across
multiple Environments or Machines - by J. David Schronce
Watch your Productline compiles in real time as they run - by J. David Schronce
Updated 21Nov2008 21Nov2008
An enhanced version of qstat - by Jeffrey Cole 28Nov2004
Find and compile *.err files - by Cary Conover
Updated 06/16/2004 by J. David Schronce
Now supports -l (local compiles) and -U (User Exits) 16Jun2004
Renumber your COBOL code after making changes - by J. David Schronce 08May2007
With the delivery of 8.1+ applications, the int directories moved inside the ??src trees, making it more difficult to clear all the 'int files' when compiling mods and patches. rm_int solves that problem. Use ONLY on 8.1 and higher productlines. - by J. David Schronce 14Mar2006
Create CSV of Database File Definitions for any productline - including GEN by J. David Schronce 29Jun2005
Previews the CTP installation process to tell you what
will be installed in the product line and what programs
are going to be compiled, along with why they are going
to be compiled. By: Jim Lincoln
Updated - 16Dec2004 16Dec2004
Dump any productline schema to STDOUT in csv format by Ron Wright and J. David Schronce 21Aug2005
Compile a version listing of all parts of all productlines
on all Lawson systems By: Jim Lincoln 28Nov2004
Compile (or list) all programs associated with a library - by Ted Schreckenghost 09Feb2004
Install CTPs with a single command - by Cary Conover 10Dec2003
Dynamically generates login menu for Lawson Users
Users choose from all available environments - then productline
Optionally grants or revokes commandline access
Works with GUI or text logins - by J. David Schronce
Updated 30 Nov, 2004
login_menu 30Nov2004
Have you ever just installed an environment with the latest ESP and gone to the patch page only to discover another 15-20 fixes? Well this little baby will make a breeze of putting in those pesky fixes in their place. - By Fred Metry 30Jan2004
Add users to Apache and RD30 at the same time - by Alistair Hull 30Jan2004
Automate deljobhist command from Unix cron - by J. David Schronce: 29Jan2004
Use an Access Control list to limit access to an Environment - by J. David Schronce:
Restore the Environment to it's previous access:
Environment Lock and Unlock Documentation:
'cv' between Environments and maintain your prompt showing your current directory. This little 3 liner defeats that annoying problem of pre-LSF 9.0 'cv' freezing your prompt. by J. David Schronce cvp 30Nov2004
Menu driven cv for those machines with multiple environments. 'cvm' with no environment name displays a dynamically generated menu of available Lawson Environments, selectable by number. Perfect for the lazy admin who doesn't like typing long env names. Also incorporates the dynamic prompt from cvp. - by J. David Schronce UPDATED 2007 Jul 18 Added display of productlines for each environment and eliminated any environment listed in /etc/lawson.env that is not actually installed. cvm 18Jul2007
Compile a productline - Randomized to avoid contention of the int files - by J. David Schronce
Errors Fixed - Updated 15Mar2004 This feature was added as the default behaviour of 'cobcmp' in but this script is still more efficient. 15Mar2004
Copy Custom Code - between Productlines/Environments/Systems - by J. David Schronce 04Sep2002
Copy custom code between productlines/environments/machines - by Milo Tsukroff
To move a program, the user first runs A transfer folder is created. The folder is then moved to another server, and the program is then created or updated using - Note: Requires the most recent AMT.
See who is currently logged in with LID to any environment - by J. David Schronce: 29Jan2004
Start Tomcat, Apache, RMI, ProcessFlow and Inbasket from anywhere with a simple command - by J. David Schronce: Startup Scripts 13May2004
stop/start/restart/backup Tivoli Directory Server from anywhere with a single command. - by J. David Schronce: 08May2008
stop/start/restart WebSphere from anywhere with a single command. Specifically for WAS 6.0 with LSF 9.0 and higher - by J. David Schronce: 15Mar2006
stop/start/restart WebSphere with LANDMARK from anywhere with a single command. Specifically for WAS 6.0 with LSF 9.0 and higher - by Mark McGee 25Sep2007
stop/start/restart IBMIHS from anywhere with a simple command. - by J. David Schronce: 15Mar2006
Tomcat files
The files in this section have been removed due to Lawson's end ofsupport for Tomcat
You can send me an email to request these files if you still need them for AIX 5.2 Apache2 and Tomcat 4.1 - Craig Needham 21Nov2005
mod_jk.2so for HP Apache2 and Tomcat 4.1 - from the HP website 07Jul2004 for HP 11.11 - by Saroosh Irani
29Jan2004 for Sun Solaris 2.8 - by Saroosh Irani 29Jan2004 compiled on sun9 , tomcat 4.1.31 ,apache 2.0.54, Jakarta 1.2.4 connectors - by Brian Carr 09Sep2005
Text and Web Pages
Step by step instructions for a complete LSF9 installation on Windows by: Sara C. Kertesz

As Sara notes in the doc, she is not Lawson Certified, and neither she nor I can vouch for the validity of the documentation she sent me. Use at your own risk. ---dave---
Windows LSF9 Install
How to manually uninstall Update Installer utility from IBM for Websphere software - By: J. David Schronce Uninst_WAS_Upd_Inst.txt
Links to AGS, DME and IDA documentation for the 8.0.3 environment.
Also reference Lawson KB article 549882 which is a detailed walkthrough using the debug in portal to troubleshoot API calls.
AGS Calls
DME Calls
IDA Calls
Webpage to test your 8.X IOS and Portal installation - by J. David Schronce: IOStest.html 08Oct2002
Shell scripts to generate Apache password change webpages for Portal. Uses same 'look and feel' as Portal login page - by J. David Schronce
Rename files to htpassform.exe and htpassaction.exe and chmod 750 (at least) so Apache will execute them.
Install both files in $CGIDIR
Edit default.xml
<ITEM id="PASSWD" labelid="Change Password" href="/cgi-lawson/htpassform.exe"/>
Shell scripts to allow your helpdesk administer Apache passwords for Portal without a Unix login. Uses same 'look and feel' as Portal login page - by J. David Schronce
Rename files to htpassadmin.exe and htpassadmin2.exe and chmod 750 (at least) so Apache will execute them. Modify htpassadmin.cfg with a single column list of those who are allowed to update/change user passwords. Install all 3 files in $CGIDIR
Call the program from any browser with http"//servername:port#/cgi-lawson/htpassadmin.exe. User will be authenticated by Apache then internally validated before allowing password changes.
Developed to provide a single file solution to changing Apache user passwords with the look and feel of the Lawson Portal. The script is designed to be run as a bookmark from within the Lawson Portal. Do not have it open a new window. I recommend setting it up as a link in the menus through the role files - just as the online manuals are made available - by Allen Hubble 22Sep2004
Portal Logout works with Internet Explorer 6.0 SP1 and higher. I tested it on a Portal 3.1.2 Systems and above. portal_logout.txt 29Nov2004
Move existing buttons to make room for a LogOut Button in Portal - by Shelley McNeill move_btn.txt 23Jul2005
Add this mod to display the current active productline in Portal display_pline.txt 16Jan2009
The 'tar' command on Solaris 8 is broken, this is the GNU version - allowing you to untar Apache gtar 28Nov2004
Extension for Big Brother to monitor Lawson services/queues - by J. David Schronce 12Dec2000
MicroFocus COBOL Error Codes Explanation - by J. David Schronce MicroFocusErrorCodes.html 14Feb2003
Troubleshoot Portal Form Errors tblshootportal.txt 06Sep2002
Adding Lawson Printers Adding_Printers.txt 01Feb2004
Creating Lawson Users on Unix Systems Creating_Unix_Users.txt 01Feb2004
Executing Lawson Jobs outside the Lawson jobscheduler with jqsubmit, wtsubmit and lacobrts Executing_Jobs.txt 01Feb2004
Migrating Lawson jobs between productlines, environments, even systems Migrate_Jobs.txt 01Feb2004
Migrating 733 Environments off DEC systems in preparation for upgrade Migrating_off_DEC.txt 01Feb2004
Lawson System Admin ToDo List
This was copied from the SWUG site - they are an excellent resource for additional scripts & tips - see them at
SysAdminToDo.txt 16Dec2004
Lawson Go-Live Flowchart
The only complete and definitive flowchart for your Lawson Go-live activities.
Go_Live_FlowChart.pdf 05Nov2008
Windows Specific
Clean up tmp* files in work directories that are "X" days older than any files left by any jobs currently in "Waiting" status - by J. David Schronce
The "SAFE" way to clean up the work directories. - Windows Specific Code by: Dennis Pinckard 05Nov2007
Package and Unpack Productlines - for Windows - by Cary Conover
Find and compile *.err files for Windows - by Cary Conover 25Nov2003
Do a random compile of a whole PL, so you can jack the queue up to 10 or so if you have enough CPU's - by Brent Hawkinson compfirst.bat 12Jan2004
Allows you drop and import/export all tables in Lawson. Especially usefull when doing server migrations, and YES it includes all extended text tables like L_BlaBla cause expsysdb always dies if the PL's DB is big by Brent Hawkinson dodbdump.bat 12Jan2004
Client side approach to closing a portal session after a 5 second idle time, it uses an API callback routine in Kernel32.dll. Use "ilovethisapp" for the name, and the key can be anything... Rename to IEoutPAK.exe after download. by Brent Hawkinson IEoutPAK.bin 12Jan2004
This clusterrun.exe will run any application thats not a cluster application (i.e. processflow) when the Lawson services start up. You add this .exe as a generic application in the cluster. Then you create a batchfile called (launch.bat) in your CCSDIR\processflow directory (then put whatever you want to startup in here like EM/PFLOW etc..). Make sure you have a system environment variable called CCSDIR defined on both nodes in the cluster - This app uses User32.dll, and kernel32.dll, for all API timer/shell routines. It works on both 2000, and 2003 cluster. Rename to ClusterRun.exe after download. Brent Hawkinson ClusterRun.bin 21Mar2004
SQL Scripts
Transfer data between two schema - by Emily Bloomquist
Copies data from a source product line to a target product line for Oracle 8.1.7. It runs much faster than using Lawson tools to copy the data.
transfer_data.sql 15Jun2004
General Shell and Perl Scripts
Display a graphical 'tree' of subdirectories - by J. David Schronce 07Feb2008
Calculate date ahead or behind by X days - by J. David Schronce: Updated 02May2007
Calculate Day of the year from any given date - by J. David Schronce: Updated 01Sep2020
Find a phrase in a file that might span 2 lines - by J. David Schronce: 28Jul1997
Change Unix Passwords inside a script using 'expect' - by J. David Schronce 12May1999
Display the date of the last day of the current month - by J. David Schronce 12Jun1998
Solves Schronce's Theorum for any whole number
Schronce's Theorum: "The sum of any series of consecutive whole numbers, starting with 1,
is equal to the largest number multiplied by 1/2 the largest number plus 1/2 the largest number."

Example: 1 +2 +3 +4 +5 +6 +7 +8 + 9 +10 = 55
Using Schronce's Theorum: (10 * 5) + 5 = 55
- by J. David Schronce

Not too impressive until your string is 1 to 1237, then (1237 * 618.5) + 618.5 = 765703,
and it's MUCH easier than 1 +2 +3 +4 +5 +6 +7 +8 +9... +1231 +1232 +1233 +124 +1235 +1236 +1237

I found out later that Karl Freidrich Gauss beat me to the theorum by about 200 years -
Oh well, at least I was observant enough to see it on my own -
and I *DID* beat him to writing a script to solve it... 03Oct2007
Display a large digital clock on your terminal - J. David Schronce 21Nov2005
For all you AIX admins who find yourselves working on a Sun box - mksysb for Solaris - by J. David Schronce: 02Dec2004
A guide to SED commands with examples - by J. David Schronce: sed.html  
A guide to FIND commands with examples - by J. David Schronce: find.html  
Lawson Application Customization - Managing Changes in Lawson S3 Applications - by Milo Tsukroff  
A guide to "Learn Unix in 10 Minutes" - give it a try... Learn Unix  
Additional Lawson Resources
A web enabled management tool for Lawson LAWADM  
Topica Mailing Lists Lawson Administration
Lawson Tech Geeks
Security Administration
Sarbanes-Oxley Compliance
Lawson Guru Newsletter Lawson Guru  
Great Lawson related Bulletin Board - many interesting topics Lawson Talk  
The South West User Group SWUG  
Comprehensive accounting software resources Accounting Software Directory  
Hardware Supplier and Lawson M3 and S3 Services Provider RYJAC Computer Solutions