Now our application is partially complete. We have a Customer File and State Tax File, now we need a Product File. We have decided that the Product File will contain the following fields:
1. Product Code
2. Description
3. Price
4. Quantity on Hand
5. Quantity Sold
6. Unit Cost
7. Value on Hand
Since we will be working with the product file for the next few lessons, lets tell filePro Plus to set the file name to “prod". From the filePro Plus main menu, take choice E-Set/Change File Name. filePro Plus tells you that there is currently no file name set and asks for a new file name.
Type: prod and press <RETURN>.
You will be returned to the main menu but notice that a message has appeared at the top center of the video screen stating that the current file name is: prod. Until we change or remove the file name with choice “E” or exit the filePro Plus menu by pressing “X”, all filePro Plus programs will by-pass the “Enter File Name” prompt and assume “prod”.
After careful analysis (we called Charlie in Operations,) we determined how many characters of information we needed in each field as well as the field types.
Here is what Charlie gave us.
|
|
|
FIELD HEADING |
FIELD LENGTH |
FIELD TYPE |
|
|
1. |
Product Code |
3 |
ALLUP |
|
|
2. |
Description |
15 |
UPLOW |
|
|
3. |
Price |
7 |
.2 |
|
|
4. |
Quantity on Hand |
3 |
.0 |
|
|
5. |
Quantity Sold |
8 |
.0 |
|
|
8. |
Unit Cost |
9 |
.4 |
|
|
7. |
Value on Hand |
9 |
.2 |
We have already discussed how to define a numeric field type to filePro Plus, but here is a quick review
A decimal point “.“ preceding a single numeric digit, in the range of ".0 -.8 " tells filePro Plus that this is a numeric field. And the numeric digit indicates the number of digits to accept to the right of the decimal point.
This edit insures you that:
Ø No alpha characters will be accepted in this field.
Ø If a whole number is entered, filePro Plus will add a decimal point and the appropriate number of zeros to the number.
Ø Any number entered with more decimal places than allowed by the field type, will be rounded off to the number of placed indicated in the field type.
Ø If you use field edit type “.0” only whole numbers (integers) will be accepted in this field.
Ø (A number entered with a decimal will be rounded off to an integer.)
Ø DON’T FORGET TO LEAVE SPACE FOR THE DECIMAL POINT.
Thanks to Charlie and your careful analysis, you now have enough information to define the Product File.
Go ahead and define the file. Remember, filePro Plus already knows the filename is “prod.” We’ll let you create the file yourself. (If you need some help, you can refer back to previous lessons.) Be sure to answer “Y” to the "Create a Screen 0" question. We will be using it in the next lesson. Press “Y” to the default report question and build automatic index A on field 1, the product code. Press <RETURN> for index B and press <RETURN> for “Create Qualifiers.” You should be at the main menu.