{
  "name": "SAS rename methods by target and timing",
  "description": "Original cross-reference of SAS DATA-step statements, data set options and DATASETS procedures. Compiled from the official references to separate output naming, input-time naming, procedure-local naming, existing-variable changes and member-name changes. Syntax cells are schematic fragments; see the guide for complete examples.",
  "page": "https://casrai.org/guides/rename-in-sas",
  "publisher": "CASRAI",
  "license": "https://creativecommons.org/licenses/by/4.0/",
  "dateModified": "2026-11-21T10:50:00Z",
  "temporalCoverage": null,
  "spatialCoverage": null,
  "columns": [
    {
      "name": "Method",
      "unit": "",
      "description": ""
    },
    {
      "name": "Target",
      "unit": "",
      "description": ""
    },
    {
      "name": "When the new name applies",
      "unit": "",
      "description": ""
    },
    {
      "name": "Syntax fragment",
      "unit": "",
      "description": ""
    },
    {
      "name": "Official source",
      "unit": "",
      "description": ""
    }
  ],
  "rows": [
    {
      "Method": "DATA-step RENAME statement",
      "Target": "Variables in all DATA-step outputs",
      "When the new name applies": "On output; expressions in that step use old names",
      "Syntax fragment": "rename old=new;",
      "Official source": "https://documentation.sas.com/api/collections/pgmsascdc/v_065/docsets/lestmtsref/content/lestmtsref.pdf?locale=en"
    },
    {
      "Method": "Input RENAME= option",
      "Target": "Variables read from a specified input member",
      "When the new name applies": "Before DATA-step processing; expressions use new names",
      "Syntax fragment": "set source(rename=(old=new));",
      "Official source": "https://support.sas.com/documentation/cdl/en/ledsoptsref/69751/HTML/default/p09ikb01zz9knnn16y401utyq4un.htm"
    },
    {
      "Method": "Output RENAME= option",
      "Target": "Variables in a specified output member",
      "When the new name applies": "On output; expressions in that step use old names",
      "Syntax fragment": "data target(rename=(old=new));",
      "Official source": "https://support.sas.com/documentation/cdl/en/ledsoptsref/69751/HTML/default/p09ikb01zz9knnn16y401utyq4un.htm"
    },
    {
      "Method": "Procedure input RENAME= option",
      "Target": "Variables as used by that procedure",
      "When the new name applies": "Before procedure processing; WHERE uses the new name",
      "Syntax fragment": "proc print data=source(rename=(old=new));",
      "Official source": "https://support.sas.com/documentation/cdl/en/ledsoptsref/69751/HTML/default/p09ikb01zz9knnn16y401utyq4un.htm"
    },
    {
      "Method": "DATASETS MODIFY and RENAME",
      "Target": "Variables in an existing member",
      "When the new name applies": "Changes the selected stored member",
      "Syntax fragment": "modify member; rename old=new;",
      "Official source": "https://documentation.sas.com/api/docsets/proc/9.4/content/proc.pdf?locale=en"
    },
    {
      "Method": "DATASETS CHANGE",
      "Target": "SAS file/member name in the same library",
      "When the new name applies": "Changes the stored member name",
      "Syntax fragment": "change old_member=new_member;",
      "Official source": "https://documentation.sas.com/api/docsets/proc/9.4/content/proc.pdf?locale=en"
    }
  ],
  "sources": [
    {
      "title": "SAS DATA Step Statements: Reference — RENAME",
      "url": "https://documentation.sas.com/api/collections/pgmsascdc/v_065/docsets/lestmtsref/content/lestmtsref.pdf?locale=en",
      "accessed": "2026-11-15"
    },
    {
      "title": "SAS 9.4 RENAME= Data Set Option",
      "url": "https://support.sas.com/documentation/cdl/en/ledsoptsref/69751/HTML/default/p09ikb01zz9knnn16y401utyq4un.htm",
      "accessed": "2026-11-15"
    },
    {
      "title": "Base SAS 9.4 Procedures Guide, Seventh Edition — DATASETS",
      "url": "https://documentation.sas.com/api/docsets/proc/9.4/content/proc.pdf?locale=en",
      "accessed": "2026-11-15"
    }
  ]
}