Calling RPG ..!!

vliyer

Active Member
This is a multi-part message in MIME format.

------=_NextPart_000_f30_563_46b6
Content-Type: text/plain; format=flowed

Hi,
Someone recently answered this question for me..!!

Here is the document.

regards,

venkat.

_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

------=_NextPart_000_f30_563_46b6
Content-Type: text/html; name="ott-99-0063.htm"
Content-Transfer-Encoding: 8bit
Content-Disposition: attachment; filename="ott-99-0063.htm"

<HTML>
<HEAD>
<META NAME="CONTENTAUTHOR" CONTENT="Dan Stern">
<META NAME="CONTENTTYPE" CONTENT="CSKnowledge">
<META NAME="KNOWLEDGETYPE" CONTENT="\JDEdwards\KnowledgeType\HowTo">
<META NAME="TITLE" CONTENT="Calls to RPG Programs from OneWorld Business Functions">
<META NAME="PLATFORM" CONTENT="\JDEdwards\Platform\AS400">
<META NAME="OWNER" CONTENT="jdemd1\ds5598241">
<META NAME="SUBMITTIME" CONTENT="2000/09/27 15:21:10">
<META NAME="SPECIALINSTRUCTIONS" CONTENT="replace rpgcallswithinowbsfn.doc">
<META NAME="PRODUCT" CONTENT="\JDEdwards\Products\CollaborativeIntegrations\Interoperability\CAPIs, \JDEdwards\Products\OneWorld\Technical\Coexistence, \JDEdwards\Products\OneWorld\Technical\Designtools\Businessfunction">
<META NAME="ABSTRACT" CONTENT="This document provides a reference for developers and business partners who are interested in creating calls from within OneWorld C business functions to RPG programs residing on the AS/400.
">
<META NAME="CONTENTSTORE" CONTENT="\JDEdwards\Centers\Support\CustomerKnowledge\CSKnowledge">


<title>ott-99-0063</title>
</head>

<body bgcolor="#FFFFFF" link="#0000FF" vlink="#800080"
topmargin="20" leftmargin="20">

<table border="1" cellspacing="1" width="624"
bordercolor="#000000">
<tr>
<td width="50%"><font size="4">HowTo </font></td>
<td width="50%"><font color="#808080">
Data Classification: Confidential </font></td>
</tr>
</table>

<hr>

<h1>Title: Calls to RPG Programs from OneWorld Business Functions</h1>



Abstract: This document provides a reference for
developers and business partners who are interested in creating
calls from within OneWorld C business functions to RPG programs
residing on the AS/400.
</p>

<table border="1" cellpadding="2" cellspacing="1" width="572">
<tr>
<td valign="top" width="27%"><font size="2">Product</font></td>
<td valign="top" width="75%"><font size="2">OneWorld</font></td>
</tr>
<tr>
<td valign="top" width="27%"><font size="2">Suite</font></td>
<td valign="top" width="75%"><font size="2">Technical</font></td>
</tr>
<tr>
<td valign="top" width="27%"><font size="2">Release</font></td>
<td valign="top" width="75%"><font size="2">B732, B733 </font></td>
</tr>
<tr>
<td valign="top" width="27%"><font size="2">Document
ID
</font></td>
<td valign="top" width="75%"><font size="2">ott-99-0063 </font></td>
</tr>
<tr>
<td valign="top" width="27%"><font size="2">Date
Created
</font></td>
<td valign="top" width="75%"><font size="2">4/15/1999</font></td>
</tr>
<tr>
<td valign="top" width="27%"><font size="2">Date
Reviewed
</font></td>
<td valign="top" width="75%"><font size="2">4/15/1999 </font></td>
</tr>
<tr>
<td valign="top" width="27%"><font size="2">Date
Revised
</font></td>
<td valign="top" width="75%"><font size="2">4/15/1999 </font></td>
</tr>
</table>

<hr>



<font size="4">Overview</font></p>



The purpose of this document is to provide a reference for
developers and business partners who are interested in creating
calls from within OneWorld C business functions to RPG programs
residing on the AS/400. </p>



Included in this document are a description of the business
purpose, pre-requisite setup requirements for implementing calls
from OneWorld, and an overview of how a call is made. Examples of
calls are included, and will be used to explain the process.</p>



<font size="4"></font></p>



<font size="4">Purpose</font></p>



By following the steps outlined in this document and referring
to the examples described, developers and business partners who
need to call third party RPG programs from OneWorld business
functions should be able to create their own calls.</p>



This process was first implemented when J.D. Edwards, in
partnership with ITLS Corporation, developed a method of
utilizing ITLS&#146;s advanced shipment processing functionality
within the framework of the current order processing. This method
enables J.D. Edwards clients to use the Shipper Management System
(SMS) by sending a call from a OneWorld business application to
the AS/400. Through the SMS interface, clients have access to
tools residing on the AS/400 which are not available in the
OneWorld environment. </p>



The ITLS examples described in this document are for
informational and reference purposes only, and are not intended
to be exact templates for other applications. Because
requirements vary for each application, actual implementation may
be different from the processes and procedures described in this
document.</p>



<font size="4"></font></p>



<font size="4">Setup Considerations</font></p>



