How To Perform a Test for Alternate Source Suppliers

Description:  How to Perform a Test for Alternate Source Suppliers

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. 
There are four steps in order to run the test:

1)  Make a backup of each K_ALTSRCxx file

You will want to use the copy file (CPYF) function to copy your diverter data to backup files.  You want to copy from your K_ALTSRCxx file
in K3S_5DTA to your backup file in K3S_5MOD.  You can call your backup file whatever you like, but do NOT start your file with ‘K’ or ‘K_’
as this is the K3S standard and could cause unforeseen problems.  A good example of a name for a backup file would be QUALITY, to
designate Alternate Source supplier Quality King.

Another backup method is to create a copy of your stream files.  For example, if Supreme's data is found in link /KING/SUPREME.CSV then
you can use 3=Copy and F4=Prompt on the link and copy it to /KING/X_SUPREME.CSV to have a backup.

2)  Remove any Alternate Source Supplier data from three K3S files

Type the STRSQL command on a command line to start SQL.

Now type the following three commands, one at a time, to delete alternate source supplier information from K3S files K_SUPLSOQ, K_PRODSOQ,
    delete from k3s_5dta/k_suplsoq where so_altsrce = 1                       
    delete from k3s_5dta/k_prodsoq where pq_altsrce = 1                       
    delete from k3s_5dta/k_product where pr_altsrce = 1                       

3)  Call RPGLE program K3S_9110CL to process your alternate source supplier information

You will need to call K3S_9110CL from a command line and pass it your one-letter company code as a parameter.  See below:
    CALL PGM(K3S_9110CL) PARM(‘C’)

4)  Copy your backup information to their original K_ALTSRCxx file

You will need to perform the copy file (CPYF) function again, but this time in reverse of how you were copying before in step 1 above.  You want to
copy from your backup file in K3S_5MOD to your K_ALTSRCxx file in K3S_5DTA.

Example:    If my backup file is called QUALITY and my original file is K_ALTSRC01, the command should look as follows:


Now that you have completed the four steps, you are able to go into the system to see if the diverter information looks correct.

To do this, take option 4. Suggested orders from the K3S main menu, position your cursor under Mode, Type in 'A' for alternate source
and press ENTER.

See example below where 5 diverter orders are showing.
Use option 5=View on one of the orders and press ENTER.

On the K3S_1020 screen (see example below), type in 'SQ' into the Select Check field and press ENTER.

On the K3S_1030 screen (see example below), put option 9=Available next to the top product in the list and press F21=Start.

You are now on the K3S_1070 screen comparing the diverter prices.