47 # OUTPUT returns true/false that the specified db2 configuration file could be processed appropriately for the given action. 48 my $log_pre = whatsub(); 49 my ($action,$hashref,@type_order) = @_ or (warn "$log_pre Invalid arguments" and return 0); 50 51 # Iterate over the configuration types listed in @type_order 52 foreach my $type (@type_order) { 53 print "$log_pre running $action for $type entries\n"; 54 # Iterate over all items of that type 55 use Data::Dumper; 56 print Dumper($hashref); 57 my $type_hash = $hashref->{$type}; #shortcut to smaller hash 58 foreach my $item (keys %{$type_hash}) { 59 print "$log_pre running $action for $type $item\n"; 60 my $item_hash = $type_hash->{$item}; #shortcut to smaller hash 61 #Add values for type and action into the hash 62 $item_hash->{'name'} = $item; 63 $item_hash->{'type'} = $type; 64 $item_hash->{'action'} = $action; 65 print Dumper($hashref); 66 #execute action for the individual configuration 67 unless (db2_mgmt_cat(\%{$item_hash})) { 68 #unless (db2_mgmt_cat(\%{$type_hash})) { 69 # Return false if the action could not be completed successfully.