Before you implement a call from OneWorld to an RPG program,
the following things must be in place:</p>

  1. OneWorld business function specifications must reside on
    the AS/400 server. That is, the business function must
    have its Object Configuration Manager (OCM) mappings set
    to run on the AS/400. Anything required by the RPG
    program must be resident. This is a one-time setup that
    you need to perform initially before implementing calls
    from within a OneWorld business function to an RPG
    program; you needn&#146;t do this setup every time. For
    more information about making these setups, see the
    OneWorld guides Object Package Install to OneWorld
    Enterprise Servers and Configuration Planning and Setup.
  2. Ensure that the production library list on the AS/400
    where the RPG program is going to run is set up to access
    all the servers and common copy subroutines required by
    the RPG program. For example, for the ITLS solution, the
    library list includes the XS7300 Complementary Products
    Constant file server, and the I7300 copy module.
  3. The RPG program must be compiled and exist as an object
    on the AS/400.
  4. All necessary tables and files required by the RPG
    program must exist in the db2 data source on the AS/400.
    Be sure the data library on the AS/400 is part of the
    library list for the RPG program.



<font size="4">Setup Caveats</font></p>



If tables do not exist in db2 on the AS/400, do not use
replication as a means of getting tables into db2. For example,
if the Sales Order header (F4210) and Sales Order Detail (F4211)
exist in an Oracle database, do not try to replicate the header
and file to db2 on the AS/400. The RPG program may try to do an
update to these items, and these updates won&#146;t be reflected
in db2. </p>



Do not use tables that use OneWorld database triggers. Tables
that have defined database triggers and are mapped to db2 on the
AS/400 will not be triggered when accessed by the RPG program.</p>



<font size="4">Functional Overview</font></p>



This section describes the general process of how a call is
made to an RPG program from within a OneWorld C business
function. Following a brief description of the general process is
a specific example used in the ITLS implementation. The process
for creating a call can be summarized in the following main
steps:</p>

  1. On the OneWorld side, define the data structure for the
    business function that will do the call to the RPG
    program. Map the C data structure to match the RPG
    parameter list as closely as possible. (The parameter
    list on the RPG side must match the defined C data
    structure.) Before you proceed, derive C business
    function parameters from that end.

    As an example,
    following is the data structure for the ITLS function
    that calls the RPG program SMR9100:</p>

<table border="1" cellpadding="2" cellspacing="1" width="638">
<tr>
<td valign="top" width="20%" bgcolor="#C0C0C0"><p
align="center">Data Item</p>
</td>
<td valign="top" width="31%" bgcolor="#C0C0C0"><p
align="center">Data Structure Description</p>
</td>
<td valign="top" width="6%" bgcolor="#C0C0C0"><p
align="center">I/O</p>
</td>
<td valign="top" width="13%" bgcolor="#C0C0C0"><p
align="center">Required</p>
</td>
<td valign="top" width="30%" bgcolor="#C0C0C0"><p
align="center">Notes</p>
</td>
</tr>
<tr>
<td valign="top" width="20%">DOCO</td>
<td valign="top" width="31%">mnDocumentOrderInvoice</td>
<td valign="top" width="6%">I</td>
<td valign="top" width="13%">Y</td>
<td valign="top" width="30%"></td>
</tr>
<tr>
<td valign="top" width="20%">SHAN</td>
<td valign="top" width="31%">mnAddressNumberShipTo</td>
<td valign="top" width="6%">I</td>
<td valign="top" width="13%">Y</td>
<td valign="top" width="30%"></td>
</tr>
<tr>
<td valign="top" width="20%">DCTO</td>
<td valign="top" width="31%">szOrderType</td>
<td valign="top" width="6%">I</td>
<td valign="top" width="13%">Y</td>
<td valign="top" width="30%"></td>
</tr>
<tr>
<td valign="top" width="20%">KCOO</td>
<td valign="top" width="31%">szCompanyKeyOrderNo</td>
<td valign="top" width="6%">I</td>
<td valign="top" width="13%">Y</td>
<td valign="top" width="30%"></td>
</tr>
<tr>
<td valign="top" width="20%">ACT</td>
<td valign="top" width="31%">szActionCodesNotAllowed</td>
<td valign="top" width="6%">I</td>
<td valign="top" width="13%">Y</td>
<td valign="top" width="30%">"S",
"D", "M"</td>
</tr>
<tr>
<td valign="top" width="20%">EV01</td>
<td valign="top" width="31%">cEverestEventPoint01</td>
<td valign="top" width="6%">I</td>
<td valign="top" width="13%">Y</td>
<td valign="top" width="30%">'1'</td>
</tr>
<tr>
<td valign="top" width="20%">RNT</td>
<td valign="top" width="31%">mnRouteNumber</td>
<td valign="top" width="6%"></td>
<td valign="top" width="13%">N</td>
<td valign="top" width="30%"></td>
</tr>
<tr>
<td valign="top" width="20%">ERRT</td>
<td valign="top" width="31%">szTypeofError</td>
<td valign="top" width="6%"></td>
<td valign="top" width="13%">N</td>
<td valign="top" width="30%"></td>
</tr>
<tr>
<td valign="top" width="20%">AA12</td>
<td valign="top" width="31%">szAlphaSpecData12</td>
<td valign="top" width="6%"></td>
<td valign="top" width="13%">N</td>
<td valign="top" width="30%"></td>
</tr>
<tr>
<td valign="top" width="20%">MCU</td>
<td valign="top" width="31%">szCostCenter</td>
<td valign="top" width="6%"></td>
<td valign="top" width="13%">N</td>
<td valign="top" width="30%"></td>
</tr>
<tr>
<td valign="top" width="20%">SECFRQ</td>
<td valign="top" width="31%">mnChangeFrequency</td>
<td valign="top" width="6%">I</td>
<td valign="top" width="13%">Y</td>
<td valign="top" width="30%">Assign Zero</td>
</tr>
<tr>
<td valign="top" width="20%">PROV</td>
<td valign="top" width="31%">cPriceOverrideCode</td>
<td valign="top" width="6%"></td>
<td valign="top" width="13%">N</td>
<td valign="top" width="30%"></td>
</tr>
<tr>
<td valign="top" width="20%">PROC</td>
<td valign="top" width="31%">cNoticeToProceed</td>
<td valign="top" width="6%"></td>
<td valign="top" width="13%">N</td>
<td valign="top" width="30%"></td>
</tr>
<tr>
<td valign="top" width="20%">MISC</td>
<td valign="top" width="31%">mnMinServToCalculate</td>
<td valign="top" width="6%"></td>
<td valign="top" width="13%">N</td>
<td valign="top" width="30%"></td>
</tr>
<tr>
<td valign="top" width="20%">PID</td>
<td valign="top" width="31%">szProgramID</td>
<td valign="top" width="6%">I</td>
<td valign="top" width="13%">Y</td>
<td valign="top" width="30%">"SMR9100"</td>
</tr>
<tr>
<td valign="top" width="20%">VERS</td>
<td valign="top" width="31%">szVersion</td>
<td valign="top" width="6%">I</td>
<td valign="top" width="13%">Y</td>
<td valign="top" width="30%"></td>
</tr>
</table>



