Presentation is loading. Please wait.

Presentation is loading. Please wait.

A poorly named Curt Hill utility program

Similar presentations


Presentation on theme: "A poorly named Curt Hill utility program"— Presentation transcript:

1 A poorly named Curt Hill utility program
MakeMOO A poorly named Curt Hill utility program Copyright © 2012 Curt Hill

2 Purpose The program takes input lines and reformats them according to user specified directions Inputs Command directives from the screen Input file Output A new file modified from the inputs Copyright © 2012 Curt Hill

3 Input file Usually the output from a database or spreadsheet, but could be any program Each line should have a fixed number of fields Separated by a comma or tab character One line of file will be read in early and the number of fields counted Copyright © 2012 Curt Hill

4 Output file Output of each line is similar Constructed from
Constants in the directives Fields from the corresponding input line Constructed by directives Input field order and output field order does not have to match Not all input fields need to be output Copyright © 2012 Curt Hill

5 Initial Screen Copyright © 2012 Curt Hill

6 First Actions Select whether your input file has commas or tabs for delimiters using the checkbox Click the Open button and select the file You may have to change the directory or extension to the that of your file Copyright © 2012 Curt Hill

7 Then What? After an open MakeMoo will show you the first file and the fields that it has found on that line Enter the format of the new line using ordinary constants and position descriptors A position descriptor is the % followed by the digit of the field When this is complete hit the save button and choose the file Copyright © 2012 Curt Hill

8 Example In the following screen shots we will take the data from a database query and modify into SQL commands Steps Copy the results Save as a file Point MakeMOO at the file Form directives Save result Copyright © 2012 Curt Hill

9 SQL Results Page Copyright © 2012 Curt Hill

10 Notepad++ Copyright © 2012 Curt Hill

11 Before Directives Copyright © 2012 Curt Hill

12 After Directives Copyright © 2012 Curt Hill

13 Results insert into faculty values (444, 'Preston Bush', 'MATH', 'PhD', 41,10, ,'Math') insert into faculty values (765, 'Susan Rock', 'MATH','PhD', 60,10, ,'Math Ed') Copyright © 2012 Curt Hill

14 Finally MakeMOO thinks of the characters except % and \ as just characters So it will just copy those in The example doubled the comma between fields 6 and 7 Copyright © 2012 Curt Hill


Download ppt "A poorly named Curt Hill utility program"

Similar presentations


Ads by Google