cancel
Showing results for 
Search instead for 
Did you mean: 

Include in job log the values of datastore configuration and substitution parameters

cgwaters
Participant
0 Kudos

For more detailed job logging, I would like to include the runtime values of my datastore configurations and substitution parameters. Is that metadata exposed and available for including in job logs?

View Entire Topic
Julian_Riegel
Product and Topic Expert
Product and Topic Expert

Hi,

there are several functions to retrieve various runtime parameters. Have a look at the reference guide:

DS Reference Guide 

You can browse the catalogue there. Specifically look at current_configuration(), current_system_configuration() or datastore_field_value().

Further descriptions of all available functions are also available here.

That might already be what you are looking for.

BR,

Julian

RichS
Participant
...and if it wasn't obvious, you can use a script and the print function to get the values in the job log. Also, substitution parameters can be referenced like variables in the script.
cgwaters
Participant
0 Kudos

Good to know that substitution parameters *can* be referenced in scripts.

cgwaters
Participant
0 Kudos

Good to know that substitution parameters *can* be referenced in scripts. But when I run a simple batch job that contains nothing more than a script that references a substitution parameter...

print('[$$UserDir]');

...where $$UserDir is set to "\\Server1\UserDir\" for the job's selected system configuration, the value of the substitution parameter is not displayed, and the following error occurs:

Syntax error at line <50> : <SET ("job_GV_$Condition1" = '\'N'', "job_GV_$G_ContainerCost" = '0.10000', ...

I've tried using variations of the substitution parameter (e.g., [$UserDir], [UserDir], $[UserDir], $$[UserDir], $[$$UserDir]). All such variations tend to simply generate a syntax error that lists the values of many (all?) the job's variables.

What am I missing?

Update: Looks like the problem is the use of backslashes. When I change $$UserDir from "\\Server1\UserDir\" to "//Server1/UserDir/" no error occurs and the value of the substitution parameter is displayed.