How to use -GPO -EXTRACT with the NOINC parm so as to not expand -INC statements
-GPO -EXTRACT command does not allow the use of parm NOINC which causes EXTRACT to not expand the -INC statements in the source.
-EXTRACT can only use the NOINC parm when it follows a -OPT UTILITY, not when it follows a -GPO command.
Here is the REXX program you will need to copy to your SYSPROC dataset:
/* REXX EXEC TO ADD NOINC PARM */ RECSI. = '' RECSO. = '' I = 1 O = 1 "EXECIO * DISKR DDIN (STEM RECSI.)" DO UNTIL I > RECSI.0 IF RECSI.I = './ ADD NAME=' THEN DO J = I + 1 PARSE VAR RECSI.J EXTRLIT REST IF EXTRLIT = '-EXTRACT' THEN DO PARSE VAR RECSI.J 10 LONGNAME 19 PARSE VAR LONGNAME MBRNAME ',' REST O = I RECSO.O = './ ADD NAME=' || MBRNAME O = O + 1 PARSE VAR RECSI.J LIT1 LIT2 REST2 RECSO.O = LIT1 || ' ' || LIT2 || ',NOINC' O = O + 1 I = I + 2 END ELSE I = I + 1 END ELSE DO RECSO.O = RECSI.I O = O + 1 I = I + 1 END END ADDRESS MVS 'EXECIO * DISKW DDOUT (STEM RECSO. FINIS)'
Sample JCL to run the 4 step process is attached. You must update the appropriate dataset names and specify appropriate file sizes based on the size of your master file.