BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Phil_NZ
Barite | Level 11

Hi SAS Users,

 

Today I run a macro in SAS EG and I face a problem called

Error: The connection to the server has been lost.

the picture as below

My97_0-1611144659446.png

Can you please suggest to me any solution to deal with such a problem? Or if I change the code from SAS EG to SAS normal, whether the problem will still exit?

 

Thank you in advance!

 
Thank you for your help, have a fabulous and productive day! I am a novice today, but someday when I accumulate enough knowledge, I can help others in my capacity.
1 ACCEPTED SOLUTION

Accepted Solutions
ballardw
Super User

Since you say this occurred while running a macro you may need to set OPTIONS MPRINT; to get more details of what is happening while the macro runs.

 

If you code is taking a long time to run you may be running into a setting on your server. You need to talk to the server admin about any settings that may be involved.

 

If your code isn't actually doing anything the server recognizes it may be timing out because of not actual instructions passed to the server.

 

Generic comments because without details, such as a log with the MPRINT option on, we don't have much information to work with.

 

 

View solution in original post

3 REPLIES 3
ballardw
Super User

Since you say this occurred while running a macro you may need to set OPTIONS MPRINT; to get more details of what is happening while the macro runs.

 

If you code is taking a long time to run you may be running into a setting on your server. You need to talk to the server admin about any settings that may be involved.

 

If your code isn't actually doing anything the server recognizes it may be timing out because of not actual instructions passed to the server.

 

Generic comments because without details, such as a log with the MPRINT option on, we don't have much information to work with.

 

 

Phil_NZ
Barite | Level 11

Hi @ballardw , thank you for your generic comment, I quickly add the print option and having the log below. But before coming to the log, I run a macro for 64 files, each file has 45 sheets. The mprint log below just for only one file, the same for the other 64 files, I also add the code for file-level replication below.

MPRINT(IMPORTANDTRANSPOSE):   proc import datafile= "C:\Users\pnguyen\OneDrive - Massey University\PhD JOURNEY\leniency & 
operating\dataxlsx\Argentina_.xlsx" out= Arg_sheet1 dbms= xlsx replace;
MPRINT(IMPORTANDTRANSPOSE):   range= "Sheet1$A:X";
MPRINT(IMPORTANDTRANSPOSE):   getnames= yes;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc sort data= Arg_sheet1;
MPRINT(IMPORTANDTRANSPOSE):   by Type;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc import datafile= "C:\Users\pnguyen\OneDrive - Massey University\PhD JOURNEY\leniency & 
operating\dataxlsx\Argentina_.xlsx" out= Arg_sheet2 dbms= xlsx replace;
MPRINT(IMPORTANDTRANSPOSE):   range= "Sheet2$A:AG";
MPRINT(IMPORTANDTRANSPOSE):   getnames= yes;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc sort data= Arg_sheet2;
MPRINT(IMPORTANDTRANSPOSE):   by Type;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc transpose data= Arg_sheet2 out= Arg_sheet2_out(rename=(COL1=s2 _NAME_=Year) drop=_label_);
MPRINT(IMPORTANDTRANSPOSE):   by Type;
MPRINT(IMPORTANDTRANSPOSE):   VAR '1988'N - '2019'N;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc print data=Arg_sheet2_out;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   data Arg_sheet2_outx;
MPRINT(IMPORTANDTRANSPOSE):   set Arg_sheet2_out;
MPRINT(IMPORTANDTRANSPOSE):   if input(s2, ?? 32.) = . then s22=.;
MPRINT(IMPORTANDTRANSPOSE):   else s22=input(s2, 32.);
MPRINT(IMPORTANDTRANSPOSE):   drop s2;
MPRINT(IMPORTANDTRANSPOSE):   rename s22=s2;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc import datafile= "C:\Users\pnguyen\OneDrive - Massey University\PhD JOURNEY\leniency & 
operating\dataxlsx\Argentina_.xlsx" out= Arg_sheet3 dbms= xlsx replace;
MPRINT(IMPORTANDTRANSPOSE):   range= "Sheet3$A:AG";
MPRINT(IMPORTANDTRANSPOSE):   getnames= yes;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc sort data= Arg_sheet3;
MPRINT(IMPORTANDTRANSPOSE):   by Type;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc transpose data= Arg_sheet3 out= Arg_sheet3_out(rename=(COL1=s3 _NAME_=Year) drop=_label_);
MPRINT(IMPORTANDTRANSPOSE):   by Type;
MPRINT(IMPORTANDTRANSPOSE):   VAR '1988'N - '2019'N;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc print data=Arg_sheet3_out;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   data Arg_sheet3_outx;
MPRINT(IMPORTANDTRANSPOSE):   set Arg_sheet3_out;
MPRINT(IMPORTANDTRANSPOSE):   if input(s3, ?? 32.) = . then s32=.;
MPRINT(IMPORTANDTRANSPOSE):   else s32=input(s3, 32.);
MPRINT(IMPORTANDTRANSPOSE):   drop s3;
MPRINT(IMPORTANDTRANSPOSE):   rename s32=s3;
MPRINT(IMPORTANDTRANSPOSE):   run;
5                                                          The SAS System                             11:13 Friday, January 22, 2021

MPRINT(IMPORTANDTRANSPOSE):   proc import datafile= "C:\Users\pnguyen\OneDrive - Massey University\PhD JOURNEY\leniency & 
operating\dataxlsx\Argentina_.xlsx" out= Arg_sheet4 dbms= xlsx replace;
MPRINT(IMPORTANDTRANSPOSE):   range= "Sheet4$A:AG";
MPRINT(IMPORTANDTRANSPOSE):   getnames= yes;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc sort data= Arg_sheet4;
MPRINT(IMPORTANDTRANSPOSE):   by Type;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc transpose data= Arg_sheet4 out= Arg_sheet4_out(rename=(COL1=s4 _NAME_=Year) drop=_label_);
MPRINT(IMPORTANDTRANSPOSE):   by Type;
MPRINT(IMPORTANDTRANSPOSE):   VAR '1988'N - '2019'N;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc print data=Arg_sheet4_out;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   data Arg_sheet4_outx;
MPRINT(IMPORTANDTRANSPOSE):   set Arg_sheet4_out;
MPRINT(IMPORTANDTRANSPOSE):   if input(s4, ?? 32.) = . then s42=.;
MPRINT(IMPORTANDTRANSPOSE):   else s42=input(s4, 32.);
MPRINT(IMPORTANDTRANSPOSE):   drop s4;
MPRINT(IMPORTANDTRANSPOSE):   rename s42=s4;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc import datafile= "C:\Users\pnguyen\OneDrive - Massey University\PhD JOURNEY\leniency & 
operating\dataxlsx\Argentina_.xlsx" out= Arg_sheet5 dbms= xlsx replace;
MPRINT(IMPORTANDTRANSPOSE):   range= "Sheet5$A:AG";
MPRINT(IMPORTANDTRANSPOSE):   getnames= yes;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc sort data= Arg_sheet5;
MPRINT(IMPORTANDTRANSPOSE):   by Type;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc transpose data= Arg_sheet5 out= Arg_sheet5_out(rename=(COL1=s5 _NAME_=Year) drop=_label_);
MPRINT(IMPORTANDTRANSPOSE):   by Type;
MPRINT(IMPORTANDTRANSPOSE):   VAR '1988'N - '2019'N;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc print data=Arg_sheet5_out;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   data Arg_sheet5_outx;
MPRINT(IMPORTANDTRANSPOSE):   set Arg_sheet5_out;
MPRINT(IMPORTANDTRANSPOSE):   if input(s5, ?? 32.) = . then s52=.;
MPRINT(IMPORTANDTRANSPOSE):   else s52=input(s5, 32.);
MPRINT(IMPORTANDTRANSPOSE):   drop s5;
MPRINT(IMPORTANDTRANSPOSE):   rename s52=s5;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc import datafile= "C:\Users\pnguyen\OneDrive - Massey University\PhD JOURNEY\leniency & 
operating\dataxlsx\Argentina_.xlsx" out= Arg_sheet6 dbms= xlsx replace;
MPRINT(IMPORTANDTRANSPOSE):   range= "Sheet6$A:AG";
MPRINT(IMPORTANDTRANSPOSE):   getnames= yes;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc sort data= Arg_sheet6;
MPRINT(IMPORTANDTRANSPOSE):   by Type;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc transpose data= Arg_sheet6 out= Arg_sheet6_out(rename=(COL1=s6 _NAME_=Year) drop=_label_);
MPRINT(IMPORTANDTRANSPOSE):   by Type;
MPRINT(IMPORTANDTRANSPOSE):   VAR '1988'N - '2019'N;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc print data=Arg_sheet6_out;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   data Arg_sheet6_outx;
MPRINT(IMPORTANDTRANSPOSE):   set Arg_sheet6_out;
6                                                          The SAS System                             11:13 Friday, January 22, 2021

