ietoolkit
ietoolkit copied to clipboard
iefolder: Missing global
It seems that the do-file created by "iefolder" command has a missing global macro (does not declare it before using).
Suppose we have a survey round called "PSID". Then iefolder using "round" option creates "PSID_MasterDofile.do" under "DataWork" folder. Below is an excerpt of the do-file.
*iefolder*1*FolderGlobals*PSID**************************************************
*iefolder will not work properly if the line above is edited
*Encrypted round sub-folder globals
global PSID "$dataWorkFolder/PSID"
*Encrypted round sub-folder globals
global PSID_encrypt "$encryptFolder/Round PSID Encrypted"
global PSID_dtRaw "$PSID_encrypt/Raw Identified Data"
global PSID_doImp "$PSID_encrypt/Dofiles Import"
global PSID_HFC "$PSID_encrypt/High Frequency Checks"
*DataSets sub-folder globals
global PSID_dt "$PSID/DataSets"
global PSID_dtDeID "$PSID_dt/Deidentified"
global PSID_dtInt "$PSID_dt/Intermediate"
global PSID_dtFin "$PSID_dt/Final"
*Dofile sub-folder globals
global PSID_do "$PSID/Dofiles"
global PSID_doCln "$PSID_do/Cleaning"
global PSID_doCon "$PSID_do/Construct"
global PSID_doAnl "$PSID_do/Analysis"
*Output sub-folder globals
global PSID_out "$PSID/Output"
global PSID_outRaw "$PSID_out/Raw"
global PSID_outFin "$PSID_out/Final"
*Questionnaire sub-folder globals
global PSID_prld "$PSID_quest/PreloadData"
global PSID_doc "$PSID_quest/Questionnaire Documentation"
*iefolder*1*End_FolderGlobals***************************************************
*iefolder will not work properly if the line above is edited
The problem is the last category - Questionnaire sub-folder globals. It calls a global macro called "PSID_quest", but that macro was not declared previously. I think the issue can be resolved by adding a line below.
global PSID_quest "$PSID/Questionnaire"
Please let me know if you need more information.
Thanks for spotting this @eatorange ! I will try to replicate and then address it!
I hope you are doing well!