-INCLUDE X will include whatever is in data set X in your code.
If X were -TYPE this is included and your code was
TABLE FILE ZZ
DO SOMETHING
END
-INCLUDE X
SOME MORE STUFF
Your code would then be:
TABLE FILE ZZ
DO SOMETHING
END
-TYPE this is included
SOME MORE STUFF
For example, this is a great way to include (share) common routines among programs and cut down on maintenance. Style sheets are often -INCLUDEd for common look and feel.
I'm not sure that there is a big difference between EX and EXEC but in any case the verb needs an object. Typically, a program is EXECuted is in EXEC myprog.
EX and EXEC are the same. They must be stand alone procedures. If they require parameters, you must explicitly pass them. EX MYPROC PARM1=VAL1,PARM2=VAL2....
Since -INCLUDE brings the code into the calling procedure, it can be any peice of code and will also inherit the parameters from the calling fex.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.