From: art297 on
Swammy,

I'll stick with a slightly modified version of my original suggestion:
Since you've got tab delimited files, and proc import works (except for
the problem), you could just copy and paste the code resulting from
proc import and change the formats, informats and lengths of those
fields which you want to keep at specific types or lengths.

Art

p.s. Please ALWAYS ask your questions as posts to SAS-L. That way,
you have a much greater chance of getting a response, getting it more
quickly and, quite possibly, even getting better alternatives.
Additionally, that way others (who run into similar problems) can first
search SAS-L before posting a question that has probably been asked
before.
-----Original Message-----
From: saslearn chicago <sasswamy(a)gmail.com>
To: Arthur Tabachneck <art297(a)netscape.net>
Sent: Tue, May 4, 2010 11:52 am
Subject: Excel Load


Hi Arthur,
 
Following is a email which we discussed sometime back , thanks for your
suggestion of adding one dummy line and delete after load
that works fine , only question  as per the Data Structure some of the
field have Numeric data type , but with a size of 3
when I add a dummy line with a value like 999 , automatically the data
type takes as Numeric and with a size of 8 with best32. informat.
 
I will be doing a comparsion between 2 data set using PROC COMPARE , I
thought If I could have the same size the compare will be fine
Is there a way to make the size to be Numeric 3 , instead of having
informat default best32. ?
 
Note : I am not sure whether we do a comparsion with 1 data set being
Numeric with size 3 , another data set with Numeric 8 really matters (
as long the data does not exceed
more than size 3 )
 
I hope I have not confused you :)
 
Please Advice.
- Swamy
#########################################################################
########################################
Hello everyone ,
This is a data load question , please help.
I have a .xls spread sheet with several tabs , each sheet with data  to
be
loaded for different data sets.
Step 1 : I converted each sheet to a tab delimited text file.
When I tired to use the Import , it works fine , but the Issue is for
some
of the Character fields ,by default it makes as Number ,  for e-g ,  an
code field have data like 12334 , 12312 , 54543 …etc , but originally
it
is a character (6) data type ($6.)
Do I need to use INPUT ? , In that case I need to go with the actual
position of each field , In that case can I be able to use the Tab
delimited file ? , there is a possibility for some of the fields coming
as
blank/null.
I hope I explained it well  ï   Please let me know If I have to more
clear.
Sample data set from the spread sheet :
ID EDATE CODE FLAG SET LOCATION
TEST1 10/02/2009 37732 Y AC FACILITY00139
TEST2 10/03/2009 37731 Y JM FACILITY00140
TEST3 10/04/2009 37732 Y   FACILITY00141
TEST4 09/21/2008 5191 Y ED ACILITY00002
Thanks,
- Swamy
*************************************************************************
****************************************************************
Swamy,
Since you've got tab delimited files, and proc import works (except for
the
problem), you could just copy and paste the code resulting from proc
import
and change the informat of those fields which you want to keep as
character.
Alternatively, you can always add (and later delete) a dummy data line
on
the start of the file that physically has unmistakable character data in
those columns which you don't want SAS to read as numeric.
HTH,
Art
#########################################################################
########################################

From: saslearn chicago on
Thanks Art ,

Acutally instead of reply all , by mistake I choose only reply , that's why
I could not post to SAS-L. , Thanks

- Swamy
On Tue, May 4, 2010 at 6:18 PM, <art297(a)netscape.net> wrote:

> Swammy,
>
> I'll stick with a slightly modified version of my original suggestion:
> Since you've got tab delimited files, and proc import works (except for the
> problem), you could just copy and paste the code resulting from proc import
> and change the formats, informats and lengths of those fields which you want
> to keep at specific types or lengths.
>
> Art
>
> p.s. Please ALWAYS ask your questions as posts to SAS-L. That way, you
> have a much greater chance of getting a response, getting it more quickly
> and, quite possibly, even getting better alternatives. Additionally, that
> way others (who run into similar problems) can first search SAS-L before
> posting a question that has probably been asked before.
>
> -----Original Message-----
> From: saslearn chicago <sasswamy(a)gmail.com>
> To: Arthur Tabachneck <art297(a)netscape.net>
> Sent: Tue, May 4, 2010 11:52 am
> Subject: Excel Load
>
>
> Hi Arthur,
>
> Following is a email which we discussed sometime back , thanks for your
> suggestion of adding one dummy line and delete after load
> that works fine , only question as per the Data Structure some of the
> field have Numeric data type , but with a size of 3
> when I add a dummy line with a value like 999 , automatically the data type
> takes as Numeric and with a size of 8 with best32. informat.
>
> I will be doing a comparsion between 2 data set using PROC COMPARE , I
> thought If I could have the same size the compare will be fine
> Is there a way to make the size to be Numeric 3 , instead of having
> informat default best32. ?
>
> Note : I am not sure whether we do a comparsion with 1 data set being
> Numeric with size 3 , another data set with Numeric 8 really matters ( as
> long the data does not exceed
> more than size 3 )
>
> I hope I have not confused you :)
>
> Please Advice.
> - Swamy
> #########################################################################
> ########################################
> Hello everyone ,
> This is a data load question , please help.
> I have a .xls spread sheet with several tabs , each sheet with data to be
> loaded for different data sets.
> Step 1 : I converted each sheet to a tab delimited text file.
> When I tired to use the Import , it works fine , but the Issue is for some
> of the Character fields ,by default it makes as Number , for e-g , an
> code field have data like 12334 , 12312 , 54543 …etc , but originally it
> is a character (6) data type ($6.)
> Do I need to use INPUT ? , In that case I need to go with the actual
> position of each field , In that case can I be able to use the Tab
> delimited file ? , there is a possibility for some of the fields coming as
> blank/null.
> I hope I explained it well ï Please let me know If I have to more clear.
> Sample data set from the spread sheet :
> ID EDATE CODE FLAG SET LOCATION
> TEST1 10/02/2009 37732 Y AC FACILITY00139
> TEST2 10/03/2009 37731 Y JM FACILITY00140
> TEST3 10/04/2009 37732 Y FACILITY00141
> TEST4 09/21/2008 5191 Y ED ACILITY00002
> Thanks,
> - Swamy
> *************************************************************************
> ****************************************************************
> Swamy,
> Since you've got tab delimited files, and proc import works (except for the
> problem), you could just copy and paste the code resulting from proc import
> and change the informat of those fields which you want to keep as
> character.
> Alternatively, you can always add (and later delete) a dummy data line on
> the start of the file that physically has unmistakable character data in
> those columns which you don't want SAS to read as numeric.
> HTH,
> Art
> #########################################################################
> ########################################
>