MSI Definition Statements

MSI is an extension to the
MICS Component Generator
(MCG), that creates Field Developed Applications (FDAs) that use SAS data sets as input.
micsrm140
Required roles: systems programmer, security administrator, database administrator
Since MSI generates the code, it allows for rapid development of FDAs to integrate new data into the
MICS database
. The MCG supports the generation of MSI FDAs using the special MSI statements that are listed here.
After reviewing this section and Writing Field-developed Applications, see MSI FDA Checklist for a checklist on installing an MSI generated FDA.
The order of statement appearance is critical.
If optional statements are used, they must appear in the order that is shown in the list that follows. For example, if a COMPUTE statement is being used, it MUST appear after the RENAME statement.
MSI Options Statement (MSIOPTS)
This statement defines the special options for MSI Field Developed Applications.
Statement Format
The MSIOPTS keyword is coded starting in column 1, followed by one or more option keywords, and continuing through column 72. Multiple MSIOPTS statements can be coded, but continuation of a single MSIOPTS statement is not supported.
MSIOPTS options ...
Statement Option Keywords
The MSIOPTS keywords specify options unique to MSI Field Developed Applications. MSIOPTS statements that are coded before the first FILE statement specifies global options that are used by all files in the FDA. MSIOPTS statements that are coded after a FILE statement specify options for that file only. A FILE level option overrides the same option that is specified in a global MSIOPTS statement.
SPLITCHAR character
Some input data sets contain a special character in the variable label that is used by SAS to control line breaks when printing the label. The SPLITCHAR option is provided as a means to instruct MSI to remove the special character from data element labels during MSI FDA file creation.
FILTER filtername | NONE
Certain data sources contain SAS variables that have no meaning under MSI. Generally, these are date and time sequences. MSI currently supports filter types of MXG (the MXG data source), and USR (user defined).
Note:
For each file in fdaGENIN that has an input SAS data set that comes from MXG, if ENDTS, STARTTS, and ORGSYSID statements are not specified, use the following:
MSIOPTS FILTER MXG
CREATEWITH datafilename
This option is coded on an MSIOPTS statement which follows a FILE statement. That preceding file statement specifies a data file that is created simultaneously as datafilename. Datafilename was specified as the FID of a data file defined on an earlier FILE statement in this GENLIB library member.
Createwith files are changed from INPUTSAS to INPUTMODEL. This means that a separate input step is not created for this file.
Detail summarization will be accomplished after the datafilename detail files have been sorted.
MULTWORK | NOMULTWORK
Determines if the file is eligible for Generalized Work File Support. This feature allows
MICS
to distribute work space over several work data sets.
Statement Definition Example
* SET DEFAULT OPTIONS COMP .... INPUTSOURCE MSI * SET DEFAULT OPTIONS MSIOPTS SPLITCHAR * FILTER MXG MSIOPTS NOMULTWORK AREA ... FILE ... * OVERRIDE DEFAULTS AND SET CREATEWITH MSIOPTS SPLITCHAR NONE MSIOPTS MULTWORK MSIOPTS CREATEWITH FFF
Input Data Set Statement (INPUTSAS)
The INPUTSAS and INPUTMODEL statements are used to specify the SAS data set that is used as input for a file in an MSI FDA.
Statement Format
This keyword is coded with the KEYWORD starting in column 1, free-form, and continuing through column 72. Continuation is not supported. The following illustration describes the format and coding rules for the INPUTSAS statement.
INPUTSAS libname.member FILTER fltrname INPUTMODEL | | | +--- FILTER | +--- SASDS
Statement Option Definitions
INPUTSASINPUTMODEL
Defines the input SAS data set for this file.
SASDS
The name of the input SAS data set. This data set name becomes the default input data for all installed units. The libname must be specified in the cccCGEN JCL.
FILTER
(Optional) The MSI defined filter that is used to exclude variables from the SASDS.
fltrname-
This is an optional parameter and only needs to be specified if FILTER is specified.
NONE
no filtering
MXG
Filter variables for the MXG data source.
USR
(Optional) User-defined filtering. For instructions on how to add or modify filters, see MSIFILTR macro.
Only specify this parameter when FILTER is specified.
Statement Definition Example
INPUTSAS PDB.TYPE50
Variable Rename Statement (RENAME)
This statement allows the user to change the name of a variable in the INPUTSAS data set. Renames are applied as the input data is read from the SAS data sets through the RENAME option.
Note:
All subsequent MSI statements must use the RENAMEd value.
Statement Format
This keyword is coded with the KEYWORD starting in column 1, free-form, and continuing through column 72. Continuation is not supported. The following illustration describes the format and coding rules for the RENAME statement.
RENAME orgname newname | | | | | | | | +--- NEWNAME - New variable name | | | +---ORGNAME - original name of the variable on | the input SAS data set. | +-----Statement identifier
Statement Option Definitions
RENAME
Defines the renaming of an input SAS data set variable.
orgname
The eight-character name of the variable on the INPUTSAS or INPUTMODEL data set. If ORGNAME is the same as an existing common data element, COMMON status is revoked.
newname
The eight character new variable name.
Note:
All subsequent statements must refer to NEWNAME.
Required Data Element Definition
For any MSI file, the
MICS data element
s ENDTS, STARTTS, and ORGSYSID must be defined and have values. The required data element statements (ENDTS, STARTTS, and ORGSYSID) are used to assign a SAS variable (from the INPUTSAS data set) to the particular data element.
Statement Format
This keyword is coded with the KEYWORD starting in column 1, free-form, and continuing through column 72. Continuation is not supported. The following illustration describes the format and coding rules for the statement.
ENDTS SASvar STARTTS | ORGSYSID | | | | | | | | | | | | +---SAS variable name | +-----Statement identifier
Statement Option Definitions
ENDTS
STARTTS
ORGSYSID
Required data element definition statement
SASvar
The eight-character name of the variable on the INPUTSAS or INPUTMODEL data set.
Common Exit Definition Statement (COMMONEXIT)
The COMMONEXIT statement provides a special exit, which is coded in SAS, that defines the required data elements (ENDTS, STARTTS, and ORGSYSID). This exit is executed after the required data elements are set (using the MSI ENDTS/STARTTS/ORGSYSID statements) and before user exit cccSYSID.
Do not use a RETURN, STOP, ABORT, or DELETE statement in COMMONEXIT code. Using these statements produces unpredictable results during processing.
Statement Format
This keyword is coded with the KEYWORD starting in column 1, free-form, and continuing through column 72. Continuation is not supported. Multiple COMMONEXIT statements can be specified and are presented to SAS in the order they appear in the cccGENIN. The following illustration describes the format and coding rules for the COMMONEXIT statement.
COMMONEXIT SAScode | | | | | | | | | +SAScode - SAScode | +-----Statement identifier
Statement Option Definitions
COMMONEXIT
Defines the SAS code for defining the values of required MSI variables (ENDTS, STARTTS, ORGSYSID)
SAScode
The remaining lines are used to define SAS code that is used for the definition of required MSI data elements (ENDTS, STARTTS, and ORGSYSID). Do not use RETURN, LINK, ABORT, DELETE, or STOP statements in this exit, as it can interfere with normal
MICS
processing.
Data Type Definition Statements
When SAS variables are converted to
MICS data element
s during MSI processing, MSI assigns a default data type of Accumulated for numeric variables, and Retained for character variables. MSI provides several statements that allow the data type of data elements to be changed.
Many of the Data Type Definitions allow the specification of generic data elements. The colon is used to indicate a generic element. For example, ABC: indicates all data elements starting with ABC.
Data Type Definition(MIN/MAX)
These statements are used to define a data element as type MINIMUM or MAXIMUM. Both MIN/MAX support the definition of an optional initial value.
Note:
An automatic dependency is created between the data element and the seed value.
Statement Format
This keyword is coded with the KEYWORD starting in column 1, free-form, and continuing through column 72. Continuation is not supported and multiple MINIMUM/MAXIMUM statements can be specified. The following illustration describes the format and coding rules for the MIN/MAX statement.
MINIMUM element/seed ... MIN | | MAXIMUM | | MAX | | | | +----initial value element name prefixed | | with a slash (/). | | | +----data element name or generic name | +-----Statement identifier
Statement Option
Definitions
MINIMUMMAXIMUM
Redefines the type of selected data elements to either MINIMUM or MAXIMUM.
element
Specifies which data element name has its type that is changed to MINIMUM or MAXIMUM. Generic names are allowed and you can specify multiple elements and element/seed pairs.
/seed
(Optional) The name of a data element that is used to set the initial value of the element. Specify the element/seed pair with the slash (/) and with no embedded blanks.
Data Type Definition (RETAIN)
This statement allows a data element to be defined as RETAIN, and overrides the default specification as determined by MSI.
Statement Format
This keyword is coded with the KEYWORD starting in column 1, free-form, and continuing through column 72. Continuation is not supported and multiple MINIMUM/MAXIMUM statements can be specified. The following illustration describes the format and coding rules for the RETAIN statement.
RETAIN element ... | | | +----data element name or generic name | | +-----Statement identifier
Statement Option Definitions
RETAIN
Redefines the type of selected data elements to RETAIN.
element
Specifies which data element name has its type that is changed to RETAIN. Multiple elements can be specified per RETAIN statements. Generic specification of elements is allowed.
Data Type Definition (COMPUTE)
MSI fully supports the definition of COMPUTEd data elements. To change a data element as COMPUTED, specify the variable on the COMPUTE statement immediately followed by the EXP and DEPEND statements. EXP defines the SAS code that performs the computation. DEPEND defines the data elements that are required to be activated to perform the computation.
Statement Format
This keyword is coded with the KEYWORD starting in column 1, free-form, and continuing through column 72. Continuation is not supported and multiple COMPUTE statements can be specified. Only one element per statement is allowed. The following illustration describes the format and coding rules for the COMPUTE statement.
COMPUTE element | | | | | | | | | | | +----data element name | +-----Statement identifier
Statement Option Definitions
COMPUTE
Redefines the type of selected data elements to COMPUTE.
element
Specifies which data element name has its type that is changed to COMPUTE. Generic specification of elements is not allowed.
Statement Examples
* * BUSYTIME IS ASSUMED TO BE IN THE INPUTSAS DATASET * COMPUTE BUSYTIME EXP 01 BUSYTIME = SUM(BUSYCPU0-BUSYCPU3, 0); DEPEND BUSYCPU0 BUSYCPU1 BUSYCPU2 BUSYCPU3
Data Type Definition (AVG/PCT)
MSI can automatically generate data element DEPENDencies, and the SAS code to perform either an average (A = B / C) or a percent (A = B / C * 100) equation.
Note:
The parameters for the AVERAGE or PERCENT statement can only be data element names. No constants or SAS expressions are allowed. If a more complex average is needed, (for example, A = (B+(C/47.8))/D), then the COMPUTE and its companion statements (EXP, DEPEND) must be used.
Statement Format
This keyword is coded with the KEYWORD starting in column 1, free-form, and continuing through column 72. Continuation is not supported. The following illustration describes the format and coding rules for the statement.
AVERAGE element-A element-B element-C AVG | | | PERCENT | | | PCT | | +---denominator data | | | element name | | | | | +---numerator data element name | | | +----data element name | +-----Statement identifier
Statement Option Definitions
AVERAGE
PERCENT
Defines a data element as type AVERAGE or PERCENT
element-A
Data element that contains the result of the calculation.
element-B
Data element that is the numerator for the expression.
Note:
Only data elements are valid here.
element-C
Data element that is the denominator for the expression.
Note:
Only data elements are valid here.
Statement Examples
In this example, the data element BUSYPCT contains the percent busy CPU, and in the INPUTSAS data set is represented as a value from 0 to 100. It is necessary to provide an equation so that BUSYPCT can be properly computed at higher timespans.
FILE fff INPUTSAS SAMPLE.DSN PERCENT BUSYPCT BUSYTIME DURATION
Alias Definition (ALIAS)
MSI supports an alternate form of the ALIAS statement that allows multiple data elements to be assigned to a single Data Dictionary Alias. This form can only be used with MSI FDAs.
Statement Format
This statement is coded with the keyword starting in column 1, free-form, and continuing through column 72. Continuation is not supported, although multiple ALIAS statements can be specified. The following illustration describes the format and coding rules for the ALIAS statement.
ALIAS element... name | | | | | | | | +----dictionary member name | | | +----data element name or generic name | +-----Statement identifier
Statement Option Definitions
ALIAS
Defines the name by which the data elements associated Data Dictionary description is stored.
element
Specifies the data element names to assign the ALIAS. Generic specification of elements is allowed.
name
The Data Dictionary Alias. This is the name of the sharedprefix.MICS.DIC.TEXT member that provides dictionary information for the listed elements.
Statement Examples
* ALIAS UCUPCTR1 UCUPCTR2 UCUPCTRX
Data Element Initialization Statement (INITIALIZE)
Some
MICS data element
s need to be initialized with a value before they can be effectively used. For example, data element TRANSCNT is initialized to one to show that each detail observation represents a single transaction. At higher timespans, it contains the sum of TRANSCNT within the BY group.
Initialization is performed before output to the work data sets.
Statement format
This keyword is coded with the KEYWORD starting in column 1, free-form, and continuing through column 72. Continuation is not supported. The following illustration describes the format and coding rules for the INITIALIZE statement.
INITIALIZE element SASexpr | | | | | | | | +--- SASExpr - SAS expression | | | +---element - data element name | +-----Statement identifier
Statement Option Definitions
INITIALIZE
Specifies the initialization expression for a data element.
element
Data element name. Generic specification is not allowed.
SASexpr
The SAS expression that is used to initialize the data element. This expression can be any SAS variable name, constant, or expression. Only one INITIALIZE statement is allowed per data element.
Statement Example
INITIALIZE INTERVL 1 * SEMI-COLON IS OPTIONAL INITIALIZE DURATION ENDTS-STARTTS;
File Sequence Statement (SEQUENCE)
All
MICS
files must have a SORT sequence. In MSI, the sort sequence is composed of two segments, the User Sequence, and the Timespan Sequence. The User Sequence is optional and consists of user-specified data elements. The Timespan Sequence is automatically generated by the MCG and cannot be modified (except for some minor tailoring). The Timespan Sequence consists of common data elements describing the date and time the file is summarized and sorted.
The SEQUENCE statement allows the specification of the User Sequence. If no SEQUENCE is specified, then no User Sequence is applied to the sort sequence.
In addition to the SEQUENCE statement, insert a NAME @@ACCT statement in each file in which you want cccACTn data elements.
Statement Format
This keyword is coded with the KEYWORD starting in column 1, free-form, and continuing through column 72. Continuation is not supported, although multiple SEQUENCE statements can be specified. The following illustration describes the format and coding rules for the SEQUENCE statement.
SEQUENCE elements ... | +---ELEMENTS - Data Elements
Statement Option Definitions
SEQUENCE
Defines the data elements in this file which specifies the data elements of the User Sequence.
elements
The data element names of the User Sequence. Data Elements can also include @@ACCT, which is the account code structure. Generic specification is not allowed.
Statement Example
SEQUENCE SYSID DEVNAME @@ACCT
Data Element Retention Statement (KEEP/DROP)
MSI has simplified the process of activating and deactivating data elements by using the new KEEP and DROP statements.
KEEP and DROP can be applied either Globally (affecting all timespans) or locally (affecting individual timespans). The following rules apply when using KEEP/DROP:
  • All sequence (user or timespan) elements are always kept, and cannot be dropped.
  • If there is no KEEP/DROP statement, the default action is to KEEP.
  • Dropping a data element from the detail timespan causes MSI to drop it in all timespans.
  • KEEP/DROP statements for individual timespans override the Global definition.
