Automate JD Edwards Integration Tasks from PowerShell

Jerod Johnson
Jerod Johnson
Director, Technology Evangelism
Are you in search of a quick and easy way to access JD Edwards data from PowerShell? This article demonstrates how to utilize the JD Edwards Cmdlets for tasks like connecting to JD Edwards data, automating operations, downloading data, and more.

The CData ADO.NET Provider for JD Edwards is a standard ADO.NET Provider that make it easy to accomplish data cleansing, normalization, backup, and other integration tasks by enabling real-time access to JD Edwards.

ADO.NET Provider

The ADO.NET Provider provides a SQL interface for JD Edwards; this tutorial shows how to use the Provider to retrieve JD Edwards data.

Once you have acquired the necessary connection properties, accessing JD Edwards data in PowerShell can be enabled in three steps.

The driver connects to JD Edwards through your Application Interface Services (AIS) Server. Set the following connection properties:

  • URL: The base HTTPS URL of your AIS Server (e.g., https://jde-ais.example.com:8300).
  • User: Your JD Edwards username.
  • Password: Your JD Edwards password.
  • Environment (optional): The JD Edwards environment to use (e.g., PD920 for production or DV920 for development). If not specified, the AIS Server's default environment is used.
  • Role (optional): The JD Edwards role for the session. If not specified, the AIS Server's default role is used.
  • DeviceName (optional): An identifier for the connecting device or application, used for auditing and logging on the AIS Server.
  • Jasserver (optional): The specific Java Application Server (JAS) instance to route requests through, useful in clustered environments.

Choosing Which Data Is Exposed

JD Edwards organizes tables and business views by System Code, and the driver exposes each System Code as its own schema. Use these properties to control which schemas are available:

  • DataModel: One or more ERP modules (comma-separated) whose System Codes are exposed as schemas, or All to expose every System Code in the connected instance. Defaults to FinancialManagement.
  • SystemCodes: A comma-separated list of additional System Codes to expose alongside those from DataModel (e.g., 42,43).

When you connect, the driver sends your credentials to the AIS Server to obtain a session token and caches it. The driver requests a new token automatically before the session expires.

  1. Load the provider's assembly:

    [Reflection.Assembly]::LoadFile("C:\Program Files\CData\CData ADO.NET Provider for JD Edwards\lib\System.Data.CData.JDEdwards.dll")
  2. Connect to JD Edwards:

    $conn= New-Object System.Data.CData.JDEdwards.JDEdwardsConnection("URL=https://your-jde-environment-app.example.com;User=admin;Password=myPassword;")
    $conn.Open()
  3. Instantiate the JDEdwardsDataAdapter, execute an SQL query, and output the results:

    $sql="SELECT DocumentNumber, Amount from AccountsPayable.AccountLedger"
    
    $da= New-Object System.Data.CData.JDEdwards.JDEdwardsDataAdapter($sql, $conn)
    $dt= New-Object System.Data.DataTable
    $da.Fill($dt)
    
    $dt.Rows | foreach {
        Write-Host $_.documentnumber $_.amount
    }

Ready to get started?

Download a free trial of the JD Edwards Data Provider to get started:

 Download Now

Learn more:

JD Edwards Icon JD Edwards ADO.NET Provider

Rapidly create and deploy powerful .NET applications that integrate with JD Edwards data including AccountLedger, ProposalofPayment, ContractRevenueSummary, EmployeeEnrollment, RentIncreaseAmounts, and more!