MPRINT(IMPORTANDTRANSPOSE):   if input(s6, ?? 32.) = . then s62=.;
MPRINT(IMPORTANDTRANSPOSE):   else s62=input(s6, 32.);
MPRINT(IMPORTANDTRANSPOSE):   drop s6;
MPRINT(IMPORTANDTRANSPOSE):   rename s62=s6;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc import datafile= "C:\Users\pnguyen\OneDrive - Massey University\PhD JOURNEY\leniency & 
operating\dataxlsx\Argentina_.xlsx" out= Arg_sheet7 dbms= xlsx replace;
MPRINT(IMPORTANDTRANSPOSE):   range= "Sheet7$A:AG";
MPRINT(IMPORTANDTRANSPOSE):   getnames= yes;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc sort data= Arg_sheet7;
MPRINT(IMPORTANDTRANSPOSE):   by Type;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc transpose data= Arg_sheet7 out= Arg_sheet7_out(rename=(COL1=s7 _NAME_=Year) drop=_label_);
MPRINT(IMPORTANDTRANSPOSE):   by Type;
MPRINT(IMPORTANDTRANSPOSE):   VAR '1988'N - '2019'N;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc print data=Arg_sheet7_out;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   data Arg_sheet7_outx;
MPRINT(IMPORTANDTRANSPOSE):   set Arg_sheet7_out;
MPRINT(IMPORTANDTRANSPOSE):   if input(s7, ?? 32.) = . then s72=.;
MPRINT(IMPORTANDTRANSPOSE):   else s72=input(s7, 32.);
MPRINT(IMPORTANDTRANSPOSE):   drop s7;
MPRINT(IMPORTANDTRANSPOSE):   rename s72=s7;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc import datafile= "C:\Users\pnguyen\OneDrive - Massey University\PhD JOURNEY\leniency & 
operating\dataxlsx\Argentina_.xlsx" out= Arg_sheet8 dbms= xlsx replace;
MPRINT(IMPORTANDTRANSPOSE):   range= "Sheet8$A:AG";
MPRINT(IMPORTANDTRANSPOSE):   getnames= yes;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc sort data= Arg_sheet8;
MPRINT(IMPORTANDTRANSPOSE):   by Type;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc transpose data= Arg_sheet8 out= Arg_sheet8_out(rename=(COL1=s8 _NAME_=Year) drop=_label_);
MPRINT(IMPORTANDTRANSPOSE):   by Type;
MPRINT(IMPORTANDTRANSPOSE):   VAR '1988'N - '2019'N;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc print data=Arg_sheet8_out;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   data Arg_sheet8_outx;
MPRINT(IMPORTANDTRANSPOSE):   set Arg_sheet8_out;
MPRINT(IMPORTANDTRANSPOSE):   if input(s8, ?? 32.) = . then s82=.;
MPRINT(IMPORTANDTRANSPOSE):   else s82=input(s8, 32.);
MPRINT(IMPORTANDTRANSPOSE):   drop s8;
MPRINT(IMPORTANDTRANSPOSE):   rename s82=s8;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc import datafile= "C:\Users\pnguyen\OneDrive - Massey University\PhD JOURNEY\leniency & 
operating\dataxlsx\Argentina_.xlsx" out= Arg_sheet9 dbms= xlsx replace;
MPRINT(IMPORTANDTRANSPOSE):   range= "Sheet9$A:AG";
MPRINT(IMPORTANDTRANSPOSE):   getnames= yes;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc sort data= Arg_sheet9;
MPRINT(IMPORTANDTRANSPOSE):   by Type;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc transpose data= Arg_sheet9 out= Arg_sheet9_out(rename=(COL1=s9 _NAME_=Year) drop=_label_);
MPRINT(IMPORTANDTRANSPOSE):   by Type;
MPRINT(IMPORTANDTRANSPOSE):   VAR '1988'N - '2019'N;
7                                                          The SAS System                             11:13 Friday, January 22, 2021

MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc print data=Arg_sheet9_out;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   data Arg_sheet9_outx;
MPRINT(IMPORTANDTRANSPOSE):   set Arg_sheet9_out;
MPRINT(IMPORTANDTRANSPOSE):   if input(s9, ?? 32.) = . then s92=.;
MPRINT(IMPORTANDTRANSPOSE):   else s92=input(s9, 32.);
MPRINT(IMPORTANDTRANSPOSE):   drop s9;
MPRINT(IMPORTANDTRANSPOSE):   rename s92=s9;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc import datafile= "C:\Users\pnguyen\OneDrive - Massey University\PhD JOURNEY\leniency & 
operating\dataxlsx\Argentina_.xlsx" out= Arg_sheet10 dbms= xlsx replace;
MPRINT(IMPORTANDTRANSPOSE):   range= "Sheet10$A:AG";
MPRINT(IMPORTANDTRANSPOSE):   getnames= yes;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc sort data= Arg_sheet10;
MPRINT(IMPORTANDTRANSPOSE):   by Type;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc transpose data= Arg_sheet10 out= Arg_sheet10_out(rename=(COL1=s10 _NAME_=Year) drop=_label_);
MPRINT(IMPORTANDTRANSPOSE):   by Type;
MPRINT(IMPORTANDTRANSPOSE):   VAR '1988'N - '2019'N;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc print data=Arg_sheet10_out;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   data Arg_sheet10_outx;
MPRINT(IMPORTANDTRANSPOSE):   set Arg_sheet10_out;
MPRINT(IMPORTANDTRANSPOSE):   if input(s10, ?? 32.) = . then s102=.;
MPRINT(IMPORTANDTRANSPOSE):   else s102=input(s10, 32.);
MPRINT(IMPORTANDTRANSPOSE):   drop s10;
MPRINT(IMPORTANDTRANSPOSE):   rename s102=s10;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc import datafile= "C:\Users\pnguyen\OneDrive - Massey University\PhD JOURNEY\leniency & 
operating\dataxlsx\Argentina_.xlsx" out= Arg_sheet11 dbms= xlsx replace;
MPRINT(IMPORTANDTRANSPOSE):   range= "Sheet11$A:AG";
MPRINT(IMPORTANDTRANSPOSE):   getnames= yes;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc sort data= Arg_sheet11;
MPRINT(IMPORTANDTRANSPOSE):   by Type;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc transpose data= Arg_sheet11 out= Arg_sheet11_out(rename=(COL1=s11 _NAME_=Year) drop=_label_);
MPRINT(IMPORTANDTRANSPOSE):   by Type;
MPRINT(IMPORTANDTRANSPOSE):   VAR '1988'N - '2019'N;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc print data=Arg_sheet11_out;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   data Arg_sheet11_outx;
MPRINT(IMPORTANDTRANSPOSE):   set Arg_sheet11_out;
MPRINT(IMPORTANDTRANSPOSE):   if input(s11, ?? 32.) = . then s112=.;
MPRINT(IMPORTANDTRANSPOSE):   else s112=input(s11, 32.);
MPRINT(IMPORTANDTRANSPOSE):   drop s11;
MPRINT(IMPORTANDTRANSPOSE):   rename s112=s11;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc import datafile= "C:\Users\pnguyen\OneDrive - Massey University\PhD JOURNEY\leniency & 
operating\dataxlsx\Argentina_.xlsx" out= Arg_sheet12 dbms= xlsx replace;
MPRINT(IMPORTANDTRANSPOSE):   range= "Sheet12$A:AG";
MPRINT(IMPORTANDTRANSPOSE):   getnames= yes;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc sort data= Arg_sheet12;
8                                                          The SAS System                             11:13 Friday, January 22, 2021

