- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Posted 07-09-2009 05:32 AM
(2552 views)
Hi,
I'm using PROC COPY to convert some SAS datasets to .xpt files .
I'm getting an error message:
The character variable xxxxx has too long a value for the XXXXX library.
Any idea how this could be resolved?
Thanks in advance...
I'm using PROC COPY to convert some SAS datasets to .xpt files .
I'm getting an error message:
The character variable xxxxx has too long a value for the XXXXX library.
Any idea how this could be resolved?
Thanks in advance...
4 REPLIES 4
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
What is the SAS version and tell us more about the SAS CHARACTER variable in question (use the SAS CONTENTS procedure for variable info)? Also, have you looked at the SAS documentation on TRANSPORT file limitations? It would be best to paste the SAS log information exactly as it is generated -- also searching the SAS support http://support.sas.com/ website may provide you information about the limits with using a TRANSPORT file.
Scott Barry
SBBWorks, Inc.
Scott Barry
SBBWorks, Inc.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Dear Scott,
here's the program we're using...
%MACRO _export(inpath=,
outpath=,
check_report=no);
*----------------------------------------------------------;
* Libname setup
*----------------------------------------------------------;
LIBNAME INPATH "&inpath";
OPTIONS nofmterr;
*----------------------------------------------------------;
* 1- Count up members
*----------------------------------------------------------;
PROC SQL NOPRINT;
*----A: Count # of library members;
SELECT COUNT(*) INTO :numdsets
FROM dictionary.tables
WHERE LIBNAME="INPATH";
QUIT;
%IF &numdsets>0 %THEN %DO;
PROC SQL NOPRINT;
*----B: Count # of library members;
SELECT DISTINCT (memname) INTO :mem1-:mem%TRIM(%LEFT(&numdsets))
FROM dictionary.tables
WHERE LIBNAME="INPATH";
QUIT;
*----------------------------------------------------------;
* 2- Transport individual datasets
*----------------------------------------------------------;
%DO i=1 %TO &numdsets;
LIBNAME outxpt SASV5XPT "&outpath/%LOWCASE(&&mem&i).xpt" LRECL=320;
*----A: Create Transport Files from datasets;
PROC COPY IN=inpath OUT=outxpt;
SELECT &&mem&i;
RUN;
%IF %UPCASE(&check_report)=YES %THEN %DO;
*----B - Optional: CHECKING: RE-CREATE datasets from Transport Files;
PROC COPY IN=outxpt OUT=work;
SELECT &&mem&i;
RUN;
ODS HTML FILE="&outpath/%LOWCASE(&&mem&i)_compare.html";
PROC COMPARE DATA=inpath.&&mem&i COMPARE=work.&&mem&i;
RUN;
ODS HTML CLOSE;
%END;
LIBNAME outxpt;
%END;
%END;
%ELSE %PUT
----------------------------------------------------------------
----------------------------------------------------------------
There is no dataset to transport in &inpath directory
----------------------------------------------------------------
----------------------------------------------------------------;
%MEND _export;
%_export(inpath =/vob/CICL670A/CICL670AUS02/report/import/data_s,
outpath=/vob/CICL670A/pool/pool_904/report/export/pool_904/raw,
check_report=yes);
We're currently using SAS8.2 version..
and here's the log:
ERROR: The character variable OTH1A has too long a value for the OUTXPT library.
ERROR: File OUTXPT.BCL.DATA has not been saved because copy could not be completed
Thank you
here's the program we're using...
%MACRO _export(inpath=,
outpath=,
check_report=no);
*----------------------------------------------------------;
* Libname setup
*----------------------------------------------------------;
LIBNAME INPATH "&inpath";
OPTIONS nofmterr;
*----------------------------------------------------------;
* 1- Count up members
*----------------------------------------------------------;
PROC SQL NOPRINT;
*----A: Count # of library members;
SELECT COUNT(*) INTO :numdsets
FROM dictionary.tables
WHERE LIBNAME="INPATH";
QUIT;
%IF &numdsets>0 %THEN %DO;
PROC SQL NOPRINT;
*----B: Count # of library members;
SELECT DISTINCT (memname) INTO :mem1-:mem%TRIM(%LEFT(&numdsets))
FROM dictionary.tables
WHERE LIBNAME="INPATH";
QUIT;
*----------------------------------------------------------;
* 2- Transport individual datasets
*----------------------------------------------------------;
%DO i=1 %TO &numdsets;
LIBNAME outxpt SASV5XPT "&outpath/%LOWCASE(&&mem&i).xpt" LRECL=320;
*----A: Create Transport Files from datasets;
PROC COPY IN=inpath OUT=outxpt;
SELECT &&mem&i;
RUN;
%IF %UPCASE(&check_report)=YES %THEN %DO;
*----B - Optional: CHECKING: RE-CREATE datasets from Transport Files;
PROC COPY IN=outxpt OUT=work;
SELECT &&mem&i;
RUN;
ODS HTML FILE="&outpath/%LOWCASE(&&mem&i)_compare.html";
PROC COMPARE DATA=inpath.&&mem&i COMPARE=work.&&mem&i;
RUN;
ODS HTML CLOSE;
%END;
LIBNAME outxpt;
%END;
%END;
%ELSE %PUT
----------------------------------------------------------------
----------------------------------------------------------------
There is no dataset to transport in &inpath directory
----------------------------------------------------------------
----------------------------------------------------------------;
%MEND _export;
%_export(inpath =/vob/CICL670A/CICL670AUS02/report/import/data_s,
outpath=/vob/CICL670A/pool/pool_904/report/export/pool_904/raw,
check_report=yes);
We're currently using SAS8.2 version..
and here's the log:
ERROR: The character variable OTH1A has too long a value for the OUTXPT library.
ERROR: File OUTXPT.BCL.DATA has not been saved because copy could not be completed
Thank you
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
and the variable is OTH1A, length=250, format=$250. informat=$250.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Your LIBNAME statement has a hardcoded "engine" of SASV5XPT, which is a SAS Version 5 XPORT format.
I would say that it's time to review and update your SAS application for software-version currency compliance, as in get updated to a current, supported SAS software version level.
In the meantime, you will want to search the SAS support website for pre-historic information about the SAS engine you are using and limitations.
Scott Barry
SBBWorks, Inc.
I would say that it's time to review and update your SAS application for software-version currency compliance, as in get updated to a current, supported SAS software version level.
In the meantime, you will want to search the SAS support website for pre-historic information about the SAS engine you are using and limitations.
Scott Barry
SBBWorks, Inc.