X-Delivery-Notice:  SMTP MAIL FROM does not correspond to sender.
Return-Path: rjf2@PHPDLS1.EM.CDC.GOV
Encoding: 80 TEXT
X-Mailer: Microsoft Mail V3.0 (beta-2)
Newsgroups: bit.listserv.sas-l
Date:         Thu, 31 Dec 1992 11:07:00 EST
Reply-To:     rjf2@PHPDLS1.EM.CDC.GOV
From:         rjf2@PHPDLS1.EM.CDC.GOV
Subject:      macro: EXECPDSM == Observations.monthly

content      : Information
summary      : macro: EXECPDSM,
               a polished version of MONTHLY
               from Observations Vol. 2, No. 1, 4th Q., 1992, pg 63-4
rlse/platform: V6.07 / MVS
Ron Fehd     :                SMTP:BitNet:    <rjf2@phpdls1.em.cdc.gov>
              Centers for Disease Control
              1600 Clifton Rd  MS:G25         FAX  : 404/639-1778
              Atlanta, GA 30333  USA          phone: 404/639-1707


!*!*!*!*!*!*! Merry Manifestations and Happy New You !*!*!*!*!*!*!*!*!*!*

The Macro Maven
and Serious Reader of
Observations,  The Technical Journal for SAS(r) Software Users
peripherally presents the code for MONTHLY, Version RJF2,
                               aka EXEPDSM

happy crunching!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!

%MACRO EXECPDSM(INPUTPDS=);/*-----------------------------------------**
a macro to read the member-list of an MVS PDS and submit chosen jobs

release/platform: V6.07 MVS

from Observations, The Technical Journal for SAS software users
                   Vol 2, No. 1, 4th Qtr, 1992, pg 64

usage:  %EXECPDSM(INPUTPDS=<your.pds.name>);
usage:  %EXECPDSM(INPUTPDS=rjf2.mpeptli.q9206pgm);

additional polishing:
RJF2:92Dec31 added statements for choosing members and batch submit
......................................................................*/

filename PDS     "&INPUTPDS";    /* dquote for macro expansion*/
filename MEMLIST '&TEMPLIST';    /* squote for MVS to create temp file*/

proc SOURCE   indd  = PDS
              dirdd = MEMLIST    /*write to temp file*/
              nodata             /*output only member list*/
              noprint;
run;                             /*write the temp file*/

DATA _NULL_;                   /*read list and make mac-vars */
  retain Count 0;
  infile MEMLIST  end=EndoFile;
  input Member $8.;

  if    1
   /*substr(Member,1,2) = 'Q4'*/
     then do;                  Count + 1;
                               call symput('JOB']]left(put(Count,5.)),
                                           trim(Member));
                               /* create mac-vars: JOB1 .. JOBn **/
                                                                    end;
  if EndoFile then             call symput('HOWMANY',put(Count,5.));
                                         /* howmany mac-vars created? */

run;                           /* enable the mac-vars */

%DO I = 1 %TO &HOWMANY.;
 /* %tso submit %str(%'&INPUTPDS(&&JOB&I)%'); /*for interactive usage**/
    %include PDS(&&JOB&I) / jclexcl;          /*for batch usage      **/
                          /*jclexclude: want only the program code   **/
                                                                   %END;
 /*.............................................................*/%MEND;

%EXECPDSM(inputpds=rjf2.mpeptli.q9206pgm);

endSAS;/* & email to SAS-L ...........................................*/
Comments: Gated by NETNEWS@AUVM.AMERICAN.EDU