Defining a New Project (pme01)

/****************************************************************/
/*          S A S   S A M P L E   L I B R A R Y                 */
/*                                                              */
/*    NAME: PME01                                               */
/*   TITLE: Defining a New Project (pme01)                      */
/* PRODUCT: OR                                                  */
/*  SYSTEM: ALL                                                 */
/*    KEYS: PM                                                  */
/*   PROCS: PM                                                  */
/*    DATA:                                                     */
/*                                                              */
/* SUPPORT:                             UPDATE:                 */
/*     REF: Example 1 from the PM Chapter (PM User's Guide)     */
/*    MISC: Note that PROC PM is invoked with the NODISPLAY     */
/*          option in this program. To run the example in the   */
/*          User's Guide, remove the NODISPLAY option and       */
/*          follow the steps outlined in the Example.           */
/*                                                              */
/*          This file also contains the statements used in the  */
/*          other examples in the PM chapter. You can use these */
/*          statements to invoke the PM Window for each example */
/*          after editing the project using the instructions    */
/*          given in the User's Guide for the previous example. */
/****************************************************************/

/* Initialize the Activity data set */
data software;
   length activity $20.;
   input activity $ actid succid pntid duration;
   datalines;
;

data softattr;
   length projattr $8. pratcval $200.;
   input projattr pratnval pratcval;
   datalines;
;

proc pm data=software project=softattr
        date='1mar04'd interval=weekday
        projname='Software Project'
        out=softout1
        nodisplay          /* to get PMWINDOW, remove this option */
        ;
   act actid;
   succ succid;
   project pntid;
   duration duration;
   id activity;
   run;

/****

*   Add activities in the PM Window as described in the   ;
*   User's Guide to define the Software project           ;

title 'Schedule Data Set';
proc print data=softout1;
run;

     ****/

/****************************************************************/
/*          S A S   S A M P L E   L I B R A R Y                 */
/*                                                              */
/*    NAME: PM2                                                 */
/*   TITLE: Adding Subtasks to a Project (pm2)                  */
/* PRODUCT: OR                                                  */
/*  SYSTEM: ALL                                                 */
/*    KEYS: PM                                                  */
/*   PROCS: PM                                                  */
/*    DATA:                                                     */
/*                                                              */
/* SUPPORT:                             UPDATE:                 */
/*     REF: Example 2 from the PM Chapter (PM User's Guide)     */
/*    MISC: The statements below can be used to invoke the PM   */
/*          Window on the project saved in Example 1.           */
/*                                                              */
/****************************************************************/

/****

* Invoke PROC PM as follows using the output data set from Example 1;

* Then follow the steps outlined in Example 2 ;

proc pm data=softout1 project=softattr
        date='1mar04'd interval=weekday
        projname='Software Project'
        out=softout1;
   act actid;
   succ succid;
   project pntid;
   duration duration;
   id activity;
   run;

   ****/

/****************************************************************/
/*          S A S   S A M P L E   L I B R A R Y                 */
/*                                                              */
/*    NAME: PM3                                                 */
/*   TITLE: Saving and Comparing Baselines (pm3)                */
/* PRODUCT: OR                                                  */
/*  SYSTEM: ALL                                                 */
/*    KEYS: PM                                                  */
/*   PROCS: PM                                                  */
/*    DATA:                                                     */
/*                                                              */
/* SUPPORT:                             UPDATE:                 */
/*     REF: Example 3 from the PM Chapter (PM User's Guide)     */
/*    MISC: The statements below can be used to invoke the PM   */
/*          Window on the project saved in Example 2.           */
/*                                                              */
/****************************************************************/

/****

* Invoke PROC PM as follows using the output data set from Example 2 ;

* Then follow the steps outlined in Example 3 ;

proc pm data=softout1 project=softattr
        date='1mar04'd interval=weekday
        projname='Software Project'
        out=softout3;
   act actid;
   succ succid;
   project pntid;
   duration duration;
   id activity;
   run;

   ****/

/****************************************************************/
/*          S A S   S A M P L E   L I B R A R Y                 */
/*                                                              */
/*    NAME: PM4                                                 */
/*   TITLE: Effect of Calendars (pm4)                           */
/* PRODUCT: OR                                                  */
/*  SYSTEM: ALL                                                 */
/*    KEYS: PM                                                  */
/*   PROCS: PM                                                  */
/*    DATA:                                                     */
/*                                                              */
/* SUPPORT:                             UPDATE:                 */
/*     REF: Example 4 from the PM Chapter (PM User's Guide)     */
/*    MISC: The statements below can be used to invoke the PM   */
/*          Window on the project saved in Example 3.           */
/*                                                              */
/****************************************************************/

