To call a program, define a function that uses the Direct Call (DTW_DIRECTCALL) language environment and that includes a path to the program that is to be called in an EXEC statement. For example:
%function(DTW_DIRECTCALL) dc1() { %EXEC { /QSYS.LIB/NETDATA.LIB/MYPGM.PGM %} %}
You can shorten the path to the program if you use the EXEC_PATH configuration variable to define paths to directories that contain programs. See EXEC_PATH to learn how to define the EXEC_PATH configuration variable.
Supported Language Environment Variables
The Direct Call language environment supports the DTW_PAD_PGM_PARMS variable, which indicates whether parameters that are to be passed to a program are to padded with blanks up to the precision specified. See Net.Data Reference for description, syntax, and examples for this variable. See Passing Parameters to Programs for more information on passing parameters to programs.