</p>

  1. Define the business function&#146;s "if
    defines."
  2. The data structure loaded in the business function makes
    the call to the RPG program. (If it compiles on the
    AS/400 server, make sure the call is compiled.)
  3. Tables resident on the AS/400 are updated.



</p>



<font size="4">The ITLS Solution</font></p>



As an example, the following steps are involved in the ITLS
solution for implementing calls from OneWorld:</p>

  1. Sales order information is entered through OneWorld Sales
    Order Entry. The order is then created and completed on
    the AS/400 server.
  2. Once the order is completed, the OneWorld business
    function calls the Routing and Rating program on the
    server to create the shipment. In order to use the
    SMR9100 server, the data structure that holds the
    complementary products flag must be passed. This
    structure is defined in the I7300 copy module.
  3. The Routing and Rating server (SMR9100) performs edits
    and passes the shipment information to the load building
    routine (SMR2200) on the server.
  4. The load is released by the server.
  5. Pick slips and pick requests are generated.
  6. Orders that have gone through the generate pick slip or
    pick request process are automatically frozen by SMR9100.
  7. For OneWorld applications, item and order and shipment
    confirmation are performed manually on the AS/400 server.



<font size="4">Programming Examples</font></p>



This section contains specific code examples used to develop
the ITLS interface. A brief description precedes each program.</p>



<font size="4">Routing and Rating Program</font></p>



The following header and corresponding program were written to
call the RPG program which performs routing and rating for
clients using the Shipper Management System (SMS).</p>



<font size="4">B4201140.h Header</font></p>

<table border="1" cellpadding="2" cellspacing="1" width="600">
<tr>
<td>

<font size="1" face="Arial Narrow">/*****************************************************************************</font></p>


<font size="1" face="Arial Narrow">* Header File:
B4201140.h</font></p>


<font size="1" face="Arial Narrow">* Description: ITLS
Interface Header File</font></p>


<font size="1" face="Arial Narrow">* History:</font></p>


<font size="1" face="Arial Narrow">* Date Programmer
SAR# - Description</font></p>


<font size="1" face="Arial Narrow">* ----------
---------- -------------------------------------------</font></p>


<font size="1" face="Arial Narrow">* Author 06/04/1997
SB5491937 1632368 - Created </font></p>


<font size="1" face="Arial Narrow">*</font></p>


<font size="1" face="Arial Narrow">* Copyright (c)
J.D. Edwards World Source Company, 1996</font></p>


<font size="1" face="Arial Narrow">*</font></p>


<font size="1" face="Arial Narrow">* This unpublished
material is proprietary to J.D. Edwards World Source </font></p>


<font size="1" face="Arial Narrow">* Company. All
rights reserved. The methods and techniques described </font></p>


<font size="1" face="Arial Narrow">* herein are
considered trade secrets and/or confidential.
Reproduction</font></p>


<font size="1" face="Arial Narrow">* or distribution,
in whole or in part, is forbidden except by express</font></p>


<font size="1" face="Arial Narrow">* written
permission of J.D. Edwards World Source Company.</font></p>


<font size="1" face="Arial Narrow">****************************************************************************/</font></p>


<font size="1" face="Arial Narrow">#ifndef
__B4201140_H</font></p>


<font size="1" face="Arial Narrow">#define
__B4201140_H</font></p>


