Flashing MUIU.eu Rom on Xiaomi Redmi 4 Prime

So my recommendation after reading tons of articles is to follow this video.
https://www.youtube.com/watch?v=j27x5iJSS40

Essentially there are 2 ways how to move from a custom/vendor ROM to xiaomi.eu ROM. The method which is being used here in the video is to use the Chinese version of PC Suite and the recovery ROM.

  1. The video assumes the device is bricked but if it is not then it is enough just to turn the device into a recovery mode and use a (recovery) rom. To sum up, “flashing recovery ROM using Chinese version of Mi PC Suite in recovery mode.”
  2. Once done the second step is to unlock bootloader. Again the Chinese version helps. But this time I had to click twice, to unlock it.
  3. Download TWRP by cofface and follow its guidelines. End TWRP with “fastboot reboot” from command line.
  4. Lastly flash EU ROM using this.
  5. WIN

Other links:

https://xiaomi.eu/community/threads/all-in-one-guide-compilation-on-how-to-flash-xiaomi-eu-roms-on-your-mi5s.36132/

https://xiaomi.eu/community/threads/who-has-redmi-4-pro-from-gearbest.36365/

https://xiaomi.eu/community/threads/miui-eu-rom-for-redmi-4-pro.36165/page-2

Redmi 4/Prime/4A thread: http://en.miui.com/forum-119-1.html

Tools: http://en.miui.com/type-119-995.html

Rom: http://en.miui.com/type-119-998.html

————————-

[MIUI DEVICE TEAM] Flash / Unbrick Redmi 4/Prime/4A: http://en.miui.com/thread-408889-1-1.html

Bootloader Unlock – Solution for Redmi 4 Pro/Prime (unlocking stuck at 50%): http://en.miui.com/thread-429397-1-1.html

RedMi 4 Prime/Pro Twrp recovery: http://en.miui.com/thread-412204-1-1.html

https://www.miuios.cz/

http://en.miui.com/forum.php?mod=viewthread&tid=92720

Stable & Dev Rom: http://en.miui.com/download-320.html

 

SAS code for replacing missing values with 0 in a folder full of datasets

%macro loopOverDatasets();
/*imho good practice to declare macro variables of a macro locally*/
%local datasetCount datasetName iter inMember;

/*get number of datasets + name of datasets*/
proc sql noprint ;
select count(*)
into: datasetCount
from dictionary.tables
where libname = “EXAM”;
quit;

/*initiate loop*/
%let iter=1;
%do %while (&iter.<= &datasetCount.);

proc sql noprint;
select memname
into: datasetName
from dictionary.tables
where libname = “EXAM” and monotonic() eq &iter.;
quit;

%put &iter &datasetCount &datasetName &inMember;
/*now you can apply your logic to the dataset*/
data &datasetName.;
set exam.&datasetName.;
array change _numeric_;
do over change;
if change=. then change=0;
end;
run;

%let iter=%eval(&iter.+1);
%end;
%mend;

%loopOverDatasets;