9999 - Timestamp Program for NITECL

Sections in this article

What is the 9999 Program?

This an RPG program that is used to create a snapshot of time for the night job program at each important step. This is important because if the NIGHT job was interrupted at some point, we are then able to understand when and where it was stopped, as well as, we are then able to rerun it from the point it had been interrupted.

Files Gathered

- K_NITELOGA
- K_NITELOGB

Variables

save_stamp				timestamp(6)					message id
time_stamp				timestamp						message id
comp					char(1)							message id
task					char(1)							message id
restart					char(6)							message id
series					packed(7:0)						message id
altproc					char(1)							message id
logstrt					char(6)							message id
logend					char(1)							message id
suplchng				char(1)							message id	
daystrt					char(26)						message id
dayend					char(26)						message id
prend12					char(1)							message id
prend13					char(1)							message id
prend52					char(1)							message id
duration				packed(15:0)					message id
misec_aft				char(6)							message id
misec_bef				char(6)							message id
aft_time				char(26)						message id
bef_time				char(26)						message id

Parameters

 parm                    comp                           buy group id
 parm                    task                           location id
 parm                    restart                        supplier id
 parm                    series                         sub supplier id
 parm                    altproc                        sub supplier id
 parm                    logstrt                        sub supplier id
 parm                    logend                         sub supplier id
 parm                    suplchg                        sub supplier id
 parm                    daystrt                        sub supplier id
 parm                    dayend                         sub supplier id
 parm                    prend12                        sub supplier id
 parm                    prend13                        sub supplier id
 parm                    prend52                        sub supplier id

Process

First, assure that the night job had successfully completed last night. Then, pass and store all of K3S_NIGHTCL parameters. Record timestamp for in which it had begun. Log for every important step in K3S_NIGHTCL. If an error occurs, flag it. Once processed, calculate the duration.