Donations appreciated to help pay for the hosting and bandwidth

Lawson Software

David's Lawson Scripts

DISCLAIMER

THE INFORMATION ON THIS PAGE IS PROVIDED 'AS IS', WITH NO WARRANTY OF ANY KIND WHATSOEVER.   I ACCEPT NO RESPONSIBILITY FOR ANY INJURIES, LOSSES OR DAMAGES YOU MAY CAUSE OR INCUR AS A RESULT OF YOUR USING THE INFORMATION ON THIS SITE.   YOU ACCEPT SOLE RESPONSIBILITY FOR YOUR ACTIONS IN RELATION TO THE INFORMATION ON THIS SITE, AND FOR ALL CONSEQUENCES THEREOF.

IF YOU DO NOT ACCEPT THIS POLICY IN ITS ENTIRETY, OR THE LAWS OF YOUR LOCATION DO NOT ALLOW ALL OF ITS PROVISIONS, YOU ARE NOT PERMITTED TO USE THE INFORMATION FOUND ON THIS SITE.


NOTHING ON THIS SITE IS SUPPORTED BY LAWSON SOFTWARE
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 - substantial penalty for early withdrawal - your mileage may vary). Use at your own risk. If anything here melts your Lawson system, wilts your house plants or steals your pens when you're away from your desk, then 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 16 Jan, 2009

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 update_ssop.sh 20Oct2008
Create a list of all your migrated RDIDs so you can use the update_ssop.sh script above - By: J. David Schronce mk_ssop_list.sh 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 ugwatch.sh 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...)
pgmchk.sh 07Feb2008
Count and display recently active Portal users - 8.0.X specific Does not work under LSF 9.X.. - by J. David Schronce pu.sh 07Jan2008
Count recently active Portal users - 9.0.X specific also works under 8.X.. - by J. David Schronce pu9.sh 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 hrpu.sh 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 pu9_rpt.sh 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.
findweb.sh 04Feb2008
Generate dbdoc and dburf html docs for all your systems to use with Portal Help - by J. David Schronce webdocs.sh 22Jan2008
Dump and load the Report Writer Tables from PL to PL
(Clone Report Writer Reports) - by Alistair Hull
rwclone.sh 27Nov2007
Start/Stop all your regular Lawson processes from a single command, using consistent syntax - with logging and log rotation. - by J. David Schronce lwsn.sh 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.
cleanwork.sh 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
age_rm.sh 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 age_zip.sh 24Sep2007
Replicate /etc/password entries from another server. AIX Specific - by J. David Schronce userdupe.sh 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
patch_ss.sh calls patch_list.sh
patch_list.sh
patch_ss.sh
24Sep2007
Creates csv files of versions of every environment on a machine, then produces a spreadsheet comparing all of them. - by J. David Schronce
env_versions_ss.sh calls env_versions.sh
env_versions.sh
env_versions_ss.sh
05Nov2007
Executes any program/script specified on the commandline in every active environment - by J. David Schronce run4all.sh 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
pkg_pline.sh
unpack_pline.sh
14Jan2004
Watch your Productline compiles in real time as they run - by J. David Schronce
Updated 21Nov2008
qstat.sh 21Nov2008
An enhanced version of qstat - by Jeffrey Cole qstat2.sh 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)
errcmp.sh 16Jun2004
Renumber your COBOL code after making changes - by J. David Schronce
cobrenum.sh 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
rm_int.sh 14Mar2006
Create CSV of Database File Definitions for any productline - including GEN by J. David Schronce
filedef.sh 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
CTPpreview.sh 16Dec2004
Dump any productline schema to STDOUT in csv format by Ron Wright and J. David Schronce schemadump.sh 21Aug2005
Compile a version listing of all parts of all productlines
on all Lawson systems By: Jim Lincoln
versionlist.zip 28Nov2004
Compile (or list) all programs associated with a library - by Ted Schreckenghost cmp_lib.sh 09Feb2004
Install CTPs with a single command - by Cary Conover ctpinstall.sh 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 env_patch_installer.sh 30Jan2004
Add users to Apache and RD30 at the same time - by Alistair Hull htadduser.sh 30Jan2004
Automate deljobhist command from Unix cron - by J. David Schronce: jobhistmaint.sh 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:
lock_env.sh
unlock_env.sh
lock_unlock_env.docs
06Sep2002
'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 8.0.3.3 but this script is still more efficient.
rndcmp.sh 15Mar2004
Copy Custom Code - between Productlines/Environments/Systems - by J. David Schronce pgmmove.sh 04Sep2002
Copy custom code between productlines/environments/machines - by Milo Tsukroff
To move a program, the user first runs metacopyoutpgm.sh. A transfer folder is created. The folder is then moved to another server, and the program is then created or updated using metacopyinpgm.sh - Note: Requires the most recent AMT.
metacopyoutpgm.sh
metacopyinpgm.sh
01Oct2007
See who is currently logged in with LID to any environment - by J. David Schronce: whoson.sh 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: tds.sh 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: was.sh 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 was_lmark.sh 25Sep2007
stop/start/restart IBMIHS from anywhere with a simple command. - by J. David Schronce: ihs.sh 15Mar2006
Tomcat mod_jk.so 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
mod_jk.so for AIX 5.2 Apache2 and Tomcat 4.1 - Craig Needham mod_jk_aix5.2.apache20tomcat41.zip 21Nov2005
mod_jk.2so for HP Apache2 and Tomcat 4.1 - from the HP website mod_jk2.so.HP.zip 07Jul2004
mod_jk.so for HP 11.11 - by Saroosh Irani mod_jk_hp11.11.risc1.zip
mod_jk_hp11.11.risc2.zip
29Jan2004
mod_jk.so for Sun Solaris 2.8 - by Saroosh Irani mod_jk_sun28tomcat406.zip 29Jan2004
mod_jk.so compiled on sun9 , tomcat 4.1.31 ,apache 2.0.54, Jakarta 1.2.4 connectors - by Brian Carr mod_jk_sun9_tomcat4.1.zip 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
14Oct2008
How to manually uninstall Update Installer utility from IBM for Websphere software - By: J. David Schronce Uninst_WAS_Upd_Inst.txt
12Nov2008
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
01Oct2007
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
Under LAWMENUBTNPREF add
<ITEM id="PASSWD" labelid="Change Password" href="/cgi-lawson/htpassform.exe"/>
htpassform.exe
htpassaction.exe
30Jan2004
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.
htpassadmin.exe
htpassadmin2.exe
htpassadmin.cfg
09Feb2004
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 chgapachepw.pl 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 bb-lwsn.sh 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 http://swug.net/scripts/
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
cleanwork_win.sh 05Nov2007
Package and Unpack Productlines - for Windows - by Cary Conover unpack_pline.sh
pkg_pline.sh
pline_setenv.bat
win_pline.doc
14Jan2004
Find and compile *.err files for Windows - by Cary Conover win_errcmp.sh 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. ....by 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 tree.sh 07Feb2008
Calculate date ahead or behind by X days - by J. David Schronce: Updated adddays.sh 02May2007
Find a phrase in a file that might span 2 lines - by J. David Schronce: phrase.sh 28Jul1997
Change Unix Passwords inside a script using 'expect' - by J. David Schronce passwdreset.sh 12May1999
Display the date of the last day of the current month - by J. David Schronce: lastday.sh 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
I found out today 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...

addstr.sh 03Oct2007
Display a large digital clock on your terminal - J. David Schronce bigclock.sh 21Nov2005
For all you AIX admins who find yourselves working on a Sun box - mksysb for Solaris - by J. David Schronce: mksysb.sol.sh 02Dec2004
A guide to SED commands with examples - by J. David Schronce: sed.html  
Lawson Application Customization - Managing Changes in Lawson S3 Applications - by Milo Tsukroff LawAppCust.zip  
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