Setting Up Diverters

Setting Up a Diverter

1) Pick your diverter day

Diverter orders will only be generated one day a week. Choose the day you’d like to approve the diverter orders. Picking the diverter day determines the deadline for the diverter to send us their weekly file. As an example, you may pick Tuesday as your diverter day. This means we would expect you to approve your diverter orders on Tuesday a majority of the time. Yes you could approve on another day, but the diverter is less likely to have all of the products available the longer you wait to order.

2) Decide which diverters you want to set up

We have contacts at diverter sites we have worked with at other K3S customer sites if you need info (Quality King, Victory, Supreme, Purity). If you want to use a diverter we have not worked with before, just a heads up it will take a little longer to iron out file formatting, etc.

3) Set up the supplier ID

Set up the Supplier ID in the host ERP system, and tell K3S the supplier ID so we can set it up in K3S. Suppliers have to be manually added in K3S due to their unique settings.

SPECIAL NOTE: Do not assign any products under the diverter supplier ID in your ERP. K3S can not have products assigned to a diverter. Products must live under a ‘regular’ supplier.

4) Transmit the weekly file to the exchange site

There are two steps to getting a diverter’s weekly file imported into K3S. First, the customer will set up a process to receive the file from the diverter. There are lots of possibilities on how to receive the file. Ideally the diverter sends the file directly to a folder on your server or to an FTP site if you all already have one that you use. Another possibility is someone could be trained to take an email attachment and load on to your server, but this is not recommend this as a long term solution. Second, the customer will transmit the file to the diverter folder at the exchange site.

Technical Notes

A) Add Supplier Set up the diverter in Supplier Settings. When adding a new supplier, you will need to enter the Supplier ID into the Supplier field, the name of the diverter into the Name field, and also select in the drop down that it is an alternative source.

B) Determine K_ALSTRC file Determine the physical file that will hold the weekly offerings.

There are 15 files available to use from file name K_ALTSRC01 through K_ALTSRC15. More files can be established if you will be buying from more than 15 sources. These files are located in library K3S_5DTA and are flat files with 80 bytes records. If this is the first alternate source supplier you are setting up, then use the first file called K_ALTSRC01.

C) Import diverter files Edit CLLE program K3S_DIVERT to run a script that will import the diverter files from the diverter folder at the exchange into the IFS. Then the program will import the data from the IFS stream file into the designated K_ALTSRCxx physical file in the 5DTA library. The end of the program should run a script to remove all diverter files found in the diverter rolder. This prevents accidental reuse of an old file the following week. If no diverter files are found this week, an alert will be sent. The scripts will be located at /k3sapps/ZZZ/scripts.

D) Scheduled job Set up scheduled job ZZZ_5DIVERT to run once a week on diverter day. Schedule the job to run 5 minutes before the night job. This job will call CLLE program K3S_DIVERT. The goal of the job is to load diverter data from the exchange site into the designated K_ALTSRCxx physical file.

E) Set up the ASE Tablecodes Set up the ASE (Alternate Source Entries) table code record to match the physical file.

F) Map the diverter data Make adjustments to the RPGLE Program K3S_9100. The purpose of program K3S_9100 is to map the weekly offerings sent by the alternate source suppliers to field positions that are understood by this program.

For each alternate source supplier added you will change the Input specifications for the proper ‘from’ and ‘to’ positions, and then down in the Calculation statements you will change the supplier ID to match the appropriate value for this new alternate source.

Configuration may also be needed to adjust the calculations to multiple or divide by a pack value so the costs are in the same unit of measure between the product from the regular supplier compared to the diverter.

G) Set up Processing Schedule Adjust the K3S Processing Schedule to understand which day is diverter day. Use the F7=Global Maintenance option to set the diverter day in the Alternate Source column.

H) Edit K3S_1091CL with 3 letter company code Edit K3S_1091CL. Input the customer’s 3 letter Company code and compile.

I) Turn on NJP tablecode The last step in setting up diverters is to flip a tablecode that tells the night job to build diverter orders. Set Flag 1 = 1 where tabel code type = NJP (Night Job Paramters) and the table code value = ALT_SYSTEM Wait to flip this flag ON until you have tested the process to avoid a potential night job error. Monitor the first night job that will run diverter processing.

Testing

Once you have completed the setup steps for your alternate source suppliers, you are able to run a test on your alternate source supplier data.

1) Back up IFS diverter files It may be helpful to have a back up of the diverter offering files when you are first setting up the process. Go into the IFS and use 3=COPY to create a backup stream file.

2) Remove existing diverter data Remove any diverter data from three K3S files.

Run the following SQL commands:

  • delete from zzz_5dta/k_suplsoq where so_altsrce = 1
  • delete from zzz_5dta/k_prodsoq where pq_altsrce = 1
  • delete from zzz_5dta/k_product where pr_altsrce = 1

3) Load the K_ALSTRC files Use option 10=Submit immediately on scheduled job ZZZ_5DIVERT to pull the data from the exchange site and load into the K_ALSTRC* files.

4) Build diverter orders Check for data in the K_ALSTRC* files. If data does not exist, go back to the prior step and troubleshoot.
If data exists, you can proceed with building diverter orders. Set up your library list to contain the customer’s libraries. Call RPGLE program K3S_9110CL to build the orders. Run the following command from a command line; pass the one letter COMP code as the parameter: You will need to call K3S_9110CL from a command line and pass it your one-letter company code as a parameter. CALL PGM(K3S_9110CL) PARM(‘C’)

Miscellaneous

Adjust custom blue blue K3S_9941 to contain diverter information.

Some customers want hold outs created for all diverter orders so that the purchase does not interfere with their regular replenishment. The hold out should end when the diverter PO is received. Setting this up takes configuration. Ask the customer if they want this configuration.