In a sample Trading Partner Message Class Exit Point program we show users how they can query the EXTOL Log of Message Table (LF: EXLLMRL1) to retrieve a key piece of data. In our case it is a control number. With the control number we will be able to hone in on the correct records we need to copy
The SQLRPGLE program will be called each time a Nordstrom (4420) 856 is enveloped/wrapped sent. The pgm will read EXLLMRL1.LMREF3 to get E1SCTL. With E1SCTL we will read the Nordstrom VEDXSHS record to determine the carrier (E1VIA). We will get the 1st 3 characters of E1VIA to see if value is ‘UPS. If 'UPS’ we will run 5 SQL insert statements to copy the data from VEDXSHx tables to VEFXSHx tables.
After exit point program is called a separate CL will be called to run
CRTAPPDTA(B). CRTAPPDTA(B) will envelope the data and wait for the next successful S2K job to wrap and send the data. CRTAPPDTA(B) will also updated the process flag in VEFXSHS.
CRTAPPDTA FSET(VAI856S4) TEXT('NORDSTROM/UPS outbound ASN’) ERROPT(*NO) CRTENV(*YES) TRDPNR(4420) GROUP(SH) MSGID(856) MSGCLS(O856_4420U) RSLTMETHOD(*RUNTIME) PARCHLDREL(*YES)
The full program can be located here: Copy Records After Outbound Enveloping
By: Sean Hoppe on