Für das übersetzen der SAPLogon.ini gibt es ein sehr nettes kleines Pearl Script:
#!/usr/bin/perl
open(INPUT,"saplogon.ini") or die "saplogon.ini not found in current directory !\n";
@inifile=<INPUT>;
close(INPUT);
# Lets find all router strings
$rout=0;
foreach $line (@inifile)
{
if (($rout == 1) && ($line =~ m/Item\d*\=/))
{
@sline=split('=',$line);
$index=substr(@sline[0],4,4);
$rstring[$index]=$sline[1];
}
else
{$rout = 0}
if(substr($line,0,8) eq '[Router]')
{
$rout=1;
}
}
# Now we should do the same with servers
$serv = 0;
foreach $line (@inifile)
{
if (($serv == 1) && ($line =~ m/Item\d*\=/))
{
@sline=split('=',$line);
$index=substr(@sline[0],4,4);
$sstring[$index]=$sline[1];
}
else
{$serv = 0}
if(substr($line,0,8) eq '[Server]')
{
$serv=1;
}
}
# Do not forget system numbers...
$snum = 0;
foreach $line (@inifile)
{
if (($snum == 1) && ($line =~ m/Item\d*\=/))
{
@sline=split('=',$line);
$index=substr(@sline[0],4,4);
$nstring[$index]=$sline[1];
}
else
{$snum = 0}
if(substr($line,0,10) eq '[Database]')
{
$snum=1;
}
}
# Last, but not least - description
$desc = 0;
foreach $line (@inifile)
{
if (($desc == 1) && ($line =~ m/Item\d*\=/))
{
@sline=split('=',$line);
$index=substr(@sline[0],4,4);
$dstring[$index]=@sline[1];
}
else
{$desc = 0}
if(substr($line,0,13) eq '[Description]')
{
$desc=1;
}
}
# Now write all
$index=1;
while ($index <= $#sstring)
{
$cstring= $dstring[$index].":conn=".$rstring[$index]."/H/".$sstring[$index]."/S/32".$nstring[$index];
$cstring =~ s/[\n]|[\r]//g;
print $cstring."\n";
$index++;
}
näheres zu diesem Script hier: https://forums.sdn.sap.com/thread.jspa?messageID=6125763
Vieleicht auch noch was für den Wiki-Eintrag!