Library Definition

Libraries of frequently used routines are stored in the Lawson directories $LAWDIR/pdlib and $LAWDIR/wslib.

Library type Location
Global libraries $LAWDIR/pdlib, $LAWDIR/wslib
Specific to one product line

$LAWDIR/productline/xxsrc/pdlib

$LAWDIR/productline/xxsrc/wslib

The pdlib directory contains procedural code. The wslib directory contains working storage data declarations. Library routines can be copied or generated and tailored based on their use. Lawson Software supplies global libraries; for more information, see Doc for Developers: Lawson 4GL Application Program Interfaces..

When you build a shell for a program, bldsh copies the procedural code or data definition source language statements into the PD or WS divisions of the COBOL program shell.

You can use the Lawson Editors (led/lx) to code routines. When more than one program uses a routine, you can first move the library to the appropriate directory, and then define the routine in a library using Library Definition, making it possible for the precompiler to access it. If you add routines to an existing library, you must define it again through Library Definition by first deleting and then reading the definition.