Passing parameters to your assembler language program
On CMS, you can pass parameters to an assembler language program
with the START command. The statement below shows how to pass parameters
to your program using the CMS START command:
START MYJOB PARM1 PARM2
The parameters must be no longer than eight characters each, and must be separated by spaces.
CMS creates a list of the parameters that are passed to the program
when it is run. The address of the parameters is passed in register
1. The parameter list for the command above is:
PLIST DS 0D
DC CL8'MYJOB'
DC CL8'PARM1'
DC CL8'PARM2'
DC 8X'FF'
where the list is terminated by
hexadecimal FFs.If your program is started using the CMS OSRUN command, the parameters are passed in the same way as described for z/OS® in Accessing execution parameters.
If a module was created using the CMS GENMOD command and run using the MODULE name, the parameters are passed in extended parameter list format. The address of the parameter list is passed in register 0.
The format of the extended parameter list is:
- Offset
- Field
- 0
- Address of command name
- 4
- Address of beginning of options
- 8
- Address of end of options
- 12
- User word
- 16
- Reserved