Welcome Serena Central users! CLICK HERE
The migration of the Serena Central community is currently underway. Be sure to read THIS MESSAGE to get your new login set up to access your account.
Former Member Absent Member.
Absent Member.
370 views

[archive] Own produced function for language suppor

[Migrated content. Thread originally posted on 26 March 2004]

I am currently working on a issue related to extracting all text strings in the programs to a Vision file, so that the system can depending on a language code and a Text ID look up in this table and get the appropriate text string and return it to the program.

Syntax today
01 WS-VARIABLE Pic X(50).
Move "This is a test string"
To WS-VARIABLE

Syntax in the future (i hope)
01 WS-VARIABLE Pic X(50).
01 WS-LANG-CODE Pic X(3) Value "ENG".

* 1234 is the text id in the vision file of text
* string ""This is a test string"

Move (Call "GETTEXTSTRPROG" Using WS-LANG-CODE , 1234)
To WS-VARIABLE


This is how i hope it could work. The reason why i would like it like this i because I have over 3000 programs to do this in, and if i could program it like shown above, I could just write a conversion program for the source code and replace all strings with a number, and if i change the language code (dynamically), the "GETTEXTSTRPROG" should return the textstring on the selected language (if the translation has been done of the text id). The reason why i dont want to call the program like this:

Call "GETTEXTSTRPROG" Using WS-LANG-CODE , 1234 Giving WS-VARIABLE

-> gets more apparent in the next example

01 WS-VARIABLE Pic X(50).
01 WS-LANG-CODE Pic X(3) Value "ENG".

* 1234 is the text id in the vision file of text
* string ""This is a test string"
String
(Call "GETTEXTSTRPROG" Using WS-LANG-CODE , 1234)
(Call "GETTEXTSTRPROG" Using WS-LANG-CODE , 1235)
(Call "GETTEXTSTRPROG" Using WS-LANG-CODE , 1236)
(Call "GETTEXTSTRPROG" Using WS-LANG-CODE , 1237)
Delimited By X"00"
Into WS-VARIABLE
End-string


Can someone please help me, and say if this is at all possible from AcuCobol?
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.