DE (dSeries): How to retrieve the value of a system property in Javascript
search cancel

DE (dSeries): How to 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

I'm trying to return the value of a cli getproperty command to my app but I 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

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

Steps:

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

See getSystemProperty JavaScript function