Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Falling back to the standard locale ("C") ? 2

Status
Not open for further replies.

gatetec

MIS
Mar 22, 2007
420
US
I have these codes working fine in AIX 5.2,

#!/usr/bin/perl
open (PASSWD,"/etc/passwd") or die "Cannot open /etc/passwd: $!\n";
while (<PASSWD>) {
($user,undef,$uid,undef,$name,undef)=split ":";
if ($uid > 203 and $uid < 1000) {
if ($name eq "") { $name = "Unknown"; }
$last = `lsuser -a time_last_login $user`;
if ($last !~ /time_last_login/) {
$date="Unknown";
$otime="";
$time=0;
} else {
(undef,$time)=split("=",$last);
($seconds,$minutes,$hours,$day,$month,$year,undef) = localtime($time);
$month += 1;
$year += 1900;
$date="$month/$day/$year";
$otime="$hours:$minutes:$seconds";
}
write;
}
}

format =
@<<<<<<<<<< @<<<<<<< @>>> @<<<<<<<<<<<<<<<<<<<<<<<<< @<<<<<<<<<< @<<<<<<<<
$time, $user, $uid,$name, $date, $otime
.

but, if I run these in AIX 5.3, I am getting the messages below and inaccurate results.

perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LC_ALL = (unset),
LC__FASTMSG = "true",
LANG = "en_US"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
Attribute "time_last_login" is not valid.
Attribute "time_last_login" is not valid.
Attribute "time_last_login" is not valid.
Attribute "time_last_login" is not valid.
Attribute "time_last_login" is not valid.
Attribute "time_last_login" is not valid.
Attribute "time_last_login" is not valid.
Attribute "time_last_login" is not valid.
Attribute "time_last_login" is not valid.
Attribute "time_last_login" is not valid.
Attribute "time_last_login" is not valid.
Attribute "time_last_login" is not valid.


I have the settings as shown below:

# env LANG
en_US

# env LC__FASTMSG
true
# env LC_ALL
LC_ALL: No such file or directory

I am not sure what I am missing.
Pls advise.

thx much
 
chomp ($last = `lsuser -a time_last_login $user`);
 
I modified it, but am getting the same error still.

perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LC_ALL = (unset),
LC__FASTMSG = "true",
LANG = "en_US"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").


Any ideas, please?

thx much
 
Did you copy the old perl over from AIX 5.2? Now that you have upgraded to AIX 5.3, maybe you need a new perl executable?

Steve

[small]"Every program can be reduced by one instruction, and every program has at least one bug. Therefore, any program can be reduced to one instruction which doesn't work." (Object::perlDesignPatterns)[/small]
 
Yes, it was copied.
I found that the language for en_US wasn't installed for locale. After the en_US install, the warning massage is gone.

perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LC_ALL = (unset),
LC__FASTMSG = "true",
LANG = "en_US"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").

Now, I am getting:

3004-697 Attribute "time_last_login" is not valid.
3004-697 Attribute "time_last_login" is not valid.
3004-697 Attribute "time_last_login" is not valid.
3004-697 Attribute "time_last_login" is not valid.
3004-697 Attribute "time_last_login" is not valid.
3004-697 Attribute "time_last_login" is not valid.
3004-697 Attribute "time_last_login" is not valid.
3004-697 Attribute "time_last_login" is not valid.
3004-697 Attribute "time_last_login" is not valid.
3004-697 Attribute "time_last_login" is not valid.
3004-697 Attribute "time_last_login" is not valid.
3004-697 Attribute "time_last_login" is not valid.

This error is similar to the ones I had, but it has "3004-697" in front of it.

any ideas?

thx
 
I figured ** 3004-697 Attribute "time_last_login" is not valid. ** is something to do with AIX OS.

thx so much
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top