Statement Format
This keyword is coded with the KEYWORD starting in column 1, free-form, and continuing through column 72. Continuation is not supported, although multiple KEEP/DROP statements can be specified. The following illustration describes the format and coding rules for the KEEP/DROP statement.
KEEP elements ... DROP | | +---ELEMENTS - The names of elements which are | to be kept or dropped. Maximum of | eight characters each. | +----keyword- Statement keyword
Statement Option Definitions
KEEPDROP
Keyword. Defines the data elements that are kept or dropped from the file. KEEP and DROP can be used in the same file.
elements
Specifies the name of the data elements. Generic specification is allowed, and is indicated by the colon(:) character.
Statement Examples
KEEP BUSYTIME CPU: GOPHER DROP TUNA: WINPROXY
Timespan Modification Statements
All of the previous statements affected data elements in all timespans. MSI extends functionality by allowing certain modifications to be made that only affect specific timespans.
The various ways MSI allows the sort sequence and data element retention modification for individual timespans are described in each section that follows.
Timespan Selection
This statement is used to select the timespan for modification.
Statement Format
This keyword is coded with the KEYWORD starting in column 1, free-form, and continuing through column 72. Continuation is not supported. The following illustration describes the format and coding rules for the statement.
DETAIL DAYS WEEKS MONTHS YEARS | | | +-----Statement identifier
Statement Option Definitions
(None)
Statement Examples
(None)
Sequence Specification
This statement is syntactically the same as the file sequence statement. If a timespan-specific SEQUENCE is specified, the Global sequence cannot be specified. This implies that SEQUENCE would have to be specified for all timespans.
Statement Examples
DETAIL SEQUENCE SYSID DSNAME VOLUME * DAYS SEQUENCE SYSID DSNAME * WEEKS SEQUENCE SYSID DSNAME * MONTHS SEQUENCE SYSID DSNAME * YEARS SEQUENCE SYSID DSNAME *
Timespan Sequence Modification (AFTERSEQUENCE)
This statement allows for the file's sequence to be modified by adding data elements to the end of the Time Sequence, that is they are added LAST after all other data elements.
Statement Format
This keyword is coded with the KEYWORD starting in column 1, free-form, and continuing through column 72. Continuation is not supported, although multiple statements are allowed. The following illustration describes the format and coding rules for the statement.
AFTERSEQUENCE element ... | | | | | +---element - data element name (no generic | specification). | +-----Statement identifier
Statement Option Definitions
AFTERSEQUENCE
Defines the data elements to be added after the Time sequence (at the end of all sequence elements).
element
The name of data elements that is added after the Timespan Sequence. Generic specification is not allowed.
Statement Examples
SEQUENCE SYSID DSNAME MONTHS AFTERSEQUENCE DAY
User Sequence Modification (APPENDSEQUENCE)
This statement allows for the file's sequence to be modified by inserting data elements after the User Sequence, that is, they are inserted AFTER the User Sequence elements but BEFORE the Time Sequence elements.
Statement Format
This keyword is coded with the KEYWORD starting in column 1, free-form, and continuing through column 72. Continuation is not supported, although multiple statements are allowed. The following illustration describes the format and coding rules for the statement.
APPENDSEQUENCE element ... | | | | | +---element - data element name (no generic | specification) to be added | AFTER the user sequence and | BEFORE the Time sequence | +-----Statement identifier
Statement Option Definitions
APPENDSEQUENCE
Defines the data elements to be added after timespan sequence.
element
The name of data elements added to the timespan Sequence. Generic specification is not allowed.
Statement Examples
SEQUENCE SYSID DSNAME DETAIL APPENDSEQUENCE JOBID
Data Element Retention
This statement is syntactically the same as the file sequence statement.
Statement Examples DETAIL KEEP SYSID DSNAME VOLUME BUSY: DROP BUSYTIME