To create a new program by copying source code files

  1. Create a program definition by using the Program Definition utility (pgmdef).
    1. Access your development Environment through a Lawson Interface Desktop (LID) session.
    2. Use Form Transfer (F8) to access the Form Transfer form.
    3. In the Form ID field on the Form Transfer form, type pgmdef and click the OK button or press Enter.
    4. In pgmdef, select a product line and system code, and press Enter
    5. Move the cursor to a blank line or press Insert (F8) to create a new line.
    6. For online programs, on the Define Program form, consider the following fields.
      Program Code

      Type a unique code for the program. For online programs, use the format ssNN, where ss represents the system code and NN is a two-digit number. For batch programs, use the format ssNNN, where ss represents the system code and NNN is a three-digit number.

      Program Type

      Select Online Inquiry, Online Update, Batch Update, or Batch Report.

      Program Name

      Type a title for the program.

      Run Type

      Select Four G/L.

      Number of Users per Process

      For online programs, the maximum number of users that may use the same Lawson runtime system process for a program before another is started.

      Can Be Accessed Via INVOKE

      Select Yes if this program will be one that can be invoked by another program.

    7. Press Enter twice to save the program definition.
  2. Create the necessary source files, generally by copying from existing source files. For online programs, you need the program source file and the form definition source file. For batch programs, you need the program source file, form definition source file, and report definition file. Copy from source files that represent programs that are as close as possible to what you need--for example, ones that use the same database files you want to access.
  3. Modify the source files that you copied so that they reflect the new program, the files and fields it needs to reference, and so on. For example, if you are creating a program copied from HR00 but you are naming it ZZ00, then in the form definition source file, you must change the HR00 references to ZZ00.
  4. Make any other necessary changes to the source files to reflect the business logic you need.
  5. If you change a form definition or report definition source file, recompile that source file in order to create new DSD or PRD source files.
  6. Compile the program. For information on compiling form definitions, see Compiling a Form. For information on compiling report definitions, see Compiling a Report.
  7. Test the program.
  8. Move the program object to your production Environment, compile the form definition for this Environment, and, if you want to allow access through a menu, modify a Lawson menu to include the program.