Kbase P4888: How to determine which language of PROMSGS is used?
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  25/09/2002 |
|
Solution ID: P4888
GOAL:
How to determine which language of PROMSGS is used?
FACT(s) (Environment):
UNIX
Progress 9.x
Progress 8.x
FIX:
The following UNIX code compares the size of $DLC/promsgs and promsgs.* under $DLC/prolang directory to display a match. This shell script can be easily called from a 4GL procedure (see below). It can also be extended to display "English", "Czech", "German", etc., based on the value .XXX (ie/usr/dlc9/prolang/cze/promsgs.CZE) returned in PMsg string.
# UNIX script - which_promsgs.sh
DFSIZE=`cat ${DLC}/promsgs | wc -c`
for i in `find ${DLC}/prolang/ -name "promsgs.*"`
do
TMPSIZE=`cat ${i} | wc -c`
if test $DFSIZE -eq $TMPSIZE
then
echo ${i}
fi
done
# END
/* 4GL code */
DEF VAR PMsg AS CHAR NO-UNDO.
INPUT THROUGH ("which_promsgs.sh") NO-ECHO.
IMPORT UNFORMATTED PMsg.
INPUT CLOSE.
MESSAGE PMsg.
This example assumes that $DLC/promsgs is used by default.