Pipeline 3


 

SECTION 4.3B.1 - IMPORT DAYSHEETS

 

USAGE: To import Daysheets from the Small Box to the Big Box. This does not include un-manned sites, which are imported from United Cards into the Small Box (see SECTION 4.3.7S.1). When Sites enter daysheets into the Small Box, the update is nominal. A daysheet file is created but all values are set to a default cost and no transactions in Inventory, General Ledger, etc are created. Thus no real financial information is available on the Small Box. This is important because that computer is public facing. At the same time, a transfer file is created (FSTN10.TNS). On a regular basis (usually once a day) this file is copied from the Small Box to the Big Box. The current function is used to upload the transfer file and re-insert it into the update program (this time on the Big Box) where it is used to update the system, now with real financial data.

 

DISCUSSION: This program is basically self-contained, in that it will allow you to enter any missing pricing, etc. But it is more efficient to enter the fuel prices using the PRICING ADD function (See SECTION 3.3.3.1). Also, deliveries can be re-arranged. Ie if the site has entered a Freight Company incorrectly, the import program will allow you to reassign correct Company before the import starts updating file.

 

The transfer file is created as FSTN10.TNS but is transferred in the format FSTN10.yyyymmddhhmm. This is to allow for multiple transfers to be stacked up on the Big Box. The import program will bring them in, in alphanumeric order thus they should come in, in date order. The directory that the importer looks for is set in SET IMPORT DIRECTORY (see SECTION 4.5.3)

 

Until the update actually starts, you can return to SITE DATA ENTRY MENU, by pressing <ESC>.

 

When you start the program, the first screen appears as follows:

 

 

This screen takes the data from the suffix of the oldest file in the transfer directory that starts with FSTN10.

 

If there is a file called FSTN10.TNS in the data directory, the importer will not run. The error message LAST TRANSFER FILE WAS NOT UPDATED CORRECTLY is displayed instead. The file must be cleared in some way – either by deleting or moving back to the Import Directory. This is discussed further, below.

 

If the file name shown is the correct file, reply Y.

 

The importer will read through the transfer file (without moving it from the Import Directory) and will display a list of deliveries:

 

 

For each deliver line, you can overwrite the SUPPLIER. The Supplier must be a valid Creditor. You can use <F9> to search for a Creditor. Also, there a certain Creditor codes that are pre-programmed into the Function Keys. In the example above <F1> would change the Supplier to UNITED1. The options may not be the same on every line. There is an option to print the list. This is sometimes useful if there are a number of lines that need changing. When you have adjusted all the Suppliers in the table, you may press <F10>, to move to the next screen.

 

The following screen displays the cost price for every line in the batch of imports. If Pipeline can find a price for the day of delivery (from the price file) it will be displayed. If not, the price will be zero. (See below.)

 

 

You cannot change the supplier in this screen. This screen is only for entering the Cost-Price. If you have made a mistake in the Supplier, you will need to <ESC> and start again.

 

If you have entered all the Cost Prices using the PRICING ADD function (See SECTION 3.3.3.1), all the prices will be entered for you. If you have missed any, you will need to enter a price on each line. There are situations where the price, from the Pricing Table, will still need to be overwritten, here. The price you enter on this screen will be used in the update. The program will not let you proceed until each line has a price. Any prices you enter here will be written back to the Price Table before the program exits, so if there is an issue later, the prices will be in.

 

Assuming that you have not missed any lines, you can press <F10> to proceed and you will next be asked:

 

HAVE YOU FINISHED ENTERING PRICES?

 

This is the point of no-return. Pipeline will move the file from the transfer directory, typically H:\ftp\dailyuntv\dailyuntv to the working directory. Typically h:\unt3prog\unitedv. The name will be changed to fstn10.tns. The import will then start in earnest. The screen will display which record it is updating. If the program stops at any point, before finishing, the files will be partially updated and the file fstn10.tns will be leftover. If you start the import again, it will look for fstn10.tns and will not let you proceed. If all goes well, the program will return you to the MAIN MENU.

 

Note that if the import program detects a duplicate daysheet, it will import it. Sometimes this is what you want and sometimes it is symptom of an error that needs to be corrected.

 

What can go wrong.

 

The Small Box can have a corruption in the transfer-file.

 

