SeanHoppe.com > Cleo Best Practices > ADDDAYS External Call to Subtract 7 Days

\

ADDDAYS External Call to Subtract 7 Days


ADDDAYS Background:

In Cleo (EXTOL) EDI Integrator we will show how-to convert date from/to format and optionally add/sub number of days to the date. This program makes use of the DATECONV code table.

ADDDAYS RPG Set-up:

Standard Code Table Parms (Parm List 1 short)
        Inbound ( P1CDTT = "I" )
                P0RTN = *BLANKS when valid conversion
                STD = From Date (unchanged)
                QUAL = Fmts & # Days (see below)
                LCL = To Date (when valid STD & QUAL passed)
        Outbound ( P1CDTT = "O" )
                P0RTN = *BLANKS when valid conversion
                STD = To Date (when valid LCL & QUAL passed)
                QUAL = Fmts & # Days (see below)
                LCL = From Date (unchanged)
QUAL -- positional values
                Any formats supported by DATECONV code table
                can be used for Std or Lcl here, including
                but not limited to YMD, MDY, ZMD.
                01-03: Std Format
                04-06: Lcl Format
                07-12: Days to Add/Subtract
                             Integer followed by optional minus sign
                             Eg. 015 00015 15 are all the same
                                              1- 01- 00001- are all the same
Ex: Inbound QUAL YMDZMD0015
        Convert YYMMDD to CCYYMMDD and add 15 days.
Ex: Outbound QUAL YMDZMD30-
        Convert CCYYMMDD to YYMMDD and subtract 30 days.

ADDDAYS Example - Subtract 7 Days

Cleo Scenario: Inbound x12 data is in the form of ZMD (YYYYMMDD) and we want to subtact 7 days

CLEO EDI Integrator ADDDAYS External Call Subtract 7 days




By: on
EXTOL Business Partner Logo

More CLEO Examples

We have over 300+ examples of how Cleo EDI Integrator (EEI) can be customized to meet your organization's needs

Each of our examples are free to review and use.