<font size="1" face="Arial Narrow">/* This program is
called by a CL program that passes */</font></p>


<font size="1" face="Arial Narrow">/* */</font></p>


<font size="1" face="Arial Narrow">/* */</font></p>


<font size="1" face="Arial Narrow">/* */</font></p>


<font size="1" face="Arial Narrow">/* RPG/400 is
called to perform the Routing and Rating logic */</font></p>


<font size="1" face="Arial Narrow">#include
<stdio.h></font></p>


<font size="1" face="Arial Narrow">#include
<stdlib.h></font></p>


<font size="1" face="Arial Narrow">#include
<string.h></font></p>


<font size="1" face="Arial Narrow">#ifdef JDENV_AS400</font></p>


<font size="1" face="Arial Narrow">#include
<decimal.h></font></p>


<font size="1" face="Arial Narrow">#endif /*
JDENV_AS400 */</font></p>


<font size="1" face="Arial Narrow">/* The #pragma map
directive maps a new program name to the existing program
name so that the purpose of the program is clear.</font></p>


<font size="1" face="Arial Narrow">*/</font></p>


<font size="1" face="Arial Narrow">#ifdef JDENV_AS400</font></p>


<font size="1" face="Arial Narrow">#pragma
map(rating_and_routing,"SMR9100")</font></p>


<font size="1" face="Arial Narrow">#endif /*
JDENV_AS400 */</font></p>


<font size="1" face="Arial Narrow">/*</font></p>


<font size="1" face="Arial Narrow">* Tell the compiler
that there are dynamic progam calls so arguments are
passed by value-reference.</font></p>


<font size="1" face="Arial Narrow">*/</font></p>


<font size="1" face="Arial Narrow">#pragma
linkage(rating_and_routing, OS)</font></p>


<font size="1" face="Arial Narrow">/*****************************************************************************</font></p>


<font size="1" face="Arial Narrow">* Table Header
Inclusions</font></p>


<font size="1" face="Arial Narrow">****************************************************************************/</font></p>


<font size="1" face="Arial Narrow">/*****************************************************************************</font></p>


<font size="1" face="Arial Narrow">* External Business
Function Header Inclusions</font></p>


<font size="1" face="Arial Narrow">****************************************************************************/</font></p>


<font size="1" face="Arial Narrow">#include
<b0000083.h></font></p>


<font size="1" face="Arial Narrow">/*****************************************************************************</font></p>


<font size="1" face="Arial Narrow">* Global
Definitions</font></p>


<font size="1" face="Arial Narrow">****************************************************************************/</font></p>


<font size="1" face="Arial Narrow">/*****************************************************************************</font></p>


<font size="1" face="Arial Narrow">* Structure
Definitions</font></p>


<font size="1" face="Arial Narrow">****************************************************************************/</font></p>


<font size="1" face="Arial Narrow">/*#ifdef
JDENV_AS400 */</font></p>


<font size="1" face="Arial Narrow">typedef struct</font></p>


<font size="1" face="Arial Narrow">{</font></p>


<font size="1" face="Arial Narrow">char sz_doco[8];</font></p>


<font size="1" face="Arial Narrow">char sz_shan[8];</font></p>


<font size="1" face="Arial Narrow">char sz_dcto[2];</font></p>


<font size="1" face="Arial Narrow">char sz_kcoo[5];</font></p>


<font size="1" face="Arial Narrow">char c_act;</font></p>


<font size="1" face="Arial Narrow">char c_src;</font></p>


<font size="1" face="Arial Narrow">char c_rtn;</font></p>


<font size="1" face="Arial Narrow">char sz_errn[4];</font></p>


<font size="1" face="Arial Narrow">char sz_shpNo[12];</font></p>


<font size="1" face="Arial Narrow">char sz_mcu[12];</font></p>


<font size="1" face="Arial Narrow">char sz_d_chg[11];</font></p>


<font size="1" face="Arial Narrow">/*</font></p>


<font size="1" face="Arial Narrow">#ifdef JDENV_AS400 </font></p>


<font size="1" face="Arial Narrow">decimal (11,2)
d_chg;</font></p>


<font size="1" face="Arial Narrow">#endif*/ /*
JDENV_AS400 */</font></p>


<font size="1" face="Arial Narrow">char c_prov;</font></p>


<font size="1" face="Arial Narrow">char c_proc;</font></p>


<font size="1" face="Arial Narrow">char sz_misc[256];</font></p>


<font size="1" face="Arial Narrow">char sz_mpid[10];</font></p>


<font size="1" face="Arial Narrow">char sz_vers[10];</font></p>


<font size="1" face="Arial Narrow">} DS_ITLS;</font></p>


<font size="1" face="Arial Narrow">/*#endif*/ /*
JDENV_AS400 */</font></p>


<font size="1" face="Arial Narrow">/*****************************************************************************</font></p>


<font size="1" face="Arial Narrow">* DS Template Type
Definitions</font></p>


<font size="1" face="Arial Narrow">****************************************************************************/</font></p>


