home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / bit / listserv / sasl / 5494 < prev    next >
Encoding:
Text File  |  1992-12-31  |  3.5 KB  |  88 lines

  1. Comments: Gated by NETNEWS@AUVM.AMERICAN.EDU
  2. Path: sparky!uunet!wupost!zaphod.mps.ohio-state.edu!magnus.acs.ohio-state.edu!usenet.ins.cwru.edu!gatech!paladin.american.edu!auvm!PHPDLS1.EM.CDC.GOV!RJF2
  3. X-Delivery-Notice:  SMTP MAIL FROM does not correspond to sender.
  4. Return-Path: rjf2@PHPDLS1.EM.CDC.GOV
  5. Encoding: 80 TEXT
  6. X-Mailer: Microsoft Mail V3.0 (beta-2)
  7. Message-ID: <2B429BA1@router.em.cdc.gov>
  8. Newsgroups: bit.listserv.sas-l
  9. Date:         Thu, 31 Dec 1992 11:07:00 EST
  10. Reply-To:     rjf2@PHPDLS1.EM.CDC.GOV
  11. Sender:       "SAS(r) Discussion" <SAS-L@UGA.BITNET>
  12. From:         rjf2@PHPDLS1.EM.CDC.GOV
  13. Subject:      macro: EXECPDSM == Observations.monthly
  14. Lines: 72
  15.  
  16. content      : Information
  17. summary      : macro: EXECPDSM,
  18.                a polished version of MONTHLY
  19.                from Observations Vol. 2, No. 1, 4th Q., 1992, pg 63-4
  20. rlse/platform: V6.07 / MVS
  21. Ron Fehd     :                SMTP:BitNet:    <rjf2@phpdls1.em.cdc.gov>
  22.               Centers for Disease Control
  23.               1600 Clifton Rd  MS:G25         FAX  : 404/639-1778
  24.               Atlanta, GA 30333  USA          phone: 404/639-1707
  25.  
  26.  
  27. !*!*!*!*!*!*! Merry Manifestations and Happy New You !*!*!*!*!*!*!*!*!*!*
  28.  
  29. The Macro Maven
  30. and Serious Reader of
  31. Observations,  The Technical Journal for SAS(r) Software Users
  32. peripherally presents the code for MONTHLY, Version RJF2,
  33.                                aka EXEPDSM
  34.  
  35. happy crunching!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!
  36.  
  37. %MACRO EXECPDSM(INPUTPDS=);/*-----------------------------------------**
  38. a macro to read the member-list of an MVS PDS and submit chosen jobs
  39.  
  40. release/platform: V6.07 MVS
  41.  
  42. from Observations, The Technical Journal for SAS software users
  43.                    Vol 2, No. 1, 4th Qtr, 1992, pg 64
  44.  
  45. usage:  %EXECPDSM(INPUTPDS=<your.pds.name>);
  46. usage:  %EXECPDSM(INPUTPDS=rjf2.mpeptli.q9206pgm);
  47.  
  48. additional polishing:
  49. RJF2:92Dec31 added statements for choosing members and batch submit
  50. ......................................................................*/
  51.  
  52. filename PDS     "&INPUTPDS";    /* dquote for macro expansion*/
  53. filename MEMLIST '&TEMPLIST';    /* squote for MVS to create temp file*/
  54.  
  55. proc SOURCE   indd  = PDS
  56.               dirdd = MEMLIST    /*write to temp file*/
  57.               nodata             /*output only member list*/
  58.               noprint;
  59. run;                             /*write the temp file*/
  60.  
  61. DATA _NULL_;                   /*read list and make mac-vars */
  62.   retain Count 0;
  63.   infile MEMLIST  end=EndoFile;
  64.   input Member $8.;
  65.  
  66.   if    1
  67.    /*substr(Member,1,2) = 'Q4'*/
  68.      then do;                  Count + 1;
  69.                                call symput('JOB']]left(put(Count,5.)),
  70.                                            trim(Member));
  71.                                /* create mac-vars: JOB1 .. JOBn **/
  72.                                                                     end;
  73.   if EndoFile then             call symput('HOWMANY',put(Count,5.));
  74.                                          /* howmany mac-vars created? */
  75.  
  76. run;                           /* enable the mac-vars */
  77.  
  78. %DO I = 1 %TO &HOWMANY.;
  79.  /* %tso submit %str(%'&INPUTPDS(&&JOB&I)%'); /*for interactive usage**/
  80.     %include PDS(&&JOB&I) / jclexcl;          /*for batch usage      **/
  81.                           /*jclexclude: want only the program code   **/
  82.                                                                    %END;
  83.  /*.............................................................*/%MEND;
  84.  
  85. %EXECPDSM(inputpds=rjf2.mpeptli.q9206pgm);
  86.  
  87. endSAS;/* & email to SAS-L ...........................................*/
  88.