Syntax Rules (FORMATS command)

  • You can specify more than one variable or variable list, followed by a format in parentheses. Only one format can be specified after each variable list. For clarity, each set of specifications can be separated by a slash.
  • You can use keyword TO to refer to consecutive variables in the active dataset.
  • The specified width of a format must include enough positions to accommodate any punctuation characters such as decimal points, commas, dollar signs, or date and time delimiters. (This differs from assigning an input format on DATA LIST, where the program automatically expands the input format to accommodate punctuation characters in output.)
  • Custom currency formats (CCw, CCw.d) must first be defined on the SET command before they can be used on FORMATS.
  • For string variables, you can only use FORMATS to switch between A and AHEX formats.FORMATS cannot be used to change the length of string variables. To change the length of a string variable, use ALTER TYPE.