f



Re: help reading data

The following will read the two strings of data.  You would, of course,
might want to use the same method, but specifically input the variables
you are interested in.

data want;
  infile cards scanover;
  input @"[TSW]" tswstring $20.
        @"[SIV]" sivstring $51.;
  cards;
[TSW] 10D001048014D0050005
[SIV] 1158357600 16-09-06 00:00 j 60 60 180 115 0 0 BLK G

[TSW] 10D001048014D0050009
[SIV] 1158357600 16-09-06 00:00 j 60 60 540 94 0 0 BLK G

[TSW] 10D00104844D60200007
[SIV] 1158357600 16-09-06 00:00 j 60 60 300 101 0 0 BLK G
;
run;

HTH,
Art
----------
On Fri, 30 Mar 2007 17:11:35 -0700, pande <apan14@GMAIL.COM> wrote:

>I have some data in this format in a text file and it is a large file.
>Each observation is split in two rows what would be the best way to
>read such data so that i have each observations as one row in sas.
>
>[TSW] 10D001048014D0050005
>[SIV] 1158357600 16-09-06 00:00 j 60 60 180 115 0 0 BLK G
>
>[TSW] 10D001048014D0050009
>[SIV] 1158357600 16-09-06 00:00 j 60 60 540 94 0 0 BLK G
>
>[TSW] 10D00104844D60200007
>[SIV] 1158357600 16-09-06 00:00 j 60 60 300 101 0 0 BLK G
>
>thanks
>regards
>Anurag
0
art297 (4213)
3/31/2007 12:31:19 AM
comp.soft-sys.sas 142827 articles. 4 followers. Post Follow

0 Replies
382 Views

Similar Articles

[PageSpeed] 17

Reply: