Tips for Working with the %CPDDUTL GENERATE SOURCE Control Statement

Table Of ContentsIT Service Vision Help


Users who want to create their own table and variable definitions can do so from the following sources of information :

They can use the GENERATE SOURCE statement of the %CPDDUTL macro to build a first version of the CREATE TABLE, UPDATE TABLE, and CREATE VARIABLE statements needed to define the table. The generated source statements can be stored in either a SAS ® catalog member of type .SOURCE or in an external flat file.

Typically, a user would use GENERATE SOURCE when setting up to use a generic collector, in order to aid in defining the table to the PDB. As such, the data set used for staging the data for the generic collector would serve as the DATASET= parameter for the GENERATE SOURCE statement.

If you are required to use a staged data set as input to %CxPROCES you must ensure that it conforms to the following rules:

Once the source statements have been generated, they must be reviewed before being executed. While GENERATE SOURCE endeavors to be as accurate as possible, it is not infallible in some of the assumptions it makes. Specifically, the generated definitions should be examined to verify (and modify if necessary) the following things:

         CREATE VARIABLE NAME=C EXTNAME=CEXT
           TYPE=NUMERIC LENGTH=8 INTERPRET=COUNT KEPT=YES
           SUBJECT='N/A' LABEL='Int var c'
           DESCRIPTION='Integer variable c'
           FORMAT=BEST12.2
           ISTATS =(
           NOCOUNT SUM AVERAGE NOMAXIMUM NOMINIMUM NOUSS NOCV NORANGE
           NOVARIANCE NOSTD NONMISS
           )
		 DAY =(
           NOCOUNT SUM AVERAGE NOMAXIMUM NOMINIMUM NOUSS NOCV NORANGE
           NOVARIANCE NOSTD NONMISS
           )
		 WEEK =(
           NOCOUNT SUM AVERAGE NOMAXIMUM NOMINIMUM NOUSS NOCV NORANGE
           NOVARIANCE NOSTD NONMISS
           )
		 MONTH =(
           NOCOUNT SUM AVERAGE NOMAXIMUM NOMINIMUM NOUSS NOCV NORANGE
           NOVARIANCE NOSTD NONMISS
           )
		 YEAR =(
           NOCOUNT SUM AVERAGE NOMAXIMUM NOMINIMUM NOUSS NOCV NORANGE
           NOVARIANCE NOSTD NONMISS
           )
         ;
  • The GENERATE SOURCE statement builds all of its CREATE VARIABLE statements such that the installable statistics used when a table is installed in the PDB (as indicated by the ISTATS= parameter) are set according to the interpretation type chosen for the variable.

    For more information, see the online help entry "CPDDUTL Create Variable" in the Help Index.

  • It is important to select the interpretation type correctly when you create the variable. The interpretation type cannot be modified via the interactive interface. However, the interpretation type can be modified using %CPDDUTL. In a future release of IT Service Vision, the interactive interface will allow the user to change a variable's interpretation.

    By default, GENERATE SOURCE assigns interpretation type based on the following rules of thumb:

    
              if ...                            assume interpretation type 
              ---------------------------       ---------------------------
    
              the variable format is DATETIMEx  DATETIME
    
              the variable format is TIMEx      TIME
    
              the variable format is DATEx      DATE
    
              the variable format is PERCENTx   PERCENT
    
              the variable label contains       MINIMUM
              the strings MIN or MINIMUM or
    		LWM or LOWEST
    
              the variable label contains       MAXIMUM
              the strings MAX or MAXIMUM or
    		HWM or PEAK or HIGHEST
    
              the variable label contains       COUNT
              the string COUNT or TOTAL or
    		PAGES
    
              the variable label contains       DATETIME
              the string DATETIME
    
              the variable label contains       TIME
              the string TIME
    
              the variable label contains       DATE
              the string DATE
    
              the variable label contains       PERCENT100
              the string PCT or PERCENT or
    		% or UTILIZ or UTILIS
    
    	  the variable label contains       PERCENT
              the string RATIO
    
      	the variable label contains       GAUGE
              the string CURRENT or SIZE or
    		GAUGE
    
      	the variable label contains       SUM
              the string SUM
    
              the variable label contains       RATE
              the string PER or RATE or /HR
    		or /HOUR or /MIN or /SEC
    
              the variable label contains       AVERAGE
              the string AVG, AVERAGE, or
              MEAN or AVE
    
      	the variable label contains       INT
              the string VERSION or NUMBER or
              TYPE or CLASS or PRIORITY or PTY
    
    

    For more information about selecting appropriate variable interpretation types, see the help entry "Variable Interpretation & Default Stats" from the IT Service Vision Help Index or File 5.INTERP.

  • The syntax of the GENERATE SOURCE statement is as follows:

         GENERATE SOURCE
        < NAME= new-table-name >
          TABLE= < input-table-name | _ALL_ > |
          DATASET= 'input-SAS-data-set-name' |
    	INFILE= 'input-file-name'
        < TYPE= INTERVAL | EVENT >
        < INTYPE= DSI >                            see comments below
          ENTRYNAME= 'output-SAS-catalog-entry'
          FILENAME= 'output-physical-file-name'
        < DATETIME= variable-name >
        < DURATION= variable-name >
        < REPLACE | NOREPLACE >
        < NOERROR >
        ;

    where the parameters are as follows:

  • The table name should start with a 'U' to insure that there is no name collision in the future with a supplied table. The name can be 1-7 characters (alphabetic, numeric, and/or underscore) in length.

    When TABLE= is specified and NAME= is not specified, the input-table-name on the TABLE= parameter is used.

    When DATASET= is specified and NAME= is not specified, the name is formed by concatenating 'U' to the first six characters of the input-SAS-data-set name.

  • This parameter must not be specified if the DATASET= or INFILE= parameter is specified.
  • This parameter must not be specified if the TABLE= or INFILE= parameter is specified.
  • This parameter must not be specified if the TABLE= or DATASET= parameter is specified.
  • The type information for TABLE= is not required because the type of the table is already recorded in the PDB's data dictionary for the table.
  • This parameter must only be specified if the INFILE= parameter has also been specified.
  • This parameter must not be specified if the FILENAME= parameter is specified.
  • This parameter must not be specified if the ENTRYNAME= parameter is specified.