TIP: Click on subject to list as thread! ANSI
echo: os2prog
to: Peter Hansen
from: John Cocula
date: 1994-06-19 12:47:00
subject: Querying country info

PH> Could somebody please give me a little hint on querying the
PH> country information that can be specified under System
PH> Setup|Country|Date?  And if this is not the usual place to look, why
PH> is it there?  
PH> 
PH> I assumed OS/2 would store this kind of information in only one
PH> place.  When I found the DosQueryCtryInfo() function I figured the
PH> information it returned was an image of the Country info accessible
PH> via the WPS.  Unfortunately, DosQueryCtrlInfo() returns a date
PH> format of "mm-dd-yy" which is not what I have programmed
PH> ("yy/mm/dd").  It does, however, match what the DIR command uses for
PH> its dates.
PH> 
PH> Assuming the answer is something like "you can't get those
PH> settings" my question becomes: how can I change from the default
PH> date setting of "mm-dd-yy"?  Is this something to do with
PH> COUNTRY.SYS?  I have a funny feeling SOM is involved here
PH> somewhere...    Thanks for any help!

Sadly, there is very little integration between what PM does with
country information, and what the base OS does.  At the recent PSP
Technical Interchange, MicroBurst, Inc. gave a session on NLS issues. 
All they ever referred to was the information obtained from COUNTRY.SYS
via the Dos APIs.  However, many PM programs instead use what is stored
in the OS2 .INI files for date/time delimiters, currency symbols, etc. 
Use PrfQueryProfileInt/String to get these values:

 "PM_National" "iLzero" "0"
 "PM_National" "s1159" "AM"
 "PM_National" "s2359" "PM"
 "PM_National" "iMeasurement" "1"
 "PM_National" "iCountry" "1"
 "PM_National" "iDate" "0"
 "PM_National" "iCurrency" "0"
 "PM_National" "iDigits" "2"
 "PM_National" "iTime" "0"
 "PM_National" "sCurrency" "$"
 "PM_National" "sThousand" ","
 "PM_National" "sDecimal" "."
 "PM_National" "sDate" "-"
 "PM_National" "sTime" ":"
 "PM_National" "sList" ","

John                                                          
--- Maximus/2 2.01wb

* Origin: OS/2 Shareware BBS, Fairfax, VA: 703-385-4325 (1:109/347)
SEEN-BY: 54/54 620/243 632/348 640/820 690/660 711/409 413 430 807 808 809
SEEN-BY: 711/934 712/353 623 713/888 800/1 2442/0
@PATH: 109/347 2 1 3615/50 229/2 2442/0 711/409 54/54 711/808 809 934

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.