Guest_imported
New member
- Jan 1, 1970
- 0
I know pretty much nothing about Perl so i'd be grateful if someone could explain to me how i would a) search a file and look for all records within that file with a ( "teleservice code" = "22" )
where the ("totalcalleventduration"
not equal to 0
and b) print the record name e.g. CDR2
Check out the example of a record below...
Thanks in advance for any help at all......
-- CDR 2
( MoBasicCallInformation
( SimChargeableSubscriber
( Imsi 0x"234305683001762f"
)
( Destination
( TypeOfNumber 0x"01"
-- 1
( NumberingPlan 0x"01"
-- 1
( AddressStringDigits 0x"447958879879"
( ModificationIndicator 0x"01"
-- 1
)
( CallEventStartTimeStamp
( LocalTimeStamp "20020418224849"
-- 0x"323030323034313832323438343
9"
( UtcTimeOffsetCode "A"
-- 0x"41", 65
)
( TotalCallEventDuration 0x"00"
-- 0
)
( LocationInformation
( NetworkLocation
( RecEntityCode 0x"06"
-- 6
( LocationArea 0x"0a96"
-- 2710
( CellId 0x"07"
-- 7
)
)
( EquipmentInformation
( MobileStationClassMark 0x"04"
-- 4
( Imei 0x"3501879055650800"
)
( BasicServiceUsedList
( BasicServiceUsed
( BasicService
( TeleServiceCode "22"
-- 0x"3232", 12850
)
( ChargeInformationList
( ChargeInformation
( ChargedItem "E"
-- 0x"45", 69
( ExchangeRateCode "A"
-- 0x"41", 65
( CallTypeGroup
( CallTypeLevel1 0x"02"
-- 2
( CallTypeLevel2 0x"00"
-- 0
( CallTypeLevel3 0x"00"
-- 0
( CalledCountryCode "44"
-- 0x"3434", 13364
)
( ChargeDetailList
( ChargeDetail
( ChargeType "00"
-- 0x"3030", 12336
( Charge "W"
-- 0x"57", 87
( DayCategory "I"
-- 0x"49", 73
( TimeBand "I"
-- 0x"49", 73
)
)
)
)
)
)
where the ("totalcalleventduration"
and b) print the record name e.g. CDR2
Check out the example of a record below...
Thanks in advance for any help at all......
-- CDR 2
( MoBasicCallInformation
( SimChargeableSubscriber
( Imsi 0x"234305683001762f"
)
( Destination
( TypeOfNumber 0x"01"
( NumberingPlan 0x"01"
( AddressStringDigits 0x"447958879879"
( ModificationIndicator 0x"01"
)
( CallEventStartTimeStamp
( LocalTimeStamp "20020418224849"
9"
( UtcTimeOffsetCode "A"
)
( TotalCallEventDuration 0x"00"
)
( LocationInformation
( NetworkLocation
( RecEntityCode 0x"06"
( LocationArea 0x"0a96"
( CellId 0x"07"
)
)
( EquipmentInformation
( MobileStationClassMark 0x"04"
( Imei 0x"3501879055650800"
)
( BasicServiceUsedList
( BasicServiceUsed
( BasicService
( TeleServiceCode "22"
)
( ChargeInformationList
( ChargeInformation
( ChargedItem "E"
( ExchangeRateCode "A"
( CallTypeGroup
( CallTypeLevel1 0x"02"
( CallTypeLevel2 0x"00"
( CallTypeLevel3 0x"00"
( CalledCountryCode "44"
)
( ChargeDetailList
( ChargeDetail
( ChargeType "00"
( Charge "W"
( DayCategory "I"
( TimeBand "I"
)
)
)
)
)
)