{
  "name": "SAS informats for converting character text to numeric values, by text pattern",
  "description": "Maps each character text pattern (plain digits, decimal, comma-separated, dollar, date) to the informat used with the SAS INPUT function and the stored numeric result, compiled from SAS Support Knowledge Base sample 24590 and the SAS 9.4 Formats and Informats reference.",
  "page": "https://casrai.org/guides/convert-character-to-numeric-in-sas",
  "publisher": "CASRAI",
  "license": "https://creativecommons.org/licenses/by/4.0/",
  "dateModified": "2026-11-17T23:34:45Z",
  "temporalCoverage": null,
  "spatialCoverage": null,
  "columns": [
    {
      "name": "Text pattern",
      "unit": "",
      "description": ""
    },
    {
      "name": "Example text",
      "unit": "",
      "description": ""
    },
    {
      "name": "INPUT call",
      "unit": "",
      "description": ""
    },
    {
      "name": "Stored result",
      "unit": "",
      "description": ""
    }
  ],
  "rows": [
    {
      "Text pattern": "Plain digits",
      "Example text": "12345678",
      "INPUT call": "input(char_var, 8.)",
      "Stored result": "12345678"
    },
    {
      "Text pattern": "Decimal number",
      "Example text": "98.6",
      "INPUT call": "input(TempCharacter, 4.)",
      "Stored result": "98.6"
    },
    {
      "Text pattern": "Digits with commas",
      "Example text": "12,000,000",
      "INPUT call": "input(char_var, comma10.)",
      "Stored result": "12000000"
    },
    {
      "Text pattern": "Dollar sign and commas",
      "Example text": "$6,000,000",
      "INPUT call": "input(char_var, dollar10.)",
      "Stored result": "6000000"
    },
    {
      "Text pattern": "Date as text",
      "Example text": "12JUL2016",
      "INPUT call": "input(startdate, date9.)",
      "Stored result": "SAS date (numeric); display with format date9."
    }
  ],
  "sources": [
    {
      "title": "SAS Sample 24590: Convert variable values from character to numeric",
      "url": "https://support.sas.com/kb/24/590.html",
      "accessed": "2026-11-17"
    },
    {
      "title": "SAS 9.4 Formats and Informats: Reference, Using Informats",
      "url": "https://support.sas.com/documentation/cdl/en/leforinforref/64790/HTML/default/p0fvy5h4ajagxmn1wo4yyx66rit4.htm",
      "accessed": "2026-11-17"
    }
  ]
}