Kbase P142360: 4GL/ABL: How to call the USPS USPS4CB.DLL encoder to produce an Intelligent Mail Barcode?
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  5/25/2010 |
|
Status: Verified
GOAL:
4GL/ABL: How to call the USPS USPS4CB.DLL encoder to produce an Intelligent Mail Barcode?
GOAL:
What is the United States Postal Service (USPS) Intelligent Mail Barcode technology?
GOAL:
How to generate generate Intelligent Mail Barcode using the USPS published USPS4CB.DLL encoder?
FACT(s) (Environment):
Windows
Progress 8.x
Progress 9.x
OpenEdge 10.x
OpenEdge Category: Language (4GL/ABL)
FIX:
Intelligent Mail Barcode or the USPS OneCode Solution or USPS 4-State Customer Barcode, is the latest barcode technology published by the United States Postal Services. It combines routing ZIP code information and tracking information into a single 4-state code. The following 4GL/ABL sample code demonstrates how to call the USPS published encoder USPS4CB.DLL as an EXTERNAL PROCEDURE:
DEFINE VARIABLE cTrackString AS CHARACTER NO-UNDO.
DEFINE VARIABLE cRouteString AS CHARACTER NO-UNDO.
DEFINE VARIABLE cBarString AS CHARACTER NO-UNDO.
DEFINE VARIABLE iReturnCode AS INTEGER NO-UNDO.
ASSIGN
cTrackString = "01234567890123456789"
cRouteString = "012345678901234"
cBarString = FILL(CHR(32), 65).
RUN USPS4CB(
INPUT cTrackString,
INPUT cRouteString,
INPUT-OUTPUT cBarString,
OUTPUT iReturnCode
) NO-ERROR.
IF ERROR-STATUS:ERROR THEN
MESSAGE "Error return Code: " iReturnCode
VIEW-AS ALERT-BOX INFO BUTTONS OK.
ELSE
MESSAGE cBarString
VIEW-AS ALERT-BOX INFO BUTTONS OK.
PROCEDURE USPS4CB EXTERNAL "C:\WRK91E\USPS4CB.DLL" CDECL:
DEFINE INPUT PARAMETER TrackString AS CHARACTER.
DEFINE INPUT PARAMETER RouteString AS CHARACTER.
DEFINE INPUT-OUTPUT PARAMETER BarString AS CHARACTER.
DEFINE RETURN PARAMETER RetCode AS LONG.
END.