Hi, this is fuka-japan.
I need TIMSS2015 data for my study.
So, I want to convert TIMSS 2015 SAS export data files into SAS data files with SAS studio.
However, when I enter the file pass of the export data files, it says " not exist."
I'm not familiar with SAS, so I don't know what to do.
please help me.
My code:
/******************************************************************************/
/* */
/* SAS Program to Convert SAS Export Files to SAS Data Files */
/* TIMSS 2015 User Guide */
/* */
/******************************************************************************/
OPTIONS NONOTES MPRINT ;
%MACRO DOIT (TYPE = ,
INDIR = ,
OUTDIR = ) ;
LIBNAME OUTDIR "&OUTDIR" ;
* Start of file type processing loop ;
%DO F = 1 %TO %SYSFUNC(COUNTW(&TYPE)) ;
%LET FTYPE = %SCAN(&TYPE,&F) ;
* List of TIMSS 2015 fourth grade countries ;
%IF %UPCASE(%SUBSTR(&FTYPE,1,1)) = A %THEN %DO ;
%LET COUNTRY = AUS BHR BFL BGR CAN CHL TWN HRV CYP CZE
DNK ENG FIN FRA GEO DEU HKG HUN IDN IRN
IRL ITA JPN KAZ KOR KWT LTU MAR NLD NZL
NIR NOR OMN POL PRT QAT RUS SAU SRB SGP
SVK SVN ESP SWE TUR ARE USA
ABA COT CQU NO4 AAD ADU ;
%END ;
* List of TIMSS 2015 eighth grade countries ;
%IF %UPCASE(%SUBSTR(&fTYPE,1,1)) = B %THEN %DO ;
%LET COUNTRY = AUS BHR BWA CAN CHL TWN EGY ENG GEO HKG
HUN IRN IRL ISR ITA JPN JOR KAZ KOR KWT
LBN LTU MYS MLT MAR NZL NOR OMN QAT RUS
SAU SGP SVN ZAF SWE THA TUR ARE USA
ABA COT CQU NO8 AAD ADU ;
%END ;
* Start of country processing loop ;
%LET I = 1 ;
%DO %WHILE(%LENGTH(%SCAN(&COUNTRY,&I))) ;
%LET CTRY = %SCAN(&COUNTRY,&I) ;
PROC CIMPORT FILE="&INDIR.\&FTYPE&CTRY.M6.EXP"
DATA=OUTDIR.&FTYPE&CTRY.M6 ;
RUN ;
* End of country processing loop ;
%LET I = %EVAL(&I + 1) ;
%END ;
* End of file type processing loop ;
%END ;
%MEND DOIT ;
%DOIT (TYPE = ACG ASA ASG ASH ASR AST ATG
BCG BSA BSG BSR BST BTM BTS ,
INDIR = C:\Users\〇〇(it's my name)\OneDrive - △△(it's my university's name).jp\デスクトップ\TIMSS2015_SASData,
OUTDIR = C:\Users\〇〇\OneDrive - △△.jp\デスクトップ\TIMSS SASデータ移行用) ;