MPRINT(IMPORTANDTRANSPOSE):   by Type;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc transpose data= Arg_sheet12 out= Arg_sheet12_out(rename=(COL1=s12 _NAME_=Year) drop=_label_);
MPRINT(IMPORTANDTRANSPOSE):   by Type;
MPRINT(IMPORTANDTRANSPOSE):   VAR '1988'N - '2019'N;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc print data=Arg_sheet12_out;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   data Arg_sheet12_outx;
MPRINT(IMPORTANDTRANSPOSE):   set Arg_sheet12_out;
MPRINT(IMPORTANDTRANSPOSE):   if input(s12, ?? 32.) = . then s122=.;
MPRINT(IMPORTANDTRANSPOSE):   else s122=input(s12, 32.);
MPRINT(IMPORTANDTRANSPOSE):   drop s12;
MPRINT(IMPORTANDTRANSPOSE):   rename s122=s12;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc import datafile= "C:\Users\pnguyen\OneDrive - Massey University\PhD JOURNEY\leniency & 
operating\dataxlsx\Argentina_.xlsx" out= Arg_sheet13 dbms= xlsx replace;
MPRINT(IMPORTANDTRANSPOSE):   range= "Sheet13$A:AG";
MPRINT(IMPORTANDTRANSPOSE):   getnames= yes;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc sort data= Arg_sheet13;
MPRINT(IMPORTANDTRANSPOSE):   by Type;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc transpose data= Arg_sheet13 out= Arg_sheet13_out(rename=(COL1=s13 _NAME_=Year) drop=_label_);
MPRINT(IMPORTANDTRANSPOSE):   by Type;
MPRINT(IMPORTANDTRANSPOSE):   VAR '1988'N - '2019'N;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc print data=Arg_sheet13_out;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   data Arg_sheet13_outx;
MPRINT(IMPORTANDTRANSPOSE):   set Arg_sheet13_out;
MPRINT(IMPORTANDTRANSPOSE):   if input(s13, ?? 32.) = . then s132=.;
MPRINT(IMPORTANDTRANSPOSE):   else s132=input(s13, 32.);
MPRINT(IMPORTANDTRANSPOSE):   drop s13;
MPRINT(IMPORTANDTRANSPOSE):   rename s132=s13;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc import datafile= "C:\Users\pnguyen\OneDrive - Massey University\PhD JOURNEY\leniency & 
operating\dataxlsx\Argentina_.xlsx" out= Arg_sheet14 dbms= xlsx replace;
MPRINT(IMPORTANDTRANSPOSE):   range= "Sheet14$A:AG";
MPRINT(IMPORTANDTRANSPOSE):   getnames= yes;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc sort data= Arg_sheet14;
MPRINT(IMPORTANDTRANSPOSE):   by Type;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc transpose data= Arg_sheet14 out= Arg_sheet14_out(rename=(COL1=s14 _NAME_=Year) drop=_label_);
MPRINT(IMPORTANDTRANSPOSE):   by Type;
MPRINT(IMPORTANDTRANSPOSE):   VAR '1988'N - '2019'N;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc print data=Arg_sheet14_out;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   data Arg_sheet14_outx;
MPRINT(IMPORTANDTRANSPOSE):   set Arg_sheet14_out;
MPRINT(IMPORTANDTRANSPOSE):   if input(s14, ?? 32.) = . then s142=.;
MPRINT(IMPORTANDTRANSPOSE):   else s142=input(s14, 32.);
MPRINT(IMPORTANDTRANSPOSE):   drop s14;
MPRINT(IMPORTANDTRANSPOSE):   rename s142=s14;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc import datafile= "C:\Users\pnguyen\OneDrive - Massey University\PhD JOURNEY\leniency & 
9                                                          The SAS System                             11:13 Friday, January 22, 2021

operating\dataxlsx\Argentina_.xlsx" out= Arg_sheet15 dbms= xlsx replace;
MPRINT(IMPORTANDTRANSPOSE):   range= "Sheet15$A:AG";
MPRINT(IMPORTANDTRANSPOSE):   getnames= yes;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc sort data= Arg_sheet15;
MPRINT(IMPORTANDTRANSPOSE):   by Type;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc transpose data= Arg_sheet15 out= Arg_sheet15_out(rename=(COL1=s15 _NAME_=Year) drop=_label_);
MPRINT(IMPORTANDTRANSPOSE):   by Type;
MPRINT(IMPORTANDTRANSPOSE):   VAR '1988'N - '2019'N;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc print data=Arg_sheet15_out;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   data Arg_sheet15_outx;
MPRINT(IMPORTANDTRANSPOSE):   set Arg_sheet15_out;
MPRINT(IMPORTANDTRANSPOSE):   if input(s15, ?? 32.) = . then s152=.;
MPRINT(IMPORTANDTRANSPOSE):   else s152=input(s15, 32.);
MPRINT(IMPORTANDTRANSPOSE):   drop s15;
MPRINT(IMPORTANDTRANSPOSE):   rename s152=s15;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc import datafile= "C:\Users\pnguyen\OneDrive - Massey University\PhD JOURNEY\leniency & 
operating\dataxlsx\Argentina_.xlsx" out= Arg_sheet16 dbms= xlsx replace;
MPRINT(IMPORTANDTRANSPOSE):   range= "Sheet16$A:AG";
MPRINT(IMPORTANDTRANSPOSE):   getnames= yes;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc sort data= Arg_sheet16;
MPRINT(IMPORTANDTRANSPOSE):   by Type;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc transpose data= Arg_sheet16 out= Arg_sheet16_out(rename=(COL1=s16 _NAME_=Year) drop=_label_);
MPRINT(IMPORTANDTRANSPOSE):   by Type;
MPRINT(IMPORTANDTRANSPOSE):   VAR '1988'N - '2019'N;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc print data=Arg_sheet16_out;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   data Arg_sheet16_outx;
MPRINT(IMPORTANDTRANSPOSE):   set Arg_sheet16_out;
MPRINT(IMPORTANDTRANSPOSE):   if input(s16, ?? 32.) = . then s162=.;
MPRINT(IMPORTANDTRANSPOSE):   else s162=input(s16, 32.);
MPRINT(IMPORTANDTRANSPOSE):   drop s16;
MPRINT(IMPORTANDTRANSPOSE):   rename s162=s16;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc import datafile= "C:\Users\pnguyen\OneDrive - Massey University\PhD JOURNEY\leniency & 
operating\dataxlsx\Argentina_.xlsx" out= Arg_sheet17 dbms= xlsx replace;
MPRINT(IMPORTANDTRANSPOSE):   range= "Sheet17$A:AG";
MPRINT(IMPORTANDTRANSPOSE):   getnames= yes;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc sort data= Arg_sheet17;
MPRINT(IMPORTANDTRANSPOSE):   by Type;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc transpose data= Arg_sheet17 out= Arg_sheet17_out(rename=(COL1=s17 _NAME_=Year) drop=_label_);
MPRINT(IMPORTANDTRANSPOSE):   by Type;
MPRINT(IMPORTANDTRANSPOSE):   VAR '1988'N - '2019'N;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc print data=Arg_sheet17_out;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   data Arg_sheet17_outx;
MPRINT(IMPORTANDTRANSPOSE):   set Arg_sheet17_out;
MPRINT(IMPORTANDTRANSPOSE):   if input(s17, ?? 32.) = . then s172=.;
10                                                         The SAS System                             11:13 Friday, January 22, 2021

