BookmarkSubscribeRSS Feed
ashvene30
Calcite | Level 5

Under the HamiltonRatingScaleforDepression, No of Facebook Posts, No of Twitter Posts and Number of Clicks on Anti-Depression items columns in my file, there are special characters such as >. How do I write a code to read these characters?

3 REPLIES 3
Cynthia_sas
Diamond | Level 26

Hi:

  If you examine your file with NOTEPAD, you'll see that the field with the > and < characters is quoted:

in_file_as_character.png

 

So a standard PROC IMPORT should read the value as character. Or, you could write a DATA Step program and explicitly read the field as character. In a character variable value, any alpha characters, including punctuation are allowed.

 

Cynthia

 

ashvene30
Calcite | Level 5
How do I write a standard proc import query?

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

Register now

Develop Code with SAS Studio

Get started using SAS Studio to write, run and debug your SAS programs.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 1368 views
  • 0 likes
  • 3 in conversation