Date: Fri, 6 Jul 2007 08:33:50 -0700
Reply-To: barry.debenham@TALK21.COM
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: barry.debenham@TALK21.COM
Organization: http://groups.google.com
Subject: Re: Problem in input with diferent delimiters
In-Reply-To: <000901c7bfc8$3b4a7bd0$bd00a8c0@adriano>
Content-Type: text/plain; charset="us-ascii"
On 6 Jul, 13:21, adri...@GPP.COM.BR (Adriano Rodrigues - Instituto
GPP) wrote:
> Hi SAS-L,
>
> =20
>
> My problem today is how to input and separate info=92s from data with
> different delimiters.
>
> =20
>
> Here is some possible data:
>
> =20
>
> Atl=E9tico-MG
> Diego; Coelho, Marcos, Vin=EDcius e Thiago Feltri; Rafael Miranda, Bilu,
> Danilinho e Marcinho (Tch=F4); =C9der Lu=EDs (Am=EDlton) e Vanderlei =
> (Paulo
> Henrique)
> T=E9cnico: Zetti
>
> Flamengo
> Diego; Leonardo Moura, Irineu, Ronaldo Angelim e Juan; Paulinho, =
> Ja=EDlton
> (Paulo S=E9rgio), L=E9o Medeiros e L=E9o Lima (Tor=F3); Renato e =
> Leonardo=20
> T=E9cnico: Ney Franco
>
> =20
>
> Atl=E9tico-MG
> Diego; Coelho, Lima, Marcos e Thiago Feltri; Rafael Miranda, Bilu, =
> Danilinho
> (Tch=F4) e Marcinho; Galv=E3o (Paulo Henrique) e =C9der Lu=EDs (L=FAcio)
> T=E9cnico: Zetti
>
> Figueirense
> Wilson, Felipe Santana (Carlinhos), Chic=E3o e Vin=EDcius (Peter); =
> Diogo,
> Henrique, Cleiton Xavier, Adriano Gabiru (Fernandes) e Andr=E9 Santos; =
> Victor
> Sim=F5es e Jean Carlos
> T=E9cnico: M=E1rio S=E9rgio
>
> =20
>
> =20
>
> Each =93block=94 of info contains Name of team (like Flamengo) , players =
> in the
> game separed by =93;=94 =93,=94 or even ( ) (this are reserves who =
> played, like in
> last team Carlinhos was substitute of Felipe Santana =96btw this is one =
> person
> only as no delimiter). At End T=E9cnico (coach).
>
> =20
>
> Each line is in one excel cell (here A1:A12), and import from excel give =
> me
> character long variables. How to start doing it, what=92s best way to =
> learn? I
> don=92t need all code, just one indication and I will study how to do.
>
> =20
>
> =20
>
> My desired output is like:
>
> Team
>
> Player1
>
> Player2
>
> Player3
>
> Player4
>
> Player5
>
> Player6
>
> Player7
>
> Player8
>
> Player9
>
> Player10
>
> Player11
>
> Reserve1
>
> Reserve2
>
> Reserve3
>
> Atl=E9tico-MG
>
> Diego
>
> Coelho
>
> Lima
>
> Marcos
>
> Thiago Feltri
>
> Rafael Miranda
>
> Bilu
>
> Danilinho
>
> Marcinho
>
> Galv=E3o
>
> =C9der Luis
>
> Tch=F4
>
> Paulo Henrique
>
> L=FAcio
>
> =20
>
> Etc.
>
> =20
>
> =20
>
> Thanks in advance,
>
> Adriano
>
> =20
Adriano,
Unfortunately I can't read your email very well so I may have got the
wrong impression of your requirements. However you may find the
DELIMITER option on an infile statement very useful since multiple
delimiters can be specified so that the input is 'split' as you
require. So, DELIMITER=',;' tells SAS that the comma and the semi-
colon are to be treated as delimiters.
I hope this is of use.
Regards,
Barry D.
|