Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Unix script help Create 2 folders : An Inbound where the script is written, a Auto folder where the files that are ready for automatic

Unix script help

Create 2 folders: An Inbound where the script is written, a Auto folder where the files that are ready for automatic processing will be placed.

The input file is called newfile.csv the pre-processed file is called enroll.csv Consider the file newfile.csv(below). It is an Enrollment File that must be pre-processed before it can be run automatically. Write an AWK script, activity9.1.awk, to do the pre-processing according to the requirements below:

First, change "EffectiveDate" header to "Effective Date". Which is: echo "EffectiveDate" | gawk -v FIELDWIDTHS="9 5" -v OFS=" " '{print $1, $2}'?

For each requirement below, write a function

A. 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.

B. 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.

C. 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.

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

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

Spatio Temporal Database Management International Workshop Stdbm 99 Edinburgh Scotland September 10 11 1999 Proceedings Lncs 1678

Authors: Michael H. Bohlen ,Christian S. Jensen ,Michel O. Scholl

1999th Edition

3540664017, 978-3540664017

More Books

Students also viewed these Databases questions

Question

3. If this causes you to reexamine your forecasts, explain why.

Answered: 1 week ago

Question

Analyse the various techniques of training and learning.

Answered: 1 week ago