{
  "name": "Ways to create an index on a SAS data set",
  "description": "Side-by-side comparison of the three documented ways to create an index on a SAS data set: the INDEX= data set option, PROC DATASETS INDEX CREATE and PROC SQL CREATE INDEX. Compiled from the SAS INDEX= data set option, DATASETS procedure and PROC SQL CREATE INDEX documentation pages read on 2026-11-17.",
  "page": "https://casrai.org/guides/indexing-in-sas",
  "publisher": "CASRAI",
  "license": "https://creativecommons.org/licenses/by/4.0/",
  "dateModified": "2026-11-17T12:24:18Z",
  "temporalCoverage": null,
  "spatialCoverage": null,
  "columns": [
    {
      "name": "Method",
      "unit": "",
      "description": ""
    },
    {
      "name": "Applies to",
      "unit": "",
      "description": ""
    },
    {
      "name": "Composite index syntax",
      "unit": "",
      "description": ""
    },
    {
      "name": "Uniqueness option",
      "unit": "",
      "description": ""
    },
    {
      "name": "Missing-value option",
      "unit": "",
      "description": ""
    },
    {
      "name": "Naming rule for composite index",
      "unit": "",
      "description": ""
    }
  ],
  "rows": [
    {
      "Method": "INDEX= data set option",
      "Applies to": "Output data sets in DATA and PROC steps, at creation",
      "Composite index syntax": "index=(name=(var1 var2))",
      "Uniqueness option": "/unique inside the specification",
      "Missing-value option": "/nomiss inside the specification",
      "Naming rule for composite index": "Name given before the parenthesised variable list"
    },
    {
      "Method": "PROC DATASETS INDEX CREATE",
      "Applies to": "Existing data set named in a MODIFY statement",
      "Composite index syntax": "index create name=(var1 var2); at least two variables",
      "Uniqueness option": "UNIQUE option; index not created if duplicates exist",
      "Missing-value option": "NOMISS option; index used only for WHERE processing",
      "Naming rule for composite index": "Valid SAS name; cannot match a variable name or another composite index name"
    },
    {
      "Method": "PROC SQL CREATE INDEX",
      "Applies to": "Existing table",
      "Composite index syntax": "create index name on table(col1, col2)",
      "Uniqueness option": "create unique index; changes producing duplicates are rejected",
      "Missing-value option": "No NOMISS option listed on the CREATE INDEX page",
      "Naming rule for composite index": "Cannot match any column name in the table"
    }
  ],
  "sources": [
    {
      "title": "SAS: INDEX= Data Set Option",
      "url": "https://support.sas.com/documentation/cdl/en/ledsoptsref/69751/HTML/default/n1aaucjme18e43n1jfgz8zsijv88.htm",
      "accessed": "2026-11-17"
    },
    {
      "title": "SAS: DATASETS Procedure (INDEX CREATE)",
      "url": "https://support.sas.com/documentation/cdl/en/proc/65145/HTML/default/p03h320ajtd062n1d05vyoqso4yo.htm",
      "accessed": "2026-11-17"
    },
    {
      "title": "SAS: PROC SQL CREATE INDEX statement",
      "url": "https://support.sas.com/documentation/cdl/en/sqlproc/62086/HTML/default/a001395386.htm",
      "accessed": "2026-11-17"
    }
  ]
}