-$params->{'action'} .= ';pkgpart='.$params->{'pkgpart'} if $params->{'pkgpart'};
-$params->{'action'} .= ';locationnum='.$params->{'locationnum'} if $params->{'locationnum'};
-$params->{'action'} .= ';svcpart='.$params->{'svcpart'} if $params->{'svcpart'};
+$params->{'action'} .= ";$_=".$params->{$_}
+ foreach grep $params->{$_},
+ qw( lock_pkgpart lock_locationnum qualnum svcpart );