/****

*  Define a Calendar data set identifying            ;
*  Saturday as a workday                             ;
data calendar;
   input calid calname $ _sat_ $;
   datalines;
1 Sixday WORKDAY
;

*  Add the CALID variable to the Activity data set   ;
*  saved in the preceding example                    ;
data softout3;
   set softout3;
   calid=.;
   run;

*  Use softout3 as the Activity data set and specify ;
*  the preceding calendar data set                   ;
proc pm data=softout3 project=softattr
        calendar=calendar
        date='1mar04'd interval=weekday
        projname='Software Project'
        out=softout4;
   act actid;
   succ succid;
   project pntid;
   duration duration;
   id activity;
   calid calid;
   run;

   ****/

/****************************************************************/
/*          S A S   S A M P L E   L I B R A R Y                 */
/*                                                              */
/*    NAME: PM5                                                 */
/*   TITLE: Defining Resources (pm5)                            */
/* PRODUCT: OR                                                  */
/*  SYSTEM: ALL                                                 */
/*    KEYS: PM                                                  */
/*   PROCS: PM                                                  */
/*    DATA:                                                     */
/*                                                              */
/* SUPPORT:                             UPDATE:                 */
/*     REF: Example 5 from the PM Chapter (PM User's Guide)     */
/*    MISC: The statements below can be used to invoke the PM   */
/*          Window on the project saved in Example 4.           */
/*                                                              */
/****************************************************************/

/****

*  Define a Resource data set specifying   ;
*  1 Tester and 1 Programmer as the        ;
*  available resources                     ;
data resources;
   input _date_ date7. Tester  Programmer;
   datalines;
01jan04  1  1
;

*  Add the resource variables Tester and       ;
*  Programmer to the Activity data set         ;
*  (the output data set saved in last example) ;
data softout4;
   set softout4;
   Tester=.;
   Programmer=.;
   run;

*  Use softout4 as the Activity data set and    ;
*  specify the preceding Resource data set.     ;
*  Save the schedule in softout5.               ;
proc pm data=softout4 project=softattr
        calendar=calendar
        resourcein=resources
        date='1mar04'd interval=weekday
        projname='Software Project'
        out=softout5;
   act actid;
   succ succid;
   project pntid;
   duration duration;
   id activity;
   calid calid;
   resource Tester Programmer / per=_date_;
   run;

*  Change the resource availability for Programmer to 2 ;
data resources;
   input _date_ date7. Tester  Programmer;
   datalines;
01jan04  1  2
;

*  Use softout4 as the Activity data set and specify ;
*  the preceding Resource data set.                  ;
*  Save the schedule in softout5.                    ;
proc pm data=softout4 project=softattr
        calendar=calendar
        resourcein=resources
        date='1mar04'd interval=weekday
        projname='Software Project'
        out=softout5;
   act actid;
   succ succid;
   project pntid;
   duration duration;
   id activity;
   calid calid;
   resource Tester Programmer / per=_date_;
   run;

    ****/

/****************************************************************/
/*          S A S   S A M P L E   L I B R A R Y                 */
/*                                                              */
/*    NAME: PM6                                                 */
/*   TITLE: Editing Progress (pm6)                              */
/* PRODUCT: OR                                                  */
/*  SYSTEM: ALL                                                 */
/*    KEYS: PM                                                  */
/*   PROCS: PM                                                  */
/*    DATA:                                                     */
/*                                                              */
/* SUPPORT:                             UPDATE:                 */
/*     REF: Example 6 from the PM Chapter (PM User's Guide)     */
/*    MISC: The statements below can be used to invoke the PM   */
/*          Window on the project saved in Example 5.           */
/*                                                              */
/****************************************************************/

/****

*  Use softout5 as the Activity data set and specify  ;
*  the Resource data set defined in the last example. ;
*  Save the schedule in softout6.                     ;
proc pm data=softout5 project=softattr
        calendar=calendar
        resourcein=resources
        date='1mar04'd interval=weekday
        projname='Software Project'
        out=softout6;
   act actid;
   succ succid;
   project pntid;
   duration duration;
   id activity;
   calid calid;
   *  Use the ACTUAL statement to specify the Progress variables  ;
   *  and the value of TIMENOW saved from the previous invocation ;
   actual / as=a_start af=a_finish
            remdur=rem_dur pctcomp=pct_comp
            timenow=&timenow;
   resource Tester Programmer / per=_date_;
   run;

    ****/