That looks like a mixture of V8 and V6 libraries and datsets!
The variable names in V6 where max 8 chars long, so if you convert from V8
to V6 it is necessary to truncate them, otherwise they would not be
accessible in V6.
Unfortunately you can access the same library with different engines under
windows (not under MVS!). I assume, that your extension is NOT SD7, but
SD2! That's a V6-dataset. So you copy a V8-dataset into a V6-dataset, SAS
is aware of that and truncates the variable names (otherwise that would not
be a valid V6-DS).
What I would do:
- NEVER mix V6 and V8 datasets in one library (subdirectory).
- if you don't have V6 any more: convert all your datasets to V8, make a
backup of your V6-libraries and delete them.
After that you will not have any problems with copy and contents.
On Thu, 2 Oct 2003 09:28:33 -0400, Peter Flom <flom@NDRI.ORG> wrote:
>Hello
>
>I've just started using PROC COPY to move data sets so they can be read
>by another program (R). But I am running into an odd problem.
>
>When I use PROC COPY, the data set has to have a .sas7bdat (not .sd7
>extension, or else the file isn't found.
>
>But when I use PROC CONTENTS, the data set has to have a .sd7
>extension, or it isn't read.
>
>In addition, PROC COPY seems to truncate variable names. Below is a
>log for details
>
>START OF LOG
>
>
>66 libname mydata 'c:\ndri\cvar\data';
>NOTE: Directory for library MYDATA contains files of mixed engine
>types.
>NOTE: Libref MYDATA was successfully assigned as follows:
> Engine: V8
> Physical Name: c:\ndri\cvar\data
>67 libname tran xport 'c:\ndri\cvar\data\ufdsidu';
>NOTE: Libref TRAN was successfully assigned as follows:
> Engine: XPORT
> Physical Name: c:\ndri\cvar\data\ufdsidu
>68 proc copy in = mydata out = tran memtype = data;
>69 select ufds_idu;
>70 run;
>
>NOTE: Copying MYDATA.UFDS_IDU to TRAN.UFDS_IDU (memtype=DATA).
>NOTE: The variable name _DRGTRTCTR has been truncated to _DRGTRTC.
>NOTE: The variable name NUM_CLIENTS_TRT_FOR_DRG_USE has been truncated
>to NUM_CLIE.
>NOTE: The variable name MALES_DRGTRT has been truncated to MALES_DR.
>NOTE: The variable name FE_DRGTRT has been truncated to FE_DRGTR.
>NOTE: The variable name TOTAL_DRGTRT has been truncated to TOTAL_DR.
>NOTE: The variable name __INJ_DRGTRT has been truncated to __INJ_DR.
>NOTE: The variable name __HIV__DRGTRT has been truncated to __HIV__D.
>NOTE: There were 97 observations read from the data set
>MYDATA.UFDS_IDU.
>NOTE: The data set TRAN.UFDS_IDU has 97 observations and 10 variables.
>NOTE: PROCEDURE COPY used:
> real time 0.03 seconds
> cpu time 0.03 seconds
>
>
>71
>72 proc contents data = cvar.ufds_idu;
>ERROR: File CVAR.UFDS_IDU.DATA does not exist.
>73 run;
>
>NOTE: Statements not processed because of errors noted above.
>NOTE: PROCEDURE CONTENTS used:
> real time 0.01 seconds
> cpu time 0.01 seconds
>
>NOTE: The SAS System stopped processing this step because of errors.
>74
>75 libname mydata 'c:\ndri\cvar\data';
>NOTE: Directory for library MYDATA contains files of mixed engine
>types.
>NOTE: Libref MYDATA was successfully assigned as follows:
> Engine: V8
> Physical Name: c:\ndri\cvar\data
>76 libname tran xport 'c:\ndri\cvar\data\ufds96';
>NOTE: Libref TRAN was successfully assigned as follows:
> Engine: XPORT
> Physical Name: c:\ndri\cvar\data\ufds96
>77
>
>
>78 proc copy in = mydata out = tran memtype = data;
>79 select ufds96;
>80 run;
>
>ERROR: The file MYDATA.UFDS96 (memtype=DATA) was not found, but appears
>on a SELECT statement.
>NOTE: Statements not processed because of errors noted above.
>NOTE: PROCEDURE COPY used:
> real time 0.00 seconds
> cpu time 0.00 seconds
>
>NOTE: The SAS System stopped processing this step because of errors.
>81
>
>
>82 proc contents data = cvar.ufds96;
>83 run;
>
>NOTE: PROCEDURE CONTENTS used:
> real time 0.01 seconds
> cpu time 0.01 seconds
>
>END OF LOG
>
>
>
>Any help appreciated
>
>Peter
>
>Peter L. Flom, PhD
>Assistant Director, Statistics and Data Analysis Core
>Center for Drug Use and HIV Research
>National Development and Research Institutes
>71 W. 23rd St
>www.peterflom.com
>New York, NY 10010
>(212) 845-4485 (voice)
>(917) 438-0894 (fax)
|
|
0
|
|
|
|
Reply
|
ghellrieg (841)
|
10/2/2003 3:07:03 PM |
|
Dear fellow SAS professionals,
I have a dataset with 3 variables
hosp -- hospitalized for at least once (1,0)
sex -- m,f
grp -- 1,2,3
How could I use the PROC TABULATE procedure to produce
a table like:
-----------------------------------------------------
m f total
-------------- -------------------
grp1 grp2 grp3 grp1 grp2 grp3
-----------------------------------------------------
hosp
1
0
-----------------------------------------------------
Inside the table is the number of people hospitalized.
Thanks so much.
Liyan
__________________________________
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com
|
|
0
|
|
|
|
Reply
|
liyanliu888 (12)
|
10/2/2003 11:22:56 PM
|
|
|
1 Replies
31 Views
(page loaded in 0.065 seconds)
Similiar Articles: Re: Excel Workbook Setting Error Message - comp.soft-sys.sas ...If so look there; the most common problem is that ... my local machine it worked fine but when I > > copy ... Re: PROC EXPORT excel formatting in SAS 9.2 on x64 - comp ... read and merge lots of txt files, macro? - comp.soft-sys.sas ...... titled as 'D_C_table_3_2000', 'D_H_table_6_2008', etc.. ... filenames do not have extensions. If you make a macro that takes as input the filename ... comp.soft-sys.sas Re: read ... comp.soft-sys.sas - page 24Proc Gplot Question #2 1 5 (7/2/2003 2:51:02 PM) I ... number odds ratios, like 1.0, 2.0, 5.0, etc ... directory, and you don't need to put file extension .xls after the filename. Search in *.rex files - comp.lang.rexxThe problem is that WinXP doesn't recognize the .rex extension. ... So if you want all extensions searched when you're ... 1 to REX.0 ; /* etc., filename is ... GAWK: A fix for "missing file is a fatal error" - comp.lang.awk ...... echo /dev/null )" etc. Maybe because that would be impractical if you're ... people that may be a problem; I tend not to pass non-filename ... Yes, the gawk ARGIND extension ... Eudora 7 In box damaged.. how to repair? - comp.mail.eudora.ms ...... in the form of IN.MBX.001, IN.mbx.002, etc ... backed up IN boxes while keeping the filename before the extension in ... Started to copy & rename the mailbox but it ... Major File System Problems! Help - comp.unix.solaris... 2561206 85% / /proc ... /etc/exports in NetApps - comp.unix.admin Problems with Jumpstart - comp ... issues - comp.os.vms Re: Binary file issues Follow ... FTP to copy a ... Change process/command name? - comp.unix.solaris... bin/ps can see it - /usr/bin/ps looks at a saved copy ... write at that area, so there is no memory lock problems). ... # more sys/proc.h typedef struct proc ... Frustrated! - comp.cad.solidworks... on a drg and > switched off backup etc because of speed problems ... Study" after it) as the filename, with varying extensions ("partfile ... On the other hand, I think we're ... [comp.publish.cdrom] CD-Recordable FAQ, Part 1/4 - comp.publish ...Archive-name: cdrom/cd-recordable/part1 Posting-Frequency: monthly Last-modified: 2008/10/09 Version: 2.71 Send corrections and updates to And... 7/19/2012 9:28:48 PM
|