Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

UNIX -- In this lab, youll use 2 folders: An Inbound from where youll be writing your script, and an Auto folder where all files

UNIX --

In this lab, youll use 2 folders: An Inbound from where youll be writing your script, and an Auto folder where all files that are ready for automatic processing will be placed.

The input file is called sample_enrollment.csv

Name the pre-processed file enrollment_.csv

Consider the file sample_enrollment.csv. It is an Enrollment File that must be pre-processed before it can be run automatically. You are to write an AWK script, lab4_1.awk, to do the pre-processing according to the requirements below:

First, change "EffectiveDate" header to "Effective Date".

Then for each of the requirements below, write a function to complete it:

The Effective date for Drop status must be changed to the last day of the month of the associated Effective Date. For example, in the sample file, the last record has a Drop status. Its effective date is 03/25/2018. This must be changed to 03/31/2018.

Format the area code and Home phone number fields to 3 digits and 7 digits respectively. For example, in the sample file, the first record has no value for the area code and "+1 206 8497834" for the home phone. This should be changed to Area code = 206, and Home phone = 8497834.

Remove all records with Change status so that only the Add and Drop statuses will be processed.

Finally, save the changed contents in a new filename (as indicated above) and place a copy into the Auto folder.

Submit your script lab4_1.awk and a zipped copy of your Auto folder.

==================================================================================================================

sample_enrollment.csv:

EffectiveDate Status EmployeeID ClientID MemberFirstName MemberMiddleName MemberLastName MemberSSN DOB_Month DOB_Day DOB_Year Address1 Address2 City State ZipCode AreaCode HomePhone Email Deduction Method Customer_Defined Relationship Primary FamilyID UniqueID
5/12/17 Add 534336699 1511 Jon B Doe 123456789 3 17 1980 67 NW 67th Street Tempe AZ 85281 +1 206 8497834 ift383@asu.edu Employer payroll deduction P Y 9170885 109170885
11/25/17 Drop 534336699 1511 Alpha Gaspart 987654321 4 21 1961 7659 E 12th Ave Seattle WA 98117 + 206. 369.2073 ift383@asu.edu Employer payroll deduction S N 9170885 200319606
12/11/17 Change 534336699 1511 Mat J Simmon 987123456 10 7 1995 1234 W 17th Street Seattle WA 98106 + 206.369.2073 ift383@asu.edu Employer payroll deduction C N 9170885 200319607
3/25/18 Drop 534336699 1511 Lance Peck 123087654 12 2 2010 12 S Pokoma, #15 Bldg 1002 Boulder CO 76540 9172701515 ift383@asu.edu Employer payroll deduction C N 9170885 200319608

THANKS IN ADVANCE!!!!!

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Design And Relational Theory Normal Forms And All That Jazz

Authors: Chris Date

1st Edition

1449328016, 978-1449328016

Students also viewed these Databases questions

Question

8. How are they different from you? (specifically)

Answered: 1 week ago

Question

Question Can a Roth IRA invest in stock of the IRA owners business?

Answered: 1 week ago