Question: def main ( ) : # Prompt for input values sdf _ file = input ( Enter the path to the SDF file:

def main():
# Prompt for input values
sdf_file = input("Enter the path to the SDF file: ")
ems_file = input("Enter the path to the EMS file: ")
pp_end_date1= input("Enter the first PP end date (YYYY-MM-DD): ")
pp_end_date2= input("Enter the second PP end date (YYYY-MM-DD): ")
pp_end_dates =[pp_end_date1, pp_end_date2]
# Read SSN to EID mapping
ssn_eid_map = read_ssn_eid_mapping(ems_file)
# Process the SDF file
pp_data, bw_data = process_sdf(sdf_file, ssn_eid_map, pp_end_dates)
# Create output folder
output_folder = f"Outputfolder_{datetime.now().strftime('%Y-%m-%d')}"
os.makedirs(output_folder, exist_ok=True)
# Write output files
pp_file_name = os.path.join(output_folder, "PER-PERF-EMPLOYEES.csv")
bw_file_name = os.path.join(output_folder, "REGULAR-EMPLOYEES.csv")
write_csv(pp_file_name, pp_data)
write_csv(bw_file_name, bw_data)
print(f"Files saved in folder: {output_folder}")
if __name__=="__main__":
main()
Results:
Enter the path to the SDF file: F:\SDF_Translation\DP611.SDF
Enter the path to the EMS file: F:\SDF_Translation\Dept611EMS\EMS_Person_Number_To_Last5.csv
Enter the first PP end date (YYYY-MM-DD): 2024-05-25
Enter the second PP end date (YYYY-MM-DD): 2024-06-01
Files saved in folder: Outputfolder_2024-06-09
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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!