MPRINT(IMPORTANDTRANSPOSE):   else s172=input(s17, 32.);
MPRINT(IMPORTANDTRANSPOSE):   drop s17;
MPRINT(IMPORTANDTRANSPOSE):   rename s172=s17;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc import datafile= "C:\Users\pnguyen\OneDrive - Massey University\PhD JOURNEY\leniency & 
operating\dataxlsx\Argentina_.xlsx" out= Arg_sheet18 dbms= xlsx replace;
MPRINT(IMPORTANDTRANSPOSE):   range= "Sheet18$A:AG";
MPRINT(IMPORTANDTRANSPOSE):   getnames= yes;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc sort data= Arg_sheet18;
MPRINT(IMPORTANDTRANSPOSE):   by Type;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc transpose data= Arg_sheet18 out= Arg_sheet18_out(rename=(COL1=s18 _NAME_=Year) drop=_label_);
MPRINT(IMPORTANDTRANSPOSE):   by Type;
MPRINT(IMPORTANDTRANSPOSE):   VAR '1988'N - '2019'N;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc print data=Arg_sheet18_out;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   data Arg_sheet18_outx;
MPRINT(IMPORTANDTRANSPOSE):   set Arg_sheet18_out;
MPRINT(IMPORTANDTRANSPOSE):   if input(s18, ?? 32.) = . then s182=.;
MPRINT(IMPORTANDTRANSPOSE):   else s182=input(s18, 32.);
MPRINT(IMPORTANDTRANSPOSE):   drop s18;
MPRINT(IMPORTANDTRANSPOSE):   rename s182=s18;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc import datafile= "C:\Users\pnguyen\OneDrive - Massey University\PhD JOURNEY\leniency & 
operating\dataxlsx\Argentina_.xlsx" out= Arg_sheet19 dbms= xlsx replace;
MPRINT(IMPORTANDTRANSPOSE):   range= "Sheet19$A:AG";
MPRINT(IMPORTANDTRANSPOSE):   getnames= yes;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc sort data= Arg_sheet19;
MPRINT(IMPORTANDTRANSPOSE):   by Type;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc transpose data= Arg_sheet19 out= Arg_sheet19_out(rename=(COL1=s19 _NAME_=Year) drop=_label_);
MPRINT(IMPORTANDTRANSPOSE):   by Type;
MPRINT(IMPORTANDTRANSPOSE):   VAR '1988'N - '2019'N;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc print data=Arg_sheet19_out;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   data Arg_sheet19_outx;
MPRINT(IMPORTANDTRANSPOSE):   set Arg_sheet19_out;
MPRINT(IMPORTANDTRANSPOSE):   if input(s19, ?? 32.) = . then s192=.;
MPRINT(IMPORTANDTRANSPOSE):   else s192=input(s19, 32.);
MPRINT(IMPORTANDTRANSPOSE):   drop s19;
MPRINT(IMPORTANDTRANSPOSE):   rename s192=s19;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc import datafile= "C:\Users\pnguyen\OneDrive - Massey University\PhD JOURNEY\leniency & 
operating\dataxlsx\Argentina_.xlsx" out= Arg_sheet20 dbms= xlsx replace;
MPRINT(IMPORTANDTRANSPOSE):   range= "Sheet20$A:AG";
MPRINT(IMPORTANDTRANSPOSE):   getnames= yes;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc sort data= Arg_sheet20;
MPRINT(IMPORTANDTRANSPOSE):   by Type;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc transpose data= Arg_sheet20 out= Arg_sheet20_out(rename=(COL1=s20 _NAME_=Year) drop=_label_);
MPRINT(IMPORTANDTRANSPOSE):   by Type;
MPRINT(IMPORTANDTRANSPOSE):   VAR '1988'N - '2019'N;
MPRINT(IMPORTANDTRANSPOSE):   run;
11                                                         The SAS System                             11:13 Friday, January 22, 2021

MPRINT(IMPORTANDTRANSPOSE):   proc print data=Arg_sheet20_out;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   data Arg_sheet20_outx;
MPRINT(IMPORTANDTRANSPOSE):   set Arg_sheet20_out;
MPRINT(IMPORTANDTRANSPOSE):   if input(s20, ?? 32.) = . then s202=.;
MPRINT(IMPORTANDTRANSPOSE):   else s202=input(s20, 32.);
MPRINT(IMPORTANDTRANSPOSE):   drop s20;
MPRINT(IMPORTANDTRANSPOSE):   rename s202=s20;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc import datafile= "C:\Users\pnguyen\OneDrive - Massey University\PhD JOURNEY\leniency & 
operating\dataxlsx\Argentina_.xlsx" out= Arg_sheet21 dbms= xlsx replace;
MPRINT(IMPORTANDTRANSPOSE):   range= "Sheet21$A:AG";
MPRINT(IMPORTANDTRANSPOSE):   getnames= yes;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc sort data= Arg_sheet21;
MPRINT(IMPORTANDTRANSPOSE):   by Type;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc transpose data= Arg_sheet21 out= Arg_sheet21_out(rename=(COL1=s21 _NAME_=Year) drop=_label_);
MPRINT(IMPORTANDTRANSPOSE):   by Type;
MPRINT(IMPORTANDTRANSPOSE):   VAR '1988'N - '2019'N;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc print data=Arg_sheet21_out;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   data Arg_sheet21_outx;
MPRINT(IMPORTANDTRANSPOSE):   set Arg_sheet21_out;
MPRINT(IMPORTANDTRANSPOSE):   if input(s21, ?? 32.) = . then s212=.;
MPRINT(IMPORTANDTRANSPOSE):   else s212=input(s21, 32.);
MPRINT(IMPORTANDTRANSPOSE):   drop s21;
MPRINT(IMPORTANDTRANSPOSE):   rename s212=s21;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc import datafile= "C:\Users\pnguyen\OneDrive - Massey University\PhD JOURNEY\leniency & 
operating\dataxlsx\Argentina_.xlsx" out= Arg_sheet22 dbms= xlsx replace;
MPRINT(IMPORTANDTRANSPOSE):   range= "Sheet22$A:AG";
MPRINT(IMPORTANDTRANSPOSE):   getnames= yes;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc sort data= Arg_sheet22;
MPRINT(IMPORTANDTRANSPOSE):   by Type;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc transpose data= Arg_sheet22 out= Arg_sheet22_out(rename=(COL1=s22 _NAME_=Year) drop=_label_);
MPRINT(IMPORTANDTRANSPOSE):   by Type;
MPRINT(IMPORTANDTRANSPOSE):   VAR '1988'N - '2019'N;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc print data=Arg_sheet22_out;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   data Arg_sheet22_outx;
MPRINT(IMPORTANDTRANSPOSE):   set Arg_sheet22_out;
MPRINT(IMPORTANDTRANSPOSE):   if input(s22, ?? 32.) = . then s222=.;
MPRINT(IMPORTANDTRANSPOSE):   else s222=input(s22, 32.);
MPRINT(IMPORTANDTRANSPOSE):   drop s22;
MPRINT(IMPORTANDTRANSPOSE):   rename s222=s22;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc import datafile= "C:\Users\pnguyen\OneDrive - Massey University\PhD JOURNEY\leniency & 
operating\dataxlsx\Argentina_.xlsx" out= Arg_sheet23 dbms= xlsx replace;
MPRINT(IMPORTANDTRANSPOSE):   range= "Sheet23$A:AG";
MPRINT(IMPORTANDTRANSPOSE):   getnames= yes;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc sort data= Arg_sheet23;
MPRINT(IMPORTANDTRANSPOSE):   by Type;
12                                                         The SAS System                             11:13 Friday, January 22, 2021

MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc transpose data= Arg_sheet23 out= Arg_sheet23_out(rename=(COL1=s23 _NAME_=Year) drop=_label_);
MPRINT(IMPORTANDTRANSPOSE):   by Type;
MPRINT(IMPORTANDTRANSPOSE):   VAR '1988'N - '2019'N;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc print data=Arg_sheet23_out;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   data Arg_sheet23_outx;
MPRINT(IMPORTANDTRANSPOSE):   set Arg_sheet23_out;
MPRINT(IMPORTANDTRANSPOSE):   if input(s23, ?? 32.) = . then s232=.;
MPRINT(IMPORTANDTRANSPOSE):   else s232=input(s23, 32.);
MPRINT(IMPORTANDTRANSPOSE):   drop s23;
MPRINT(IMPORTANDTRANSPOSE):   rename s232=s23;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc import datafile= "C:\Users\pnguyen\OneDrive - Massey University\PhD JOURNEY\leniency & 
operating\dataxlsx\Argentina_.xlsx" out= Arg_sheet24 dbms= xlsx replace;
MPRINT(IMPORTANDTRANSPOSE):   range= "Sheet24$A:AG";
MPRINT(IMPORTANDTRANSPOSE):   getnames= yes;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc sort data= Arg_sheet24;
MPRINT(IMPORTANDTRANSPOSE):   by Type;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc transpose data= Arg_sheet24 out= Arg_sheet24_out(rename=(COL1=s24 _NAME_=Year) drop=_label_);
MPRINT(IMPORTANDTRANSPOSE):   by Type;
MPRINT(IMPORTANDTRANSPOSE):   VAR '1988'N - '2019'N;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc print data=Arg_sheet24_out;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   data Arg_sheet24_outx;
MPRINT(IMPORTANDTRANSPOSE):   set Arg_sheet24_out;
MPRINT(IMPORTANDTRANSPOSE):   if input(s24, ?? 32.) = . then s242=.;
MPRINT(IMPORTANDTRANSPOSE):   else s242=input(s24, 32.);
MPRINT(IMPORTANDTRANSPOSE):   drop s24;
MPRINT(IMPORTANDTRANSPOSE):   rename s242=s24;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc import datafile= "C:\Users\pnguyen\OneDrive - Massey University\PhD JOURNEY\leniency & 
operating\dataxlsx\Argentina_.xlsx" out= Arg_sheet25 dbms= xlsx replace;
MPRINT(IMPORTANDTRANSPOSE):   range= "Sheet25$A:AG";
MPRINT(IMPORTANDTRANSPOSE):   getnames= yes;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc sort data= Arg_sheet25;
MPRINT(IMPORTANDTRANSPOSE):   by Type;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc transpose data= Arg_sheet25 out= Arg_sheet25_out(rename=(COL1=s25 _NAME_=Year) drop=_label_);
MPRINT(IMPORTANDTRANSPOSE):   by Type;
MPRINT(IMPORTANDTRANSPOSE):   VAR '1988'N - '2019'N;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc print data=Arg_sheet25_out;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   data Arg_sheet25_outx;
MPRINT(IMPORTANDTRANSPOSE):   set Arg_sheet25_out;
MPRINT(IMPORTANDTRANSPOSE):   if input(s25, ?? 32.) = . then s252=.;
MPRINT(IMPORTANDTRANSPOSE):   else s252=input(s25, 32.);
MPRINT(IMPORTANDTRANSPOSE):   drop s25;
MPRINT(IMPORTANDTRANSPOSE):   rename s252=s25;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc import datafile= "C:\Users\pnguyen\OneDrive - Massey University\PhD JOURNEY\leniency & 
operating\dataxlsx\Argentina_.xlsx" out= Arg_sheet26 dbms= xlsx replace;
13                                                         The SAS System                             11:13 Friday, January 22, 2021

MPRINT(IMPORTANDTRANSPOSE):   range= "Sheet26$A:AG";
MPRINT(IMPORTANDTRANSPOSE):   getnames= yes;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc sort data= Arg_sheet26;
MPRINT(IMPORTANDTRANSPOSE):   by Type;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc transpose data= Arg_sheet26 out= Arg_sheet26_out(rename=(COL1=s26 _NAME_=Year) drop=_label_);
MPRINT(IMPORTANDTRANSPOSE):   by Type;
MPRINT(IMPORTANDTRANSPOSE):   VAR '1988'N - '2019'N;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc print data=Arg_sheet26_out;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   data Arg_sheet26_outx;
MPRINT(IMPORTANDTRANSPOSE):   set Arg_sheet26_out;
MPRINT(IMPORTANDTRANSPOSE):   if input(s26, ?? 32.) = . then s262=.;
MPRINT(IMPORTANDTRANSPOSE):   else s262=input(s26, 32.);
MPRINT(IMPORTANDTRANSPOSE):   drop s26;
MPRINT(IMPORTANDTRANSPOSE):   rename s262=s26;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc import datafile= "C:\Users\pnguyen\OneDrive - Massey University\PhD JOURNEY\leniency & 
operating\dataxlsx\Argentina_.xlsx" out= Arg_sheet27 dbms= xlsx replace;
MPRINT(IMPORTANDTRANSPOSE):   range= "Sheet27$A:AG";
MPRINT(IMPORTANDTRANSPOSE):   getnames= yes;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc sort data= Arg_sheet27;
MPRINT(IMPORTANDTRANSPOSE):   by Type;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc transpose data= Arg_sheet27 out= Arg_sheet27_out(rename=(COL1=s27 _NAME_=Year) drop=_label_);
MPRINT(IMPORTANDTRANSPOSE):   by Type;
MPRINT(IMPORTANDTRANSPOSE):   VAR '1988'N - '2019'N;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc print data=Arg_sheet27_out;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   data Arg_sheet27_outx;
MPRINT(IMPORTANDTRANSPOSE):   set Arg_sheet27_out;
MPRINT(IMPORTANDTRANSPOSE):   if input(s27, ?? 32.) = . then s272=.;
MPRINT(IMPORTANDTRANSPOSE):   else s272=input(s27, 32.);
MPRINT(IMPORTANDTRANSPOSE):   drop s27;
MPRINT(IMPORTANDTRANSPOSE):   rename s272=s27;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc import datafile= "C:\Users\pnguyen\OneDrive - Massey University\PhD JOURNEY\leniency & 
operating\dataxlsx\Argentina_.xlsx" out= Arg_sheet28 dbms= xlsx replace;
MPRINT(IMPORTANDTRANSPOSE):   range= "Sheet28$A:AG";
MPRINT(IMPORTANDTRANSPOSE):   getnames= yes;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc sort data= Arg_sheet28;
MPRINT(IMPORTANDTRANSPOSE):   by Type;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc transpose data= Arg_sheet28 out= Arg_sheet28_out(rename=(COL1=s28 _NAME_=Year) drop=_label_);
MPRINT(IMPORTANDTRANSPOSE):   by Type;
MPRINT(IMPORTANDTRANSPOSE):   VAR '1988'N - '2019'N;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc print data=Arg_sheet28_out;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   data Arg_sheet28_outx;
MPRINT(IMPORTANDTRANSPOSE):   set Arg_sheet28_out;
MPRINT(IMPORTANDTRANSPOSE):   if input(s28, ?? 32.) = . then s282=.;
MPRINT(IMPORTANDTRANSPOSE):   else s282=input(s28, 32.);
14                                                         The SAS System                             11:13 Friday, January 22, 2021

MPRINT(IMPORTANDTRANSPOSE):   drop s28;
MPRINT(IMPORTANDTRANSPOSE):   rename s282=s28;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc import datafile= "C:\Users\pnguyen\OneDrive - Massey University\PhD JOURNEY\leniency & 
operating\dataxlsx\Argentina_.xlsx" out= Arg_sheet29 dbms= xlsx replace;
MPRINT(IMPORTANDTRANSPOSE):   range= "Sheet29$A:AG";
MPRINT(IMPORTANDTRANSPOSE):   getnames= yes;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc sort data= Arg_sheet29;
MPRINT(IMPORTANDTRANSPOSE):   by Type;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc transpose data= Arg_sheet29 out= Arg_sheet29_out(rename=(COL1=s29 _NAME_=Year) drop=_label_);
MPRINT(IMPORTANDTRANSPOSE):   by Type;
MPRINT(IMPORTANDTRANSPOSE):   VAR '1988'N - '2019'N;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc print data=Arg_sheet29_out;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   data Arg_sheet29_outx;
MPRINT(IMPORTANDTRANSPOSE):   set Arg_sheet29_out;
MPRINT(IMPORTANDTRANSPOSE):   if input(s29, ?? 32.) = . then s292=.;
MPRINT(IMPORTANDTRANSPOSE):   else s292=input(s29, 32.);
MPRINT(IMPORTANDTRANSPOSE):   drop s29;
MPRINT(IMPORTANDTRANSPOSE):   rename s292=s29;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc import datafile= "C:\Users\pnguyen\OneDrive - Massey University\PhD JOURNEY\leniency & 
operating\dataxlsx\Argentina_.xlsx" out= Arg_sheet30 dbms= xlsx replace;
MPRINT(IMPORTANDTRANSPOSE):   range= "Sheet30$A:AG";
MPRINT(IMPORTANDTRANSPOSE):   getnames= yes;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc sort data= Arg_sheet30;
MPRINT(IMPORTANDTRANSPOSE):   by Type;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc transpose data= Arg_sheet30 out= Arg_sheet30_out(rename=(COL1=s30 _NAME_=Year) drop=_label_);
MPRINT(IMPORTANDTRANSPOSE):   by Type;
MPRINT(IMPORTANDTRANSPOSE):   VAR '1988'N - '2019'N;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc print data=Arg_sheet30_out;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   data Arg_sheet30_outx;
MPRINT(IMPORTANDTRANSPOSE):   set Arg_sheet30_out;
MPRINT(IMPORTANDTRANSPOSE):   if input(s30, ?? 32.) = . then s302=.;
MPRINT(IMPORTANDTRANSPOSE):   else s302=input(s30, 32.);
MPRINT(IMPORTANDTRANSPOSE):   drop s30;
MPRINT(IMPORTANDTRANSPOSE):   rename s302=s30;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc import datafile= "C:\Users\pnguyen\OneDrive - Massey University\PhD JOURNEY\leniency & 
operating\dataxlsx\Argentina_.xlsx" out= Arg_sheet31 dbms= xlsx replace;
MPRINT(IMPORTANDTRANSPOSE):   range= "Sheet31$A:AG";
MPRINT(IMPORTANDTRANSPOSE):   getnames= yes;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc sort data= Arg_sheet31;
MPRINT(IMPORTANDTRANSPOSE):   by Type;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc transpose data= Arg_sheet31 out= Arg_sheet31_out(rename=(COL1=s31 _NAME_=Year) drop=_label_);
MPRINT(IMPORTANDTRANSPOSE):   by Type;
MPRINT(IMPORTANDTRANSPOSE):   VAR '1988'N - '2019'N;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc print data=Arg_sheet31_out;
15                                                         The SAS System                             11:13 Friday, January 22, 2021

MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   data Arg_sheet31_outx;
MPRINT(IMPORTANDTRANSPOSE):   set Arg_sheet31_out;
MPRINT(IMPORTANDTRANSPOSE):   if input(s31, ?? 32.) = . then s312=.;
MPRINT(IMPORTANDTRANSPOSE):   else s312=input(s31, 32.);
MPRINT(IMPORTANDTRANSPOSE):   drop s31;
MPRINT(IMPORTANDTRANSPOSE):   rename s312=s31;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc import datafile= "C:\Users\pnguyen\OneDrive - Massey University\PhD JOURNEY\leniency & 
operating\dataxlsx\Argentina_.xlsx" out= Arg_sheet32 dbms= xlsx replace;
MPRINT(IMPORTANDTRANSPOSE):   range= "Sheet32$A:AG";
MPRINT(IMPORTANDTRANSPOSE):   getnames= yes;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc sort data= Arg_sheet32;
MPRINT(IMPORTANDTRANSPOSE):   by Type;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc transpose data= Arg_sheet32 out= Arg_sheet32_out(rename=(COL1=s32 _NAME_=Year) drop=_label_);
MPRINT(IMPORTANDTRANSPOSE):   by Type;
MPRINT(IMPORTANDTRANSPOSE):   VAR '1988'N - '2019'N;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc print data=Arg_sheet32_out;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   data Arg_sheet32_outx;
MPRINT(IMPORTANDTRANSPOSE):   set Arg_sheet32_out;
MPRINT(IMPORTANDTRANSPOSE):   if input(s32, ?? 32.) = . then s322=.;
MPRINT(IMPORTANDTRANSPOSE):   else s322=input(s32, 32.);
MPRINT(IMPORTANDTRANSPOSE):   drop s32;
MPRINT(IMPORTANDTRANSPOSE):   rename s322=s32;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc import datafile= "C:\Users\pnguyen\OneDrive - Massey University\PhD JOURNEY\leniency & 
operating\dataxlsx\Argentina_.xlsx" out= Arg_sheet33 dbms= xlsx replace;
MPRINT(IMPORTANDTRANSPOSE):   range= "Sheet33$A:AG";
MPRINT(IMPORTANDTRANSPOSE):   getnames= yes;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc sort data= Arg_sheet33;
MPRINT(IMPORTANDTRANSPOSE):   by Type;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc transpose data= Arg_sheet33 out= Arg_sheet33_out(rename=(COL1=s33 _NAME_=Year) drop=_label_);
MPRINT(IMPORTANDTRANSPOSE):   by Type;
MPRINT(IMPORTANDTRANSPOSE):   VAR '1988'N - '2019'N;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc print data=Arg_sheet33_out;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   data Arg_sheet33_outx;
MPRINT(IMPORTANDTRANSPOSE):   set Arg_sheet33_out;
MPRINT(IMPORTANDTRANSPOSE):   if input(s33, ?? 32.) = . then s332=.;
MPRINT(IMPORTANDTRANSPOSE):   else s332=input(s33, 32.);
MPRINT(IMPORTANDTRANSPOSE):   drop s33;
MPRINT(IMPORTANDTRANSPOSE):   rename s332=s33;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc import datafile= "C:\Users\pnguyen\OneDrive - Massey University\PhD JOURNEY\leniency & 
operating\dataxlsx\Argentina_.xlsx" out= Arg_sheet34 dbms= xlsx replace;
MPRINT(IMPORTANDTRANSPOSE):   range= "Sheet34$A:AG";
MPRINT(IMPORTANDTRANSPOSE):   getnames= yes;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc sort data= Arg_sheet34;
MPRINT(IMPORTANDTRANSPOSE):   by Type;
MPRINT(IMPORTANDTRANSPOSE):   run;
16                                                         The SAS System                             11:13 Friday, January 22, 2021

MPRINT(IMPORTANDTRANSPOSE):   proc transpose data= Arg_sheet34 out= Arg_sheet34_out(rename=(COL1=s34 _NAME_=Year) drop=_label_);
MPRINT(IMPORTANDTRANSPOSE):   by Type;
MPRINT(IMPORTANDTRANSPOSE):   VAR '1988'N - '2019'N;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc print data=Arg_sheet34_out;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   data Arg_sheet34_outx;
MPRINT(IMPORTANDTRANSPOSE):   set Arg_sheet34_out;
MPRINT(IMPORTANDTRANSPOSE):   if s34 in: ('NA', '$$', '') then s34 =" ";
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc import datafile= "C:\Users\pnguyen\OneDrive - Massey University\PhD JOURNEY\leniency & 
operating\dataxlsx\Argentina_.xlsx" out= Arg_sheet35 dbms= xlsx replace;
MPRINT(IMPORTANDTRANSPOSE):   range= "Sheet35$A:AG";
MPRINT(IMPORTANDTRANSPOSE):   getnames= yes;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc sort data= Arg_sheet35;
MPRINT(IMPORTANDTRANSPOSE):   by Type;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc transpose data= Arg_sheet35 out= Arg_sheet35_out(rename=(COL1=s35 _NAME_=Year) drop=_label_);
MPRINT(IMPORTANDTRANSPOSE):   by Type;
MPRINT(IMPORTANDTRANSPOSE):   VAR '1988'N - '2019'N;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc print data=Arg_sheet35_out;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   data Arg_sheet35_outx;
MPRINT(IMPORTANDTRANSPOSE):   set Arg_sheet35_out;
MPRINT(IMPORTANDTRANSPOSE):   if input(s35, ?? 32.) = . then s352=.;
MPRINT(IMPORTANDTRANSPOSE):   else s352=input(s35, 32.);
MPRINT(IMPORTANDTRANSPOSE):   drop s35;
MPRINT(IMPORTANDTRANSPOSE):   rename s352=s35;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc import datafile= "C:\Users\pnguyen\OneDrive - Massey University\PhD JOURNEY\leniency & 
operating\dataxlsx\Argentina_.xlsx" out= Arg_sheet36 dbms= xlsx replace;
MPRINT(IMPORTANDTRANSPOSE):   range= "Sheet36$A:AG";
MPRINT(IMPORTANDTRANSPOSE):   getnames= yes;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc sort data= Arg_sheet36;
MPRINT(IMPORTANDTRANSPOSE):   by Type;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc transpose data= Arg_sheet36 out= Arg_sheet36_out(rename=(COL1=s36 _NAME_=Year) drop=_label_);
MPRINT(IMPORTANDTRANSPOSE):   by Type;
MPRINT(IMPORTANDTRANSPOSE):   VAR '1988'N - '2019'N;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc print data=Arg_sheet36_out;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   data Arg_sheet36_outx;
MPRINT(IMPORTANDTRANSPOSE):   set Arg_sheet36_out;
MPRINT(IMPORTANDTRANSPOSE):   if input(s36, ?? 32.) = . then s362=.;
MPRINT(IMPORTANDTRANSPOSE):   else s362=input(s36, 32.);
MPRINT(IMPORTANDTRANSPOSE):   drop s36;
MPRINT(IMPORTANDTRANSPOSE):   rename s362=s36;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc import datafile= "C:\Users\pnguyen\OneDrive - Massey University\PhD JOURNEY\leniency & 
operating\dataxlsx\Argentina_.xlsx" out= Arg_sheet37 dbms= xlsx replace;
MPRINT(IMPORTANDTRANSPOSE):   range= "Sheet37$A:AG";
MPRINT(IMPORTANDTRANSPOSE):   getnames= yes;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc sort data= Arg_sheet37;
17                                                         The SAS System                             11:13 Friday, January 22, 2021

