Copying a Product Line to Create a New Product Line

Use this procedure if you want to copy an existing product line to another Environment in order to create a new product line that is a duplicate of the existing one.

If you want to copy a product line from a UNIX system to a Windows system, please see Copying a Product Line to Create a New Product Line (UNIX to Windows).

This procedure assumes you have completed the preparation steps for copying a product line. See Preparing the "From" Product Line.

Note: In the procedure below, fromPL refers to the name of the product line you are copying and toPL refers to the name of the new product line that you are creating by copying from an existing one.

To copy a product line in order to create a new product line

  1. Log in as lawson to the "To" machine.

    This user should have access to all Environment executables.

  2. Set the environment variables.

    . cv fromPLenvName

    umask 000

  3. Turn off security. At the command line, type

    lsconfig -c password OFF

  4. Create the product line. At the command line, type

    createprodline toPL

  5. Copy the product line source from the "From" system to the "To" product line. You do not need to copy all directories and files from the "From" product line. If you are copying between different machines or servers, you may want to consider creating a compressed version of the files and directories to be copied in order to reduce the copying time.

    Exclude the following directories when copying:

    • obj

    • int

    • The int directories within the system code source directories, such as hrsrc/int.

    • map

    • rptmap

    • backup

    • edi

    Exclude the following files when copying:

    • Database configuration files, such as IBM or ORACLE.

    • dictlock

    • plda.cfg

    • editdafile

    • $LAWDIR/fromPL/Admin/*.log

    • $LAWDIR/fromPL/Admin/appmetadiff.rpt

  6. Correct the file permissions in the "To" product line. (This uses the Perms.cfg in $LAWDIR/system.) At the command line, type

    permsmaint –s –a –p toPL

  7. Load the "To" product line application metadata into the GEN metadata runtime repository. At the command line, type

    perl $GENDIR/bin/appmetaload -a toPL

  8. Set up the "To" product line database and database configuration file. This will overwrite any database configuration (that is, the editdafile and plda.cfg files) resulting from the copying of the existing product line.

    At the command line, type

    perl $GENDIR/bin/pldbsetup -f toPL

    editda -c toPL $LAWDIR/toPL/editdafile

  9. Build the dictionary for the "To" product line. At the command line, type

    blddbdict toPL

  10. Create the "To" product line database. At the command line, type

    dbcreate toPL

  11. Load the application data in CSV files. At the command line, type

    perl $GENDIR/bin/apploadcsv -a toPL

  12. Compile all the programs in the "To" product line. At the command line, type

    perl $GENDIR/bin/patchcompile -a toPL

    Check for compile errors and resolve them.

  13. Load application data into the new product line database. For instructions, refer to the Data Access guide for your database.
  14. If you want to duplicate the security settings of the "From" product line, load the security dump files created from the "From" product lines. At the command line, type

    lsload PROFILE dumpFileName -p profileID -d toPL -a toPL -addRoleMapping

  15. Turn on security. At the command line, type

    lsconfig -c password ON