K3S_NIGHT - K3S Night Mod

Sections in this article

What is the K3S_NIGHT Program

This CL program starts the night job by submitting K3S_NITECL.

Variables and Parameters

	COMP    char(1)
    K3S_DTA char(10)
    CUSTLIB char(10)
    K3S_OBJ char(10)
    K3S_MOD char(10)

Process

Set library list as follows:

  • K3S_5DLY
  • K3S_5MOD
  • K3S_5DTA
  • K3S_5QRY
  • K3S_5BOJ

CALL AR_MONITOR which will alert the dashboard that the Night Job has started.

Unlock file locks from R6 by calling program QCLLESRC/AC_UNLKFCL. A report will be made for those files where the file could not be released.

Change data area to the value of 1 to lock users from using K3S.

CALL K3S_RMVJOB which will end any batch jobs K3S_Replenish immediately.

CALL K3S_RMVUSR which will end any active user in K3S_Replenish with a 3 minute warning.

Build interface file K_INTPROD by clearing and then calling program K3S_9000.

Build interface file K_INTSUPL by clearing and then calling program K3S_ADDSUP.

Collect the daily transactions from a customer’s invoicing run. Write to the K_INTDALY file by calling K3S_9254.

Update K_INTPROD with K_INTDALY by calling program K3S_9256, used to gather the daily demand data.

Update the K_PRODLTM file by calling the K3S_GETLT program, writting the PO receipts.

Submit job command for K3S_NITECL by calling K3S_NITECL with the parameters and compile with the default activation *YES.

SBMJOB CMD(CALL PGM(&K3S_OBJ/K3S_NITECL) PARM(&COMP &K3S_DTA &CUSTLIB &K3S_OBJ &K3S_MOD)) JOB(CBW_5NITE) JOBQ(QGPL/CBW_BATCH) INLLIBL(CURRENT) LOG(JOBD 10) JOBMSGQFL(*WRAP)