Answered step by step
Verified Expert Solution
Question
1 Approved Answer
def main ( ) : # Prompt for input values sdf _ file = input ( Enter the path to the SDF file:
def main:
# Prompt for input values
sdffile inputEnter the path to the SDF file:
emsfile inputEnter the path to the EMS file:
ppenddate inputEnter the first PP end date YYYYMMDD:
ppenddate inputEnter the second PP end date YYYYMMDD:
ppenddates ppenddate ppenddate
# Read SSN to EID mapping
ssneidmap readssneidmappingemsfile
# Process the SDF file
ppdata, bwdata processsdfsdffile, ssneidmap, ppenddates
# Create output folder
outputfolder fOutputfolderdatetimenowstrftimeYmd
osmakedirsoutputfolder, existokTrue
# Write output files
ppfilename ospath.joinoutputfolder, "PERPERFEMPLOYEES.csv
bwfilename ospath.joinoutputfolder, "REGULAREMPLOYEES.csv
writecsvppfilename, ppdata
writecsvbwfilename, bwdata
printfFiles saved in folder: outputfolder
if namemain:
main
Results:
Enter the path to the SDF file: F:SDFTranslationDPSDF
Enter the path to the EMS file: F:SDFTranslationDeptEMSEMSPersonNumberToLastcsv
Enter the first PP end date YYYYMMDD:
Enter the second PP end date YYYYMMDD:
Files saved in folder: Outputfolder
Now, we need to prompt user of where to save the folder along with its two created files. As you can see this def main function works just don't know where it saving the folder and files.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started