MAC-PAC Homecontact ussupport login 
Documentation > MAC-PAC Technical Library > Distribution > Synchro > Programs > Delivery Request Auto Input - Purpose > Delivery Request Auto Input - Calculations

Delivery Request Auto Input - Calculations

GA210E

A.   Mainline

1.   All records of the internal workfile (GA210AP1) are processed in BTHPRC by identifying the segment type of the message and calling the appropriate subroutine (first three letters identify the GALIA segment):

TCOPRC

DELPRC

SIDPRC

PDNPRC

DSTPRC

FTYPRC

SADPRC

PDIPRC

ITAPRC

ARDPRC

CSGPRC

FTXPRC

DLPPRC

ARIPRC

BDTPRC

MDTPRC

SDTPRC

MIDPRC

 

If an error occurs, the current record is written to the workfile GA210BP by calling SRLERR.

2.   At the end of each processed message, ENDMSG updates category G15 (last processed message) and updates or writes to the following Synchro master files, if the program does not run in simulation mode (input parameter SIMUL):

Delivery Request Header (GA210M1)
Delivery Request Detail (GA210M2)
Delivery Request Comment (GA210M3)
Item/Delivery Point Relationship (GA120M2)

      RELVAL controls if new records have to be created or current ones are updated.  New records are created on these master files if the type of the delivery request is "Cancel and Replace" (type 1).  If the request type is "Current Actualization" (type 2), ACTVAL is called to check if such a delivery request exists and the master files are updated with the transmitted data.

      ENDMSG updates the status of the message currently being processed if the program was called in simulation mode.  If the transmitted DELINS message contains an error, the status on GA210DP is set to 'FLT'; if it is correct, the status is set to 'RDY'.

      The workfile GA210BP, which contains all the delivery requests in error found during the batch run, is appended to the Erroneous DELINS file (GA210CP) and cleared by calling the CL-program GA212CLP (subroutine PRCFIL).  Correctly acquired messages are written to the workfile GA210FP for report purposes.

      In simulation mode, CL-program GA213CLP is called instead of GA212CLP (subroutine PRCFI2) to append GA210BP to GA210CP (simulation parameter SIMUL set to 'SIM1') and to clear GA210BP.  If SIMUL = 'SIM2', which means that the acquisition of only one message is simulated, GA210BP is copied to GA210EP and GA210BP is cleared afterwards.

3.   If any error occurs during processing, records are written to the Delivery Request in Error file (GA230AP) and the General Error file (GA999AP) (ERRPRC).