SeanHoppe.com > CLEO Tips > Cleo EDI Integrator > Coding Sample: TPMC ExitPoint using SQLPRGLE to Copy Records

Coding Sample: TPMC ExitPoint using SQLPRGLE to Copy Records

3rd September 2014

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: on
load('http://www.seanhoppe.com/EXTOL-Blog-Feed2/'); $feed2 = array(); foreach ($rss2->getElementsByTagName('item') as $node2) { $item2 = array ( 'title' => $node2->getElementsByTagName('title')->item(0)->nodeValue, 'desc' => $node2->getElementsByTagName('description')->item(0)->nodeValue, 'link' => $node2->getElementsByTagName('link')->item(0)->nodeValue, 'date' => $node2->getElementsByTagName('pubDate')->item(0)->nodeValue, ); array_push($feed2, $item2); } $limit2 = 5; $rss3 = new DOMDocument(); $rss3->load('http://www.ebithree.com/EBIThree-RSS/'); $feed3 = array(); foreach ($rss3->getElementsByTagName('item') as $node3) { $item3 = array ( 'title' => $node3->getElementsByTagName('title')->item(0)->nodeValue, 'link' => $node3->getElementsByTagName('link')->item(0)->nodeValue, ); array_push($feed3, $item3); } $limit3 = 5; $rss4 = new DOMDocument(); //$rss4->load('http://www.ebithree.com/EBIThree-RSS/'); $rss4->load('http://www.ebiworld.com/EBI-Feed/'); $feed4 = array(); foreach ($rss4->getElementsByTagName('item') as $node4) { $item4 = array ( 'title' => $node4->getElementsByTagName('title')->item(0)->nodeValue, 'link' => $node4->getElementsByTagName('link')->item(0)->nodeValue, ); array_push($feed4, $item4); } $limit4 = 5; echo ' '; ?>