<font size="1" face="Arial Narrow">/*****************************************</font></p>


<font size="1" face="Arial Narrow">* TYPEDEF for Data
Structure</font></p>


<font size="1" face="Arial Narrow">* Template Name:
ITLS Interface</font></p>


<font size="1" face="Arial Narrow">* Template ID:
D4201140</font></p>


<font size="1" face="Arial Narrow">* Generated: Wed
Jun 04 13:48:57 1997</font></p>


<font size="1" face="Arial Narrow">*</font></p>


<font size="1" face="Arial Narrow">* DO NOT EDIT THE
FOLLOWING TYPEDEF</font></p>


<font size="1" face="Arial Narrow">* To make
modifications, use the Everest Data Structure Tool to
Generate a revised version, and paste from the clipboard.</font></p>


<font size="1" face="Arial Narrow">*</font></p>


<font size="1" face="Arial Narrow">**************************************/</font></p>


<font size="1" face="Arial Narrow">#ifndef
DATASTRUCTURE_D4201140</font></p>


<font size="1" face="Arial Narrow">#define
DATASTRUCTURE_D4201140</font></p>


<font size="1" face="Arial Narrow">typedef struct
tagDSD4201140</font></p>


<font size="1" face="Arial Narrow">{</font></p>


<font size="1" face="Arial Narrow">MATH_NUMERIC
mnDocumentOrderInvoiceE; </font></p>


<font size="1" face="Arial Narrow">MATH_NUMERIC
mnAddressNumberShipTo; </font></p>


<font size="1" face="Arial Narrow">char
szOrderType[3]; </font></p>


<font size="1" face="Arial Narrow">char
szCompanyKeyOrderNo[6]; </font></p>


<font size="1" face="Arial Narrow">char
szActionCodesNotAllowed[6]; </font></p>


<font size="1" face="Arial Narrow">char
cEverestEventPoint01; </font></p>


<font size="1" face="Arial Narrow">MATH_NUMERIC
mnRouteNumber; </font></p>


<font size="1" face="Arial Narrow">char
szTypeofErrpr[5]; </font></p>


<font size="1" face="Arial Narrow">char
szAlphaSpecData12[13]; </font></p>


<font size="1" face="Arial Narrow">char
szCostCenter[13]; </font></p>


<font size="1" face="Arial Narrow">MATH_NUMERIC
mnChangeFrequency; </font></p>


<font size="1" face="Arial Narrow">char
cPriceOverrideCode; </font></p>


<font size="1" face="Arial Narrow">char
cNoticeToProceed; </font></p>


<font size="1" face="Arial Narrow">MATH_NUMERIC
mnMinServToCalculate; </font></p>


<font size="1" face="Arial Narrow">char
szProgramId[11]; </font></p>


<font size="1" face="Arial Narrow">char szVersion[11];
</font></p>


<font size="1" face="Arial Narrow">} DSD4201140,
*LPDSD4201140;</font></p>


<font size="1" face="Arial Narrow">#define
IDERRmnDocumentOrderInvoiceE_1 1L</font></p>


<font size="1" face="Arial Narrow">#define
IDERRmnAddressNumberShipTo_2 2L</font></p>


<font size="1" face="Arial Narrow">#define
IDERRszOrderType_3 3L</font></p>


<font size="1" face="Arial Narrow">#define
IDERRszCompanyKeyOrderNo_4 4L</font></p>


<font size="1" face="Arial Narrow">#define
IDERRszActionCodesNotAllowed_5 5L</font></p>


<font size="1" face="Arial Narrow">#define
IDERRcEverestEventPoint01_6 6L</font></p>


<font size="1" face="Arial Narrow">#define
IDERRmnRouteNumber_7 7L</font></p>


<font size="1" face="Arial Narrow">#define
IDERRszTypeofErrpr_8 8L</font></p>


<font size="1" face="Arial Narrow">#define
IDERRszAlphaSpecData12_9 9L</font></p>


<font size="1" face="Arial Narrow">#define
IDERRszCostCenter_10 10L</font></p>


<font size="1" face="Arial Narrow">#define
IDERRmnChangeFrequency_11 11L</font></p>


<font size="1" face="Arial Narrow">#define
IDERRcPriceOverrideCode_12 12L</font></p>


<font size="1" face="Arial Narrow">#define
IDERRcNoticeToProceed_13 13L</font></p>


<font size="1" face="Arial Narrow">#define
IDERRmnMinServToCalculate_14 14L</font></p>


<font size="1" face="Arial Narrow">#define
IDERRszProgramId_15 15L</font></p>


<font size="1" face="Arial Narrow">#define
IDERRszVersion_16 16L</font></p>


<font size="1" face="Arial Narrow">#endif</font></p>


<font size="1" face="Arial Narrow">/*****************************************************************************</font></p>


<font size="1" face="Arial Narrow">* Source
Preprocessor Definitions</font></p>


<font size="1" face="Arial Narrow">****************************************************************************/</font></p>


<font size="1" face="Arial Narrow">#if defined
(JDEBFRTN)</font></p>


<font size="1" face="Arial Narrow">#undef JDEBFRTN</font></p>


<font size="1" face="Arial Narrow">#endif</font></p>


<font size="1" face="Arial Narrow">#if defined (WIN32)</font></p>


<font size="1" face="Arial Narrow">#if defined (WIN32)</font></p>


<font size="1" face="Arial Narrow">#define JDEBFRTN(r)
__declspec(dllexport) r</font></p>


