Work Files

A work file is a non-database file that a program uses to store and retrieve information. The Lawson system uses work files to accomplish many different tasks, including:

  • Work with data sorted in an order not indexed in the database

  • Increase the efficiency of a program--working with flat files (nonindexed files that can take a variety of formats--is faster than using SQL data files in some cases)

  • Import or export data from desktop spreadsheets or Electronic Data Interchange (EDI)

  • Pass data between Lawson programs, rather than writing to the database and reading the same data from a second program

  • Create a secondary print file

  • Create a print file associated with an online program, such as printing an invoice entry

There are also comma-separated-value (CSV) files as a type of work file, even though these are not work files in the traditional sense. The data records in CSV files are arranged by using a comma or some other character to separate the data fields. This makes the file portable between applications, such as between a Lawson application and a spreadsheet program.

The location of work files varies, depending on the type of work file. It is important to know the location of work files, especially in the case of input work files. This is because you need to know where to place the files so that programs can access them and, in the case of files that are of the sequential, index sequential, external sequential, or random type, you must make sure that symbolic links exist between the location in the IFS and the member within a data physical file.

Work File Type Storage Location
Printer, Tape, or CSV

In the IFS in ASCII format.

The default location in the IFS is:

/EnvironmentDirectory/law/DataArea/work

Sequential, Index Sequential, External Sequential, or Random

As members in IBM i physical files, with symbolic links in the IFS.

For output files, the work file routines in the runtime system automatically create the symbolic links for these types of output files.

For input files, you create the symbolic links for these work files during installation with the CRTWRKLNK command. You must also use CRTWRKLNK for any new Lawson data area that you create after the initial installation. If you designate a different input file through a program’s parameters, you must define the symbolic link for the new input file. See Creating Symbolic Links.