SAS Online Certification Training | Infile options in SAS

0
994

Infile options are used to read the raw data which are located in external file. A raw data file is an external text file whose records contain data values that are organized in fields. Mostly SAS by default recognize the blank space as a delimiter apart from this SAS unable to recognize and give the error. For that purpose, DLM and DSD options are used for recognizing the delimiters other than blank space. DLM and DSD write along with infile statements.

 

To read the raw data file, the DATA step must provide the following instructions to SAS:

 

 the location or name of the external text file

 a name for the new SAS data set

 a reference that identifies the external file

 a description of the data values to be read.

 

DLM

DLM=delimiter(s)

 

where delimiter(s) specifies a delimiter for list input in either of the following forms:

 ‘list-of-delimiting-characters’ specifies one or more characters (up to 200) to read as

delimiters. The list of characters must be enclosed in quotation marks either in single or double quote.

character-variable specifies a character variable whose value becomes the delimiter, also we are writing so many delimiters in the DLM option provided that the data observation containing that delimiter. Suppose in the sas data sets are separated by comma and colon so in the DLM both delimiters re required for reading the raw data.

 

Example-  Infile cards dlm= “ ,  :  “ ;

 

DSD

 

We will using the DSD option in the INFILE statement to correctly read the raw data. The DSD

option changes how SAS treats delimiters when list input is used. Specifically, the DSD option

sets the default delimiter to a comma ,treats two consecutive delimiters as a missing value also

Remove quotation marks from the value.

When the following program reads the raw data file, the DSD option sets the default delimiter to a

comma and treats the two consecutive delimiters as a missing value. Therefore, the data is read

correctly.



SAS Training and SAS Certification Course

 

The SAS course is a best way to enter the SAS industry and you can make bright career.

Do not delay? Today contact with Durga Online Trainer and become a experts in SAS Programming.

 

You can also join online classes-

 

best clinical sas training institute in india  |  sas certification course online in india | Power bi online training course in india.



Search
Categories
Read More
Other
Reddit Fitspresso Dangerous Side Effects, Customer Response, And Ingredients Exposed!
  This formula is crafted with six natural components that work in harmony to keep your...
By Traciekimble Traciekimble 2024-04-06 09:08:45 0 265
Health
Medical Imaging Workstations Market Revenue Share Analysis, Market Growth Forecast, 2022–2028
The size of global Medical Imaging Workstations Market was valued at USD 1.07 billion in 2020 and...
By Rucha Waikar 2023-07-17 07:19:33 0 833
Other
https://www.facebook.com/Maasalong-Advanced-ME-101141932495189
Product Name Maasalong Health Benefits  Sexual Health Maasalong Purpose Male Enhancement...
By Health Menia 2022-02-16 13:49:59 0 627
Other
CAMBODIA Easy and Simple Cambodian Visa
Address : AIA Sathorn Tower, Floor 12 A 11/1 S Sathon Rd, Khet Sathon, Krung Thep Maha Nakhon...
By Jubaer Group 2023-12-06 03:03:00 0 589
Other
Autonomous Ships Market Size & Share, Global Trends, Statistics, Industry Forecast by 2024-2032
The Autonomous Ships Market Scope was valued at USD 5.63 billion in 2023 and is...
By Bharti Nalawade 2024-08-01 10:21:30 0 83