MPRINT(IMPORTANDTRANSPOSE):   by Type;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc transpose data= Arg_sheet37 out= Arg_sheet37_out(rename=(COL1=s37 _NAME_=Year) drop=_label_);
MPRINT(IMPORTANDTRANSPOSE):   by Type;
MPRINT(IMPORTANDTRANSPOSE):   VAR '1988'N - '2019'N;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc print data=Arg_sheet37_out;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   data Arg_sheet37_outx;
MPRINT(IMPORTANDTRANSPOSE):   set Arg_sheet37_out;
MPRINT(IMPORTANDTRANSPOSE):   if input(s37, ?? 32.) = . then s372=.;
MPRINT(IMPORTANDTRANSPOSE):   else s372=input(s37, 32.);
MPRINT(IMPORTANDTRANSPOSE):   drop s37;
MPRINT(IMPORTANDTRANSPOSE):   rename s372=s37;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc import datafile= "C:\Users\pnguyen\OneDrive - Massey University\PhD JOURNEY\leniency & 
operating\dataxlsx\Argentina_.xlsx" out= Arg_sheet38 dbms= xlsx replace;
MPRINT(IMPORTANDTRANSPOSE):   range= "Sheet38$A:AG";
MPRINT(IMPORTANDTRANSPOSE):   getnames= yes;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc sort data= Arg_sheet38;
MPRINT(IMPORTANDTRANSPOSE):   by Type;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc transpose data= Arg_sheet38 out= Arg_sheet38_out(rename=(COL1=s38 _NAME_=Year) drop=_label_);
MPRINT(IMPORTANDTRANSPOSE):   by Type;
MPRINT(IMPORTANDTRANSPOSE):   VAR '1988'N - '2019'N;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc print data=Arg_sheet38_out;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   data Arg_sheet38_outx;
MPRINT(IMPORTANDTRANSPOSE):   set Arg_sheet38_out;
MPRINT(IMPORTANDTRANSPOSE):   if input(s38, ?? 32.) = . then s382=.;
MPRINT(IMPORTANDTRANSPOSE):   else s382=input(s38, 32.);
MPRINT(IMPORTANDTRANSPOSE):   drop s38;
MPRINT(IMPORTANDTRANSPOSE):   rename s382=s38;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc import datafile= "C:\Users\pnguyen\OneDrive - Massey University\PhD JOURNEY\leniency & 
operating\dataxlsx\Argentina_.xlsx" out= Arg_sheet39 dbms= xlsx replace;
MPRINT(IMPORTANDTRANSPOSE):   range= "Sheet39$A:AG";
MPRINT(IMPORTANDTRANSPOSE):   getnames= yes;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc sort data= Arg_sheet39;
MPRINT(IMPORTANDTRANSPOSE):   by Type;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc transpose data= Arg_sheet39 out= Arg_sheet39_out(rename=(COL1=s39 _NAME_=Year) drop=_label_);
MPRINT(IMPORTANDTRANSPOSE):   by Type;
MPRINT(IMPORTANDTRANSPOSE):   VAR '1988'N - '2019'N;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc print data=Arg_sheet39_out;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   data Arg_sheet39_outx;
MPRINT(IMPORTANDTRANSPOSE):   set Arg_sheet39_out;
MPRINT(IMPORTANDTRANSPOSE):   if input(s39, ?? 32.) = . then s392=.;
MPRINT(IMPORTANDTRANSPOSE):   else s392=input(s39, 32.);
MPRINT(IMPORTANDTRANSPOSE):   drop s39;
MPRINT(IMPORTANDTRANSPOSE):   rename s392=s39;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc import datafile= "C:\Users\pnguyen\OneDrive - Massey University\PhD JOURNEY\leniency & 
18                                                         The SAS System                             11:13 Friday, January 22, 2021

operating\dataxlsx\Argentina_.xlsx" out= Arg_sheet40 dbms= xlsx replace;
MPRINT(IMPORTANDTRANSPOSE):   range= "Sheet40$A:AG";
MPRINT(IMPORTANDTRANSPOSE):   getnames= yes;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc sort data= Arg_sheet40;
MPRINT(IMPORTANDTRANSPOSE):   by Type;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc transpose data= Arg_sheet40 out= Arg_sheet40_out(rename=(COL1=s40 _NAME_=Year) drop=_label_);
MPRINT(IMPORTANDTRANSPOSE):   by Type;
MPRINT(IMPORTANDTRANSPOSE):   VAR '1988'N - '2019'N;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc print data=Arg_sheet40_out;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   data Arg_sheet40_outx;
MPRINT(IMPORTANDTRANSPOSE):   set Arg_sheet40_out;
MPRINT(IMPORTANDTRANSPOSE):   if input(s40, ?? 32.) = . then s402=.;
MPRINT(IMPORTANDTRANSPOSE):   else s402=input(s40, 32.);
MPRINT(IMPORTANDTRANSPOSE):   drop s40;
MPRINT(IMPORTANDTRANSPOSE):   rename s402=s40;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc import datafile= "C:\Users\pnguyen\OneDrive - Massey University\PhD JOURNEY\leniency & 
operating\dataxlsx\Argentina_.xlsx" out= Arg_sheet41 dbms= xlsx replace;
MPRINT(IMPORTANDTRANSPOSE):   range= "Sheet41$A:AG";
MPRINT(IMPORTANDTRANSPOSE):   getnames= yes;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc sort data= Arg_sheet41;
MPRINT(IMPORTANDTRANSPOSE):   by Type;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc transpose data= Arg_sheet41 out= Arg_sheet41_out(rename=(COL1=s41 _NAME_=Year) drop=_label_);
MPRINT(IMPORTANDTRANSPOSE):   by Type;
MPRINT(IMPORTANDTRANSPOSE):   VAR '1988'N - '2019'N;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc print data=Arg_sheet41_out;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   data Arg_sheet41_outx;
MPRINT(IMPORTANDTRANSPOSE):   set Arg_sheet41_out;
MPRINT(IMPORTANDTRANSPOSE):   if input(s41, ?? 32.) = . then s412=.;
MPRINT(IMPORTANDTRANSPOSE):   else s412=input(s41, 32.);
MPRINT(IMPORTANDTRANSPOSE):   drop s41;
MPRINT(IMPORTANDTRANSPOSE):   rename s412=s41;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc import datafile= "C:\Users\pnguyen\OneDrive - Massey University\PhD JOURNEY\leniency & 
operating\dataxlsx\Argentina_.xlsx" out= Arg_sheet42 dbms= xlsx replace;
MPRINT(IMPORTANDTRANSPOSE):   range= "Sheet42$A:AG";
MPRINT(IMPORTANDTRANSPOSE):   getnames= yes;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc sort data= Arg_sheet42;
MPRINT(IMPORTANDTRANSPOSE):   by Type;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc transpose data= Arg_sheet42 out= Arg_sheet42_out(rename=(COL1=s42 _NAME_=Year) drop=_label_);
MPRINT(IMPORTANDTRANSPOSE):   by Type;
MPRINT(IMPORTANDTRANSPOSE):   VAR '1988'N - '2019'N;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc print data=Arg_sheet42_out;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   data Arg_sheet42_outx;
MPRINT(IMPORTANDTRANSPOSE):   set Arg_sheet42_out;
MPRINT(IMPORTANDTRANSPOSE):   if input(s42, ?? 32.) = . then s422=.;
19                                                         The SAS System                             11:13 Friday, January 22, 2021

