if ( $RESULT eq "" ) {
print DEBUG1 "Line is \"" . $line ."\"\n";
my $action = substr($ACTION, 0, 1);
open OUT4, ">>", $csvtogo or die "Could not open OUT4: $!\n";
if ( $line =~ /parameters\ after\ change/ ) {
#Start of block to manage
$inblock = 1;
next;
}
# Skip handling line unless we are in a block
next unless ( $inblock );
if ( $line =~ /NRG\ location/) {
print OUT4 "$timestamp;$action;";
# Block ends here
# Process all blocked lines stored in @blocklines
my ($k, $v);
my @fields;
my %lookup = map { $_ => 1 } @csvfieldlist;
foreach my $bline (@blocklines) {
print DEBUG1 "bline: \"$bline\"\n";
my ($k, $v) = split '=', $bline;
push @fields, $k;
}
print DEBUG Dumper (\@fields);
for my $element ( @fields ) {
if (exists $lookup{$element}) {
print OUT4 "yes;";
} else {
print OUT4 ";";
}
}
print OUT4 "\n"
#Cleanup block now that it has been processed
@blocklines = ();
$inblock = 0;
next;
}
# Just a line we want to process within the block
# Push it into @blocklines so we can process it
push @blocklines, $line;
next;
}
####
2018_11_20-11_15_58;C;;yes;;;;
2018_11_20-11_15_58;C;yes;yes;yes;yes;yes;yes;yes;yes;yes;yes;yes;yes;yes;yes;yes;yes;yes;yes;;;;;yes;yes;yes;yes;yes;yes;yes;;;;;;;;;;;
2018_11_20-11_15_58;C;;;
2018_11_20-11_15_58;C;yes;yes;yes;yes;;
2018_11_20-11_15_58;C;yes;yes;
2018_11_20-11_15_58;C;yes;yes;
2018_11_20-11_15_58;C;yes;yes;
2018_11_20-11_15_58;C;yes;;;;
2018_11_20-11_15_58;C;yes;;;;;
2018_11_20-11_15_58;C;yes;
2018_11_20-11_15_58;C;yes;yes;yes;;
2018_11_20-11_44_51;C;;yes;;;;
2018_11_20-11_44_51;C;yes;yes;yes;yes;yes;yes;yes;yes;yes;yes;yes;yes;yes;yes;yes;yes;yes;yes;;;;;yes;yes;yes;yes;yes;yes;yes;;;;;;;;;;;
####
$VAR1 = [
'algorithmPosition',
'authenticationSubscriberType',
'k4id',
'OP_id',
'authKey'
];
$VAR1 = [
'mobileNetworkCodeId',
'mobileCountryCodeId',
'chargingGatewayFuncHost',
'chargingGroup',
'S6aRoamingRestrictionType',
'pcscfServerName',
'maxRequestedBandwidthUL',
'maxRequestedBandwidthDL',
'epsAccessSubscriptionType',
'epsAccessSubscriptionType',
'odbSpecificToPs',
'psRoamingRestrictionType',
'chargingCharacteristics',
'odbCustoPremRateCalls',
'odbOutgoingCalls',
'accessRestrictionData',
'networkAccessMode',
'mSubIdentificationNumberId',
'GcsServiceProfile',
'OdbServiceProfile',
'MainSNwithBearerService',
'MainSNwithBearerService',
'cwTSSpeechActivationFlag',
'callWaitingProvisionedFlag',
'clipProvisionedFlag',
'mptyProvisionedFlag',
'callHoldProvisionedFlag',
'clirProvisionedFlag',
'csRoamingRestrictionType',
'eps3gppRestrictionListNum',
'psRestrictionListNum',
'csRestrictionListNum',
'packetMsAddressList',
'packetMsAddressList',
'framedPoolSetList',
'framedPoolSetList',
'epsApnContextSetList',
'epsApnContextSetList',
'epsServiceProfile'
];
$VAR1 = [
'serverCapIdx',
'chargingIdx'
];
$VAR1 = [
'authEntryType',
'hlrIndicator',
'protocolCap',
'authSchema',
'imsi'
];
$VAR1 = [
'puidType',
'unregSvcInd'
];
$VAR1 = [
'puidType',
'unregSvcInd'
];
$VAR1 = [
'puidType',
'unregSvcInd'
];