<font size="1" face="Arial Narrow">#else</font></p>


<font size="1" face="Arial Narrow">#define JDEBFRTN(r)
__declspec(dllimport) r</font></p>


<font size="1" face="Arial Narrow">#endif</font></p>


<font size="1" face="Arial Narrow">#else</font></p>


<font size="1" face="Arial Narrow">#define JDEBFRTN(r)
r</font></p>


<font size="1" face="Arial Narrow">#endif</font></p>


<font size="1" face="Arial Narrow">/*****************************************************************************</font></p>


<font size="1" face="Arial Narrow">* Business Function
Prototypes</font></p>


<font size="1" face="Arial Narrow">****************************************************************************/</font></p>


<font size="1" face="Arial Narrow">JDEBFRTN (ID)
JDEBFWINAPI ITLSInterface (LPBHVRCOM lpBhvrCom,LPVOID
lpVoid,LPDSD4201140 lpDS);</font></p>


<font size="1" face="Arial Narrow">/*****************************************************************************</font></p>


<font size="1" face="Arial Narrow">* Internal Function
Prototypes</font></p>


<font size="1" face="Arial Narrow">****************************************************************************/</font></p>


<font size="1" face="Arial Narrow">void
rating_and_routing(char *);</font></p>


<font size="1" face="Arial Narrow">#endif /*
__B4201140_H */</font></p>
</td>
</tr>
</table>



<font size="4">B4201140.c Program</font></p>



<font size="4"> </font></p>

<table border="1" cellpadding="2" cellspacing="1" width="600">
<tr>
<td>

<font size="1" face="Arial Narrow">#include
<jde.h> </font></p>


<font size="1" face="Arial Narrow">#define b4201140_c</font></p>


<font size="1" face="Arial Narrow">/*****************************************************************************</font></p>


<font size="1" face="Arial Narrow">* Source File:
b4201140</font></p>


<font size="1" face="Arial Narrow">* Description: ITLS
Interface Source File</font></p>


<font size="1" face="Arial Narrow">* History: </font></p>


<font size="1" face="Arial Narrow">* Date Programmer
SAR# - Description</font></p>


<font size="1" face="Arial Narrow">* ----------
---------- -------------------------------------------</font></p>


<font size="1" face="Arial Narrow">* Author 06/04/1997
SB5491937 1632368 - Created </font></p>


<font size="1" face="Arial Narrow">*</font></p>


<font size="1" face="Arial Narrow">* Copyright (c)
J.D. Edwards World Source Company, 1996</font></p>


<font size="1" face="Arial Narrow">*</font></p>


<font size="1" face="Arial Narrow">* This unpublished
material is proprietary to J.D. Edwards World Source
Company.* All rights reserved. The methods and techniques
described herein are* considered trade secrets and/or
confidential. Reproduction or* distribution, in whole or
in part, is forbidden except by express* written
permission of J.D. Edwards World Source Company.</font></p>


<font size="1" face="Arial Narrow">****************************************************************************/</font></p>


<font size="1" face="Arial Narrow">/**************************************************************************</font></p>


<font size="1" face="Arial Narrow">* Notes:</font></p>


<font size="1" face="Arial Narrow">*</font></p>


<font size="1" face="Arial Narrow">**************************************************************************/</font></p>


<font size="1" face="Arial Narrow">#include
<b4201140.h></font></p>


<font size="1" face="Arial Narrow">/**************************************************************************</font></p>


<font size="1" face="Arial Narrow">* Business
Function: ITLSInterface</font></p>


<font size="1" face="Arial Narrow">* Description: ITLS
Interface</font></p>


<font size="1" face="Arial Narrow">* Parameters:</font></p>


<font size="1" face="Arial Narrow">* LPBHVRCOM
lpBhvrCom Business Function Communications</font></p>


<font size="1" face="Arial Narrow">* LPVOID lpVoid
Void Parameter - DO NOT USE!</font></p>


<font size="1" face="Arial Narrow">* LPDSD4201140 lpDS
Parameter Data Structure Pointer </font></p>


<font size="1" face="Arial Narrow">*</font></p>


<font size="1" face="Arial Narrow">*************************************************************************/</font></p>


<font size="1" face="Arial Narrow">#ifdef JDENV_AS400</font></p>


<font size="1" face="Arial Narrow">JDEBFRTN (ID)
JDEBFWINAPI ITLSInterface (LPBHVRCOM lpBhvrCom, LPVOID
lpVoid,LPDSD4201140 lpDS)</font></p>