MPRINT(IMPORTANDTRANSPOSE):   else s422=input(s42, 32.);
MPRINT(IMPORTANDTRANSPOSE):   drop s42;
MPRINT(IMPORTANDTRANSPOSE):   rename s422=s42;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc import datafile= "C:\Users\pnguyen\OneDrive - Massey University\PhD JOURNEY\leniency & 
operating\dataxlsx\Argentina_.xlsx" out= Arg_sheet43 dbms= xlsx replace;
MPRINT(IMPORTANDTRANSPOSE):   range= "Sheet43$A:AG";
MPRINT(IMPORTANDTRANSPOSE):   getnames= yes;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc sort data= Arg_sheet43;
MPRINT(IMPORTANDTRANSPOSE):   by Type;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc transpose data= Arg_sheet43 out= Arg_sheet43_out(rename=(COL1=s43 _NAME_=Year) drop=_label_);
MPRINT(IMPORTANDTRANSPOSE):   by Type;
MPRINT(IMPORTANDTRANSPOSE):   VAR '1988'N - '2019'N;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc print data=Arg_sheet43_out;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   data Arg_sheet43_outx;
MPRINT(IMPORTANDTRANSPOSE):   set Arg_sheet43_out;
MPRINT(IMPORTANDTRANSPOSE):   if input(s43, ?? 32.) = . then s432=.;
MPRINT(IMPORTANDTRANSPOSE):   else s432=input(s43, 32.);
MPRINT(IMPORTANDTRANSPOSE):   drop s43;
MPRINT(IMPORTANDTRANSPOSE):   rename s432=s43;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc import datafile= "C:\Users\pnguyen\OneDrive - Massey University\PhD JOURNEY\leniency & 
operating\dataxlsx\Argentina_.xlsx" out= Arg_sheet44 dbms= xlsx replace;
MPRINT(IMPORTANDTRANSPOSE):   range= "Sheet44$A:AG";
MPRINT(IMPORTANDTRANSPOSE):   getnames= yes;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc sort data= Arg_sheet44;
MPRINT(IMPORTANDTRANSPOSE):   by Type;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc transpose data= Arg_sheet44 out= Arg_sheet44_out(rename=(COL1=s44 _NAME_=Year) drop=_label_);
MPRINT(IMPORTANDTRANSPOSE):   by Type;
MPRINT(IMPORTANDTRANSPOSE):   VAR '1988'N - '2019'N;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc print data=Arg_sheet44_out;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   data Arg_sheet44_outx;
MPRINT(IMPORTANDTRANSPOSE):   set Arg_sheet44_out;
MPRINT(IMPORTANDTRANSPOSE):   if input(s44, ?? 32.) = . then s442=.;
MPRINT(IMPORTANDTRANSPOSE):   else s442=input(s44, 32.);
MPRINT(IMPORTANDTRANSPOSE):   drop s44;
MPRINT(IMPORTANDTRANSPOSE):   rename s442=s44;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc import datafile= "C:\Users\pnguyen\OneDrive - Massey University\PhD JOURNEY\leniency & 
operating\dataxlsx\Argentina_.xlsx" out= Arg_sheet45 dbms= xlsx replace;
MPRINT(IMPORTANDTRANSPOSE):   range= "Sheet45$A:AG";
MPRINT(IMPORTANDTRANSPOSE):   getnames= yes;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc sort data= Arg_sheet45;
MPRINT(IMPORTANDTRANSPOSE):   by Type;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   proc transpose data= Arg_sheet45 out= Arg_sheet45_out(rename=(COL1=s45 _NAME_=Year) drop=_label_);
MPRINT(IMPORTANDTRANSPOSE):   by Type;
MPRINT(IMPORTANDTRANSPOSE):   VAR '1988'N - '2019'N;
MPRINT(IMPORTANDTRANSPOSE):   run;
20                                                         The SAS System                             11:13 Friday, January 22, 2021

MPRINT(IMPORTANDTRANSPOSE):   proc print data=Arg_sheet45_out;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   data Arg_sheet45_outx;
MPRINT(IMPORTANDTRANSPOSE):   set Arg_sheet45_out;
MPRINT(IMPORTANDTRANSPOSE):   if input(s45, ?? 32.) = . then s452=.;
MPRINT(IMPORTANDTRANSPOSE):   else s452=input(s45, 32.);
MPRINT(IMPORTANDTRANSPOSE):   drop s45;
MPRINT(IMPORTANDTRANSPOSE):   rename s452=s45;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   data Arg_merge1;
MPRINT(IMPORTANDTRANSPOSE):   merge Arg_sheet2_outx(keep= type year s2) Arg_sheet3_outx(keep= type year s3) Arg_sheet4_outx(keep= 
type year s4) Arg_sheet5_outx(keep= type year s5) Arg_sheet6_outx(keep= type year s6) Arg_sheet7_outx(keep= type year s7) 
Arg_sheet8_outx(keep= type year s8) Arg_sheet9_outx(keep= type year s9) Arg_sheet10_outx(keep= type year s10) 
Arg_sheet11_outx(keep= type year s11) Arg_sheet12_outx(keep= type year s12) Arg_sheet13_outx(keep= type year s13) 
Arg_sheet14_outx(keep= type year s14) Arg_sheet15_outx(keep= type year s15) Arg_sheet16_outx(keep= type year s16) 
Arg_sheet17_outx(keep= type year s17) Arg_sheet18_outx(keep= type year s18) Arg_sheet19_outx(keep= type year s19) 
Arg_sheet20_outx(keep= type year s20) Arg_sheet21_outx(keep= type year s21) Arg_sheet22_outx(keep= type year s22) 
Arg_sheet23_outx(keep= type year s23) Arg_sheet24_outx(keep= type year s24) Arg_sheet25_outx(keep= type year s25) 
Arg_sheet26_outx(keep= type year s26) Arg_sheet27_outx(keep= type year s27) Arg_sheet28_outx(keep= type year s28) 
Arg_sheet29_outx(keep= type year s29) Arg_sheet30_outx(keep= type year s30) Arg_sheet31_outx(keep= type year s31) 
Arg_sheet32_outx(keep= type year s32) Arg_sheet33_outx(keep= type year s33) Arg_sheet34_outx(keep= type year s34) 
Arg_sheet35_outx(keep= type year s35) Arg_sheet36_outx(keep= type year s36) Arg_sheet37_outx(keep= type year s37) 
Arg_sheet38_outx(keep= type year s38) Arg_sheet39_outx(keep= type year s39) Arg_sheet40_outx(keep= type year s40) 
Arg_sheet41_outx(keep= type year s41) Arg_sheet42_outx(keep= type year s42) Arg_sheet43_outx(keep= type year s43) 
Arg_sheet44_outx(keep= type year s44) Arg_sheet45_outx(keep= type year s45) ;
MPRINT(IMPORTANDTRANSPOSE):   by type year;
MPRINT(IMPORTANDTRANSPOSE):   run;
MPRINT(IMPORTANDTRANSPOSE):   data Arg_merge2;
MPRINT(IMPORTANDTRANSPOSE):   merge Arg_sheet1 Arg_merge1 ;
MPRINT(IMPORTANDTRANSPOSE):   by type;
MPRINT(IMPORTANDTRANSPOSE):   run;
filename mydir 'C:\Users\pnguyen\OneDrive - Massey University\PhD JOURNEY\leniency & operating\dataxlsx';
data _null_;
did = dopen('mydir');
do i = 1 to dnum(did);
  fname = dread(did,i);
  short_fn= cats(substr(fname, 1,3),'_');
  cmd=cats('%ImportAndTranspose(File=C:\Users\pnguyen\OneDrive - Massey University\PhD JOURNEY\leniency & operating\dataxlsx\',
      strip(fname),',outf=',short_fn,'sheet,startsheet=1,endsheet=45);');

  call execute(cmd);
end;
keep fname;
run;

Many thanks and warmest regards,

 

 

 
Thank you for your help, have a fabulous and productive day! I am a novice today, but someday when I accumulate enough knowledge, I can help others in my capacity.
ballardw
Super User

Looks like that ran normally. Server connection issues may well not be caused by your job, just network traffic.

 

 

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 9504 views
  • 2 likes
  • 2 in conversation