To create a new program by copying source code files
-
Create a program definition by using the Program Definition
utility (
pgmdef
). - 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.
- 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.
- Make any other necessary changes to the source files to reflect the business logic you need.
- 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.
- Compile the program. For information on compiling form definitions, see Compiling a Form. For information on compiling report definitions, see Compiling a Report.
- Test the program.
- 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.