<font size="1" face="Arial Narrow">{</font></p>


<font size="1" face="Arial Narrow">/************************************************************************</font></p>


<font size="1" face="Arial Narrow">* Variable
declarations</font></p>


<font size="1" face="Arial Narrow">************************************************************************/</font></p>


<font size="1" face="Arial Narrow">DS_ITLS dsITLS;</font></p>


<font size="1" face="Arial Narrow">DSD0000083
dsD0000083;</font></p>


<font size="1" face="Arial Narrow">/************************************************************************</font></p>


<font size="1" face="Arial Narrow">* Declare
structures</font></p>


<font size="1" face="Arial Narrow">************************************************************************/</font></p>


<font size="1" face="Arial Narrow">/************************************************************************</font></p>


<font size="1" face="Arial Narrow">* Declare pointers</font></p>


<font size="1" face="Arial Narrow">************************************************************************/</font></p>


<font size="1" face="Arial Narrow">/************************************************************************</font></p>


<font size="1" face="Arial Narrow">* Check for NULL
pointers</font></p>


<font size="1" face="Arial Narrow">************************************************************************/</font></p>


<font size="1" face="Arial Narrow">if ((lpBhvrCom ==
(LPBHVRCOM) NULL) ||</font></p>


<font size="1" face="Arial Narrow">(lpVoid == (LPVOID)
NULL) ||</font></p>


<font size="1" face="Arial Narrow">(lpDS ==
(LPDSD4201140) NULL))</font></p>


<font size="1" face="Arial Narrow">{</font></p>


<font size="1" face="Arial Narrow">jdeErrorSet
(lpBhvrCom, lpVoid, (ID) 0, "4363", (LPVOID)
NULL);</font></p>


<font size="1" face="Arial Narrow">return ER_ERROR;</font></p>


<font size="1" face="Arial Narrow">}</font></p>


<font size="1" face="Arial Narrow">/************************************************************************</font></p>


<font size="1" face="Arial Narrow">* Set pointers</font></p>


<font size="1" face="Arial Narrow">************************************************************************/</font></p>


<font size="1" face="Arial Narrow">/************************************************************************</font></p>


<font size="1" face="Arial Narrow">* Main Processing</font></p>


<font size="1" face="Arial Narrow">************************************************************************/</font></p>


<font size="1" face="Arial Narrow">/* clear the data
structure to blanks */</font></p>


<font size="1" face="Arial Narrow">memset ((void
*)(&dsITLS), ' ', sizeof(DS_ITLS));</font></p>


<font size="1" face="Arial Narrow">/************************************************************************
</font></p>


<font size="1" face="Arial Narrow">* ITLS needs both
the Document Number (DOCO) and the AddressNumberShipTo
(SHAN) both padded with zeroes to the left</font></p>


<font size="1" face="Arial Narrow">*</font></p>


<font size="1" face="Arial Narrow">* Format the Order
Number to be a string with zeros padding</font></p>


<font size="1" face="Arial Narrow">************************************************************************/</font></p>


<font size="1" face="Arial Narrow">memset ((void
*)(&dsD0000083), (int)('\0'), sizeof(DSD0000083));</font></p>


<font size="1" face="Arial Narrow">MathCopy
(&dsD0000083.mnMathNumeric,
&lpDS->mnDocumentOrderInvoiceE);</font></p>


<font size="1" face="Arial Narrow">dsD0000083.nSizeOfString
= 9; /* 8 chars */</font></p>


<font size="1" face="Arial Narrow">jdeCallObject("MathNumericToStringZeroPad",
NULL,lpBhvrCom, lpVoid,(LPVOID)&dsD0000083,
(CALLMAP*)NULL, (int)0, </font></p>


<font size="1" face="Arial Narrow">(char*)NULL,
(char*)NULL, (int)0);</font></p>


<font size="1" face="Arial Narrow">/* Assign the
parameters */ </font></p>


<font size="1" face="Arial Narrow">memcpy (
dsITLS.sz_doco, dsD0000083.szString,strlen(
dsD0000083.szString ) );</font></p>


<font size="1" face="Arial Narrow">/* SHAN */</font></p>


<font size="1" face="Arial Narrow">memset ((void
*)(&dsD0000083), (int)('\0'), sizeof(DSD0000083));</font></p>


<font size="1" face="Arial Narrow">MathCopy
(&dsD0000083.mnMathNumeric,
&lpDS->mnAddressNumberShipTo);</font></p>


<font size="1" face="Arial Narrow">dsD0000083.nSizeOfString
= 9; /* 8 chars */</font></p>


<font size="1" face="Arial Narrow">jdeCallObject("MathNumericToStringZeroPad",
NULL,lpBhvrCom, lpVoid,(LPVOID)&dsD0000083,
(CALLMAP*)NULL, (int)0, </font></p>


<font size="1" face="Arial Narrow">(char*)NULL,
(char*)NULL, (int)0);</font></p>


<font size="1" face="Arial Narrow">memcpy (
dsITLS.sz_shan, dsD0000083.szString,strlen(
dsD0000083.szString ) );</font></p>


<font size="1" face="Arial Narrow">memcpy (
dsITLS.sz_dcto,
lpDS->szOrderType,strlen(lpDS->szOrderType));</font></p>


<font size="1" face="Arial Narrow">memcpy (
dsITLS.sz_kcoo,lpDS->szCompanyKeyOrderNo,strlen(lpDS->szCompanyKeyOrderNo)
);</font></p>


<font size="1" face="Arial Narrow">dsITLS.c_act =
lpDS->szActionCodesNotAllowed[0];</font></p>


<font size="1" face="Arial Narrow">dsITLS.c_src =
lpDS->cEverestEventPoint01;</font></p>


<font size="1" face="Arial Narrow">/* assigning zeroes
to the decimal item of data structure */</font></p>


<font size="1" face="Arial Narrow">/*memcpy(
dsITLS.d_chg,&lpDS->mnChangeFrequency
,strlen(lpDS->mnChangeFrequency) ); */</font></p>


<font size="1" face="Arial Narrow">strcpy ((char
*)(dsITLS.sz_d_chg),(const char
*)("00000000000"));</font></p>


<font size="1" face="Arial Narrow">memcpy (
dsITLS.sz_mpid,
lpDS->szProgramId,strlen(lpDS->szProgramId) );</font></p>


<font size="1" face="Arial Narrow">memcpy (
dsITLS.sz_vers,
lpDS->szVersion,strlen(lpDS->szVersion) );</font></p>


<font size="1" face="Arial Narrow">system("ADDLIBLE
TSMSCONST");</font></p>


<font size="1" face="Arial Narrow">system("ADDLIBLE
SM34RL73#");</font></p>


<font size="1" face="Arial Narrow">system("ADDLIBLE
SM34DV73PC"); </font></p>


<font size="1" face="Arial Narrow">system("ADDLIBLE
SM34RL73O"); </font></p>


<font size="1" face="Arial Narrow">system("ADDLIBLE
SM34RL73D"); </font></p>


<font size="1" face="Arial Narrow">system("ADDLIBLE
SM34RL73L"); </font></p>


<font size="1" face="Arial Narrow">system("ADDLIBLE
JDFOBJ73");</font></p>


<font size="1" face="Arial Narrow">system("ADDLIBLE
JDFCTL73Q");</font></p>


<font size="1" face="Arial Narrow">system("ADDLIBLE
JDFDTA73Q");</font></p>


<font size="1" face="Arial Narrow">/* Call an RPG /400
program */</font></p>


<font size="1" face="Arial Narrow">rating_and_routing(
(char *) &dsITLS );</font></p>


<font size="1" face="Arial Narrow">/************************************************************************</font></p>


<font size="1" face="Arial Narrow">* Function Clean Up</font></p>


<font size="1" face="Arial Narrow">************************************************************************/</font></p>


<font size="1" face="Arial Narrow">return
(ER_SUCCESS);</font></p>


<font size="1" face="Arial Narrow">}</font></p>


<font size="1" face="Arial Narrow">#endif /*
JDENV_AS400 */</font></p>


<font size="1" face="Arial Narrow">/* Internal
function comment block */</font></p>


<font size="1" face="Arial Narrow">/**************************************************************************</font></p>


<font size="1" face="Arial Narrow">* Function:
Ixxxxxxx_a // Replace "xxxxxxx" with source
file number</font></p>


<font size="1" face="Arial Narrow">* // and
"a" with the function name</font></p>


<font size="1" face="Arial Narrow">* Notes:</font></p>


<font size="1" face="Arial Narrow">*</font></p>


<font size="1" face="Arial Narrow">* Returns:</font></p>


<font size="1" face="Arial Narrow">*</font></p>


<font size="1" face="Arial Narrow">* Parameters:</font></p>


<font size="1" face="Arial Narrow">**************************************************************************/</font></p>
</td>
</tr>
</table>











<SCRIPT>
var dlfb_needmoreinfo = "We're sorry, but we cannot process your feedback. We need more information.\n" +
"You must either select a value for how helpful the document was, or enter some comments.";
function dlfb_verify(f)
{ var rankchecked = false;
var commented = false;
var comments = f.COMMENTS.value;
if(comments != null)
{ var clen = comments.length;
if(clen > 500)
{ alert('Please limit Comments to 500 characters.\nYou current comment is ' + clen + ' characters long.');
return false
}
else if(comments.length > 0)
{ commented = true;
}
}
var ranking = f.RANKING;
for(var i=0;i<ranking.length;++i)
if((rankchecked = ranking.checked) == true)
break;
if(!commented && !rankchecked)
{ alert(dlfb_needmoreinfo);
return false;
}
return true;
}
</SCRIPT>
<CENTER>
<HR>
<FORM onSubmit='return dlfb_verify(this)' NAME=DOCLEVELFBFORM ACTION='/Forms/KGDocLevelFBProc.asp' METHOD=POST>
<INPUT TYPE=HIDDEN NAME=DOCUMENTID VALUE='ott-99-0063.htm'>
<TABLE>
<TR><TH><FONT FACE='Arial' SIZE='2'>Was this document helpful?</FONT></TH></TR>
<TR><TD ALIGN=CENTER><FONT FACE='Arial' SIZE='2'>
<INPUT TYPE=RADIO NAME=RANKING VALUE='3'> Very
<INPUT TYPE=RADIO NAME=RANKING VALUE='2'> Somewhat
<INPUT TYPE=RADIO NAME=RANKING VALUE='1'> Not at all </FONT></TD></TR>
<TR><TD ALIGN=CENTER><FONT FACE='Arial' SIZE='2'>Comments (500 chars or less)</FONT></TD></TR>
<TR><TH><TEXTAREA NAME=COMMENTS ROWS=3 COLS=40 WRAP='WRAP'></TEXTAREA></TH></TR>
<TR><TH><INPUT TYPE=SUBMIT VALUE='Submit Feedback' id=SUBMIT1 name=SUBMIT1></TH></TR>
</TABLE>
</FORM>
</CENTER>


</BODY>
</HTML>




------=_NextPart_000_f30_563_46b6--
 
Top