Windows: Cleaning up LAWDIR/productline/work
If you have several files in the LAWDIR/productline/work directory that are taking up a lot of space and need to clean them up, most can be deleted, but be aware that the files with UPPERCASE file names are often used to transfer data to non-Lawson systems or ACH bank files, and they may be waiting to be used by a future process that has not run yet.
The following procedure is to clean up print files, work files, RQC files, user home directory files, and WebSphere trace and dump files by either running a program or by defining a recurring job that calls the program.
Automated Cleanup of Print Files, Work Files, and Other Files
Use this procedure to clean up print files, work files, RQC files, user home directory files, and WebSphere trace and dump files by either running a program or by defining a recurring job that calls the program. Before running the program or the recurring job, you must set up configuration files. These files enable you to set the cleanup options, exclude specific files from the cleanup process (by file name or by the user name associated with the files), and to specify date ranges for the files to be deleted.
The types of files to be deleted include:
- Completed job entries
- Completed jobs forms and the associated job logs
- Batch report files
- All print files from the print manager
- Files from %LAWDIR%\productline\work directory
- All user-related files from the %LAWDIR%\RQC_work, %LAWDIR%\RQC_work\log, %LAWDIR%\RQC_work\cookies directories
- Log files from the user’s home directory: %LAUNTDIR% directory
- WebSphere trace and dump (.dmp, .phd, javacore and .trc) files that are in subdirectories of the <WASHOME>\profiles directory.
To clean up print files, work files, RQC files, and other files:
- Configure the prtwrkcleanup.cfg file.
You can edit the parameters in the prtwrkcleanup.cfg file in two ways:
- By using the Lawson for Infor Ming.le Administration Tools. See Configuring Automated File Cleanupin the Lawson for Infor Ming.le Administration Guide, 10.1. (This option is only available in Lawson for Infor Ming.le 10.1.)
- By directly editing the file in the %LAWDIR%\system directory. See Directly Updating the prtwrkcleanup.cfg File.
- Configure the prtwrkcln_usrnames.cfg file.
This configuration file is divided into multiple sections:
- Section 1: usernames list for print and completed job cleanup
- Section 2: usernames list for RQC cleanup
- Section 3: usernames list for users home directory cleanup.
The script uses each different section for a different cleanup job. Make sure to put usernames in the right sections to avoid undesired outcomes.
You can enter multiple usernames in either a comma-separated format or a line-break-separated format.
For example:
Username1,Username2,Username3…
Or
Username1
Username2
Username3
Note: Do not remove the section dividers.
- Configure the prtwrkcln_exclude.cfg file.
Use this file to specify a list of file names to be excluded from the work file cleanup process.
You can enter multiple file names in either a comma-separated format or a line-break-separated format.
For example:
Filename1,Filename2,Filename3…
Or
Filename1
Filename2
Filename3
- If you want to run the cleanup program just once, open a command line session and follow the substeps below. (Note that a recurring job may be more useful in the long term. See the next main step below.)
- Ensure that the prtwrkcln executable exists in %GENDIR%\bin.
- In a command line session, navigate to %GENDIR%\bin.
- At the command line, enter the following command:
prtwrkcln.exe
- If you want to run the cleanup program via a recurring job, use the following substeps.
- In Lawson for Infor Ming.le, navigate to Bookmarks> Jobs and Reports > Multi-step Job Definition.
- Specify this information to define a multi-step job.
Job Name
Specify a name for the multi-step job.
Job Description
Specify a description for the multi-step job.
User Name
Displays the name of the user defining the job.
Form
Specify prtwrkcln. (This assumes this form ID exists. Use the For ID Definition utility (tokendef) to check if it exists and to add it as an environment form ID if necessary.)
Step Description
Specify a description for the step.
- Click Addto save the new job.
- Navigate to Related Forms> Recurring Job Definition. Define a recurring job according to the instructions in the “Recurring Jobs” topic in Infor Lawson Administration: Jobs and Reports.
Leave a Reply
Want to join the discussion?Feel free to contribute!