The transfer from the Small Box to the Big Box can partially fail, leaving an incomplete or corrupted file.

 

A site may not exist on the Big Box.

 

A Creditor may not exist on the Big Box.

 

A fuel may not exit on the Big Box.

 

There might be a violent difference between the setup, for a site, on the Small and Big Boxes.

 

A daysheet may have been deleted on the Small Box and then re-entered. The re-entry should be made identical to the first one. There are various reasons why this might happen. The transaction will appear twice on the transfer file. The first one will be processed and the second one, rejected. This is why the re-entry must be identical to the original. If this process was not followed, on the Small Box, you will need to recover using one of the methods, below.

 

How to recover from a failed import.

 

First of all, this is not a complete list. It system can fail in various and novel ways. The following is an attempt to offer a guide to the most likely scenarios.

 

Firstly, if one or other Master-file record has not been entered into the Big Box, eg a new Creditor on the Small Box and the same Creditor was not entered into the Big Box, the program will stop and allow you to enter the new record before it re-tries. Originally, this was done on the same screen, but that code was found to be unwieldy and the fix is generally more easily achieved by logging into another terminal (or instance of Pipeline) and adding the missing record before allowing the import program to proceed. As with most things, prevention is better than cure, so it is better to remember to add the record to both systems, before the update starts.

 

If the transfer file is incomplete or corrupt, you should first determine which is the case. The transfer file has very long records (up to 11K long). Although the file is strictly alphanumeric, without any high-bit characters, it is unlikely to load into an line based text editor, eg Word or Edit or NPP. Thus, file cannot be edited to remove a line. If the file has a corruption or a duplication, that you don’t want, the only way forward is to export it again. To do this use the program exp-ds. This must be run from the Small Box, from the command line. Go to the program directory (typically h:\unt3prog) and enter go-noexit exp-ds unitedv arthur. (The exact line depends on your installation.) You will be asked to enter a site range and a date range. If there is a lot of data on the Small Box, this may take a while to execute. The program will re-export all the daysheets within the chosen range. Typically, you would enter just one site number but, unless you have a specific day in mind, you should export going back a few days. Note that this program will export any daysheets in the date range so you might get a few exported daysheets, even if you choose one site and one day. Eg if you are re-exporting the weekend’s transactions, enter a few days before, say Thursday. This will make sure that you have not missed any late daysheet entries. Any daysheet that is already within the Big Box will be ignored on import. When you have finished exporting, you need to do another transfer to get the files into the Big Box. (Remember to remove the corrupted fstn10.tns before you attempt to re-import or the import program will complain.)

 

Often you do not need to re-export the files. The import process might fail for other reasons. In all cases, it is important to either delete, more or reinstate the import file fstn10.tns before you attempt to re-import. When deciding which of these is the correct path, it is useful to look at the DAYSHEET ENQUIRY. (See SECTION 4.2.8). If you are able to determine the daysheet that failed, you can view that daysheet in the search screen, eg.

 

 

Note that the Audit Number is displayed in the lower window. If it is not there, the daysheet probably has not updated anything (but it will still be there and will need deleting). If it is there, and the UPDATED column show NO, there probably will be partially updated transactions in the system. You can delete the partially updated portion by using fudge15, fudge25, fudge35 and fudge65 for the Debtor, Creditor, Inventory and General Ledger transactions, respectively. These programs should update the respective balances, too. To find which records need to be delete, press <F8>, for relate. Once there are no more records to delete, you can remove the daysheet itself with fix10s. Be very careful with these programs, as once deleted, a transaction cannot be restored. It is best to remove the daysheet last (fix10s) because, once deleted, you do not have a soft record or the Audit Number. (The command for initializing these programs is the same as for exp-ds, as discussed above, except that now you will be working on the Big Box.)

 

Once the offending daysheet is deleted, you can re-import the transfer file.

 

If deleting a transaction does not correct the balances, it is best to do the correction by entering Journals. Running a rebalance is a long process and may sometimes create a false balance.

 

Note that if the issue is within the Import program, and it is real, none of the methods discussed may work. The program itself may need to be fixed before the transaction can be re-imported. Subsequently, the process is the same. Also, the tank balances may not correct themselves until another day has passed. (See MODIFY TANK READINGSECTION 4.1.2.3.)

Return to Table of Contents  Return to Table of Contents