Help using Base SAS procedures

Reg:particulaar Obs

Reply
N/A
Posts: 0

Reg:particulaar Obs

Hi i am having some observations i want all the 3character and 2numeric continuos obs

Name
My id no is ERT33
no policy
ERJ45 my poicy runs\
Existing id POU89 | LOP90
good number LUI90 and ENU90
the no is UI789
the no is PKA67

In this i wnat the names that start with three character and two numerics moved to out variable



Name | out
My id no is ERT33| ERT33
no policy|
ERJ45 my poicy runs|
Existing id POU89 | LOP90| POU89 | LOP90
good number LUI90 and ENU90| LUI90 and ENU90
the no is UI789|
the no is PKA67| PKA67
Super Contributor
Super Contributor
Posts: 3,174

Re: Reg:particulaar Obs

Using a DATA step, you can parse each input record and use the ANYDIGIT and ANYALPHA functions along with SUBSTR. Also, the LENGTH function can be used to get the actual length of the input buffer (SAS special variable _INFILE_) for a DO/END loop for parsing the input.

Scott Barry
SBBWorks, Inc.
Ask a Question
Discussion stats
  • 1 reply
  • 89 views
  • 0 likes
  • 2 in conversation