It's all about the answers!

Ask a question

Using build properties in language definition's properties


Udo Guenthner (112) | asked Apr 15 '16, 4:16 a.m.
Hello,

I have the need to implement the following:
Properties in build definition: build.cat.a = "A", build.cat.b = "B"
Property in language definition A: lang.cat = ${build.cat.a}

Property in language definition B: lang.cat = ${build.cat.b}

Translator (used in language A and B) issues TSO command with ${lang.cat) as parameter.

Looks like the build property reference in the language definition does not get resolved. I end up with the text "${build.cat.a}" rather than the value "A" (for language A).

I know that I can use build properties directly in the translator, but I need to make it dependent on the language.

Is there a way to implement that scenario?

Thanks.




2 answers



permanent link
Fons Maathuis (215) | answered Sep 11 '18, 7:14 a.m.
You can do that. In the language definitions you need to define a property lang.cat with a value. Both LD's call the same translator, where you chose ISPF/TSO, chose TSO and insert ${lang.cat} as the command/member. Be sure you have the dataset attached in which the member resides otherwise your job will dump.

Comments
Udo Guenthner commented Sep 11 '18, 11:39 a.m.
Yes, I know that. But I don't want to specify hard-coded values in the language definitions. I want to use the indirection of a property set in the build definition.
The reason is that one set of languages use the one value (A) and another set of languages uses another value (B).
This values might change from release to release.

By having the values in properties defined in the build definition I could make updates there and leave the languages and translators untouched.


permanent link
Fons Maathuis (215) | answered Sep 12 '18, 3:58 a.m.

 That is also possible, we're using a property in the build definition to allocate a DD resource. Property dd_cobol_in is set in the build definition to appl - COBB. In the translator we use ${dd_cobol_in} as a DD respource. During execution this variable gets substituted by the datasetname definen in appl - COBB.


Comments
Udo Guenthner commented Sep 12 '18, 4:10 a.m.
Yep, understood. But I want to use the value of the property from the build definition (1) to set another property in the language (2), which I then use in the translator (3).
The problem is (2). I know that I can  (and I already do) use (1) in (3) ....

Your answer


Register or to post your answer.