ESP dSeries Workload Automation

 View Only

 Populate Application JavaScript Variable from Text File at Runtime

Jump to  Best Answer
Scott Felch's profile image
Scott Felch posted Jul 08, 2026 07:31 AM

Good morning Broadcom community,

I'm working on an ESP dSeries 12.4 application and am looking for recommendations on the best way to populate an application JavaScript variable from a text file at runtime.

Currently, I have an application-level JavaScript variable: APPL.EmailTo

which is hard-coded with a semicolon-delimited list of email recipients. A downstream Linux job references this variable when sending email notifications with attachments.

My goal is to allow end users to maintain the recipient list without requiring a dSeries application update. I'd like to:

  1. Store the recipient list in a text file on a Windows server.
  2. Have one email address per line, for example:
    user1@company.com
    user2@company.com
    user3@company.com
  3. During application execution, read the file and convert it to: "user1@company.com;user2@company.com;user3@company.com"
  4. Store the result in: APPL.EmailTo
    for use by downstream jobs.

Has anyone implemented something similar in dSeries?

Specifically, I'm interested in:

  • Reading file contents into a JavaScript variable at runtime
  • Passing file contents from a Windows job into an application-level variable
  • Using global variables, job output variables, or another dSeries-native approach

Any examples or recommended patterns would be greatly appreciated.

    Thanks,

    Scott

    Ravi Kiran Kunduri's profile image
    Broadcom Employee Ravi Kiran Kunduri  Best Answer

    Hi,

    Yes , dSeries has in-built file operation javascript functions that you can refer and there is a function file_readLines - https://techdocs.broadcom.com/us/en/ca-enterprise-software/intelligent-automation/ca-workload-automation-de/25-0/scheduling/using-javascript/built-in-functions/file-level-javascript-functions.html#concept.dita_1522a463a5b7b2485699f9ca54d618940d89511e_filereadLines

    Please make sure the file is in the dSeries server machine.

    Hope it helps!

    Ravi Kiran

    Scott Felch's profile image
    Scott Felch

    Thank you Ravi, that looks like it will do what I am trying to accomplish. Thank you for your assistance in this matter.