Reading a ~ separated raw file

Reply
Occasional Contributor
Posts: 12

Reading a ~ separated raw file

Hi,

I've a problem in reading file like below:

NAME:ANDREW~DOB:12-25-1986

NAMESmiley Very HappyECK~DOB:04-04-1956

PLEASE HELP IN READING CORRECTLY

Super Contributor
Posts: 297

Re: Reading a ~ separated raw file

See how this works for you.

DATA WANT;

INFILE DATALINES DLM='~';

INPUT @"NAME:" NAME $

   @"DOB:" DOB;

INFORMAT DOB MMDDYY10.;

FORMAT DOB DATE9.;

DATALINES;

NAME:ANDREW~DOB:12-25-1986

NAMESmiley Very HappyECK~DOB:04-04-1956

;

RUN;

Ask a Question
Discussion stats
  • 1 reply
  • 139 views
  • 0 likes
  • 2 in conversation