CALLPGM
You can use this function to call a user-written program directly from a script. Many parameters can be passed to the program being called. The program being called must be defined either in LINKLIB or in STEPLIB of the job running the script. Parameters are passed to the user-written program by using standard z/OS linkage. Both numeric and character variables can be passed to the user program. Numeric variables are passed as a full word binary, while character data is passed as a string of characters.
The program called by the CALLPGM function, should not update any of the variables. Variables cannot be updated from the called program. The only data that can be passed back to the script file is the return code. Variable %RC is updated with the return code set by the called program.
If the program defined in the CALLPGM function is not found, an error is displayed and the script is terminated. If an abend occurs while in control of the user-written program, error messages are displayed and the script is terminated.