Card Maint Crunch

Last Updated: 2006-04-17

Notes and Instructions

Notes:

New upgrade to 1_Adm_{vSite}: 3.4 and 3.4.1
Added DateCardMaintFile to card_maint file to identify which source file was processed.

This update includes the use of a web form that prompts for entry of the Card_Maint file date. This is then used when the Card_Maint is to update a corresponding card file record. The input date is used to compare to the Card record's DateProfileUpd field. First an offset of 4 weeks is subtracted from the Card_Maint file date, and it is then compared to the the DateProfileUpd. If the DateProfileUpd is newer than the offset Card_Maint file date, the update does NOT occur.

For most retailers, this works the same was as before, with the exception that you now need to enter a file date of the card maint file.

For AWG - there are a few other changes in the normal crunch process, as noted below.

Retailers to Process:

Instructions:

  1. The retailers are to send Webstop a Card Maint file every Friday via FTP. The files should be date stamped, and named like this: {site}_CardMaint_{date in yymmdd format}.txt, such as PCN_CardMaint_060413.txt. This text file should be moved to our test server, TDS3, inside the selected retailer's MyIO data folder, such as /1 TDS3 MyIO/Card_{site}_Data/. You can mount TDS3 MyIO and the appropriate FTP server, such as for AWG - we use TDS3 MyDataCM1 for both CM1 and PC1. For PCN, we use TDS3 PCN.

  2. Then open the card maint file (like AWG_CardMaint_060413.txt - used for both CM1 and PC1) in BBEdit, and also open the standard file for importing, named {site}_CardMaint.txt, such as CM1_CardMaint.txt for CM1. Select all the records in the new card maint file, copy them, and replace the records in the {site}_CardMaint.txt file and save it.

  3. Mount PWS7 MyIO and copy both files to /pws7 MyIO/Card_{site}_Data/

    Move any older card maint files on pws7 to "0 CardMaint DONE" folder.

  4. Open Navicat and open a new query, click Load and open "/pws7 MyIO/Card_{site}_Batch/Select Card_Maint count maint" and run it. Note there there should be only a count with "maint" of 1; a count of maint of zero would mean there are old card maint records that didn't get processed.

  5. Now open a new query and load: /pws7 MyIO/Card_{site}_Batch/Load Card_Maint {whatever the most recent file name is}, such as "Load pcn card_maint 061003" - which was created on 10/3/06.

    Run this query to load records into the card_maint table. Now verify that they were loaded by running "Select Card_Maint count maint" again - and note down the number of zero "maint" records.

  6. For AWG ONLY - run an additional SQL query. For CM1, it's called "Delete Card_Maint PC1 cards" and it deletes card maint records that have PC1 card numbers. When you are doing PC1, there is a corresponding script to delete CM1 cards.

  7. Go to the webstop admin pages, select the retailer website, and click on the ABC production link, such as
    http://www.mycountrymart.com/1_Adm_CM1/Admin_Stub.las

    Select "F1 A. Card Maint CRUNCH" and enter the file date of the card maint file. In this example, that would be 2006 04 13

  8. NOTE:

    Observe the result pages of the crunch, which processes 100 card maint records in a batch and then starts again with the next set until all records are processed. It normally handles about 300 a minute. Look at the processing results and make sure that it looks like the records are processing! If not, there may be a problem with the load query, such as loading the card_maint card/upc number into the cardNbr vs the UPC field (the correct field).

Error Codes:

XD4 is fine. Any other writing in red is bad, unless it's on the same line as a XD4 error code.