To copy a program

You can copy an existing program to a new program in the same product line and system code. This copies the program shell and its painted forms or reports.

It is recommended that you create your own custom system code and program code such as ZZ to store customized programs instead of copying programs into an existing Infor Lawson delivered system code and program code.

  1. On the Program Definition form, press Define (F6) and select Program.
  2. Press Copy (F6).
  3. Specify this information:
    Field Description
    From System

    The system code from which you want to copy a program.

    The default is the system code currently entered on the Program Definition form.

    From Program

    The program code you want to copy. The program name appears next to the code.

    The default is the program currently selected on the Program Definition form.

    To System

    The system code to which you want to copy the program.

    The default is the system code currently entered on the Program Definition form.

    To Program The program code for the copied program.
  4. Press Enter to save the copied program.
  5. Compile the copied program.
    1. On the Program Definition form, press Action (F4) and select Compile.

      - or -

      From the Application Development Workbench menu, select Programmer Utilities, then Compile Tools.

    2. To open the Compile Program window, select Program from the Compile menu.
    3. Select a compile option and specify this information:
      Field Description
      Product Line The product line of the program you want to compile.
      System Code The system code of the program you want to compile.
      Program Code The program code you want to compile.

      For the complete list of qcompile options, see the System Utilities Reference Guide.

    4. Press Enter.
  6. Verify that there is no .err (error) file in LAWDIR/productline/xxsrc (where xx is the system).
  7. Verify in LAWDIR/productline/obj/XXX.gnt (where XXX is the program name) if the program object exists after compiling.
    Note: If you are set up through Lawson Security, you must create a security class using the Lawson Security Admin tool, add a rule that grants access to the token of the copied program, and then assign it to a role.

    For more information, see the Resources and Security Administration Guide.