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.

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. If your login does not include a call to LAWENV, set the environment variables.

    1. If you installed Lawson Core Technology on an IASP, at the IBM i command prompt, type

      SETASPGRP IASPName

    2. To set the variables, at the IBM i command line, type

      CALL LAWENV

      The list of available Lawson Environments appears on your screen.

    3. Type the appropriate Environment name and press Enter.
  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. Make sure that the $LAWAPPSRCLIB and $LAWAPPPGMLIB directories exist and that /etc/lawson/lawson.env contains entries for these.
  6. 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:

    • The database configuration file, IBM

    • dictlock

    • plda.cfg

    • editdafile

    • $LAWDIR/fromPL/Admin/*.log

    • $LAWDIR/fromPL/Admin/appmetadiff.rpt

  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