/* Appendix 5: Independent Compile Library Source Files       */

   /* ---- MFCCMODL ----   Model statements for each INDCOMP  */
   /*      source library data step file. special processing. */
   /* DATA step macro variables below here                    */

   /* input SAS data set work below here                      */

   /* line below does not change. last line in file.          */
%mfcdrivr(mfcchpgm=&mfcchpgm,mfcch=&mfcch);



   /* ---- MFCINITC ----   Initialize for INDCOMP job         */
%let mfctype=INDCOMP; /* required for independent compile     */

%let mfcsrref=source; /* DATA step source lib fileref         */
%let mfcsrlib=hilevel.sas.applica; /* HOST lib location       */
filename &mfcsrref "&mfcsrlib" dsorg=po shr; /* HOST          */

%let mfcruref=runpgms; /* SAS library libref                  */
%let mfcrulib=hilevel.sas.runpgms; /* HOST lib location       */

   /* MVS HOST see comments in MFCLIBNA                       */
* %include &mfcsrref(mfclibna); /* HOST                       */
libname  &mfcruref "&mfcrulib" ;

   /* Make permanent SAS data sets available to DATA step     */
   /* source from your application streams.                   */
libname libref  'permanent-dataset';

   /* Optional, to re-create work data sets transferred       */
   /* from application streams.                               */
libname libref  'small-perm-copy-of-work-datasets';

   /* common initialization with application stream           */
%include &mfcsrref(mfcinit); /* HOST                          */

   /* create audit trail information                          */
%include &mfcsrref(mfctrdat); /* HOST                         */



   /* ---- MFCSAMP1 ----                                      */
   /* DATA step macro variables below here                    */
   /* none                                                    */
   /* input SAS data set work below here                      */
   /* none                                                    */
   /* line below does not change. last line in file.          */
%mfcdrivr(mfcchpgm=&mfcchpgm,mfcch=&mfcch);



   /* ---- MFCSAMP2 ----                                      */
   /* DATA step macro variables below here                    */
%let macvar=state;

   /* input SAS data set work below here                      */
   /* assumes data step reads a work data set which is        */
   /* unwieldy to create by running the stream                */
data intosamp;  stateabr='NY';  state='NEW YORK';
        var1=-1; var2=2; var3=3; output;
        state='TESTIT'; output; run;

   /* line below does not change. last line in file.          */
%mfcdrivr(mfcchpgm=&mfcchpgm,mfcch=&mfcch)