Retrieve the value of a system property in JavaScript
search cancel

Retrieve the value of a system property in JavaScript

book

Article ID: 217999

calendar_today

Updated On:

Products

CA Workload Automation DE CA Workload Automation DE - Scheduler (dSeries)

Issue/Introduction

Trying to return the value of a cli getproperty command to my application but don't know how to reference the output;

getproperty property("java.rmi.server.hostname")

Can you tell me how to reference the variable? 

 

Environment

Release : 12.x

Component : Workload Automation DE (dSeries)

Resolution

Use the getSystemProperty JavaScript function to retrieve the value of a system property like java.rmi.server.hostname, java.version, etc in a javascript.

For example;

1. Define an APPL variable in a javascript

APPL.hostname = getSystemProperty('java.rmi.server.hostname');

2. Use %APPL.hostname in other jobs in the application.

 

Additional Information