Using the GENMOD Command

After you compile your application, access any libraries needed using the GLOBAL command, and load your application into virtual storage using the LOAD and INCLUDE commands, issue the GENMOD command to create a MODULE file stored on your disk or directory. Then, issue the file name of the MODULE file to run your application.

Example: Suppose you have an object file called WELCOME TEXT. To create a MODULE file, you must load the required files into storage and then enter the GENMOD command:
load welcome
genmod welcome
Now, CMS generated an executable nonrelocatable program called WELCOME MODULE. See Creating Nonrelocatable and Relocatable Modules for information about creating relocatable and nonrelocatable MODULE files.
To run WELCOME MODULE, enter:
welcome
If your program expects arguments passed to it, you can enter them following the module name. For example, if you want to pass WELCOME MODULE the argument 007, enter:
welcome 007