Hello to all, happy new year 2013!
May somebody could help me, is about a very similar problem to the problem I've posted here where the member rdrtx1 and bipinajith helped me a lot.
It is very similar, the difference is that instead to have the command MGISP:IMSIS=XXX; for many series, I have
MGISP:IMSIS=ALL; !NODE NAME! for each node. The structure of the blocks are the same.
I would like to transpose the data of each series in input file for each node, count the series for each node (in 1rst field), and
put the name of the node for each series (in 2nd field). The rest of parameters would go from field 3 to 18. Please see the input sample below:
The solution posted by rdrtx1 works perfect, but I don't know how to modify it in order to get these changes.
Note:
The parameters OWNMS, NATMS and STALL don't have a number related, so in the output could be written a "1", to show that
they appear in the input.
Thanks in advance for any help.
Regards.
This input is:
<MGISP:IMSIS=ALL;!MGCPTS 13!
MT IMSI NUMBER SERIES ANALYSIS DATA
OPERATING TABLE
IMSIS M NA ANRES
24569929 6-77182 4 OBA-200
BO-200
PLMN-0
MAPVER-2
INOPER-121
NRRG-0
CBA-58
CBAZ-58
33342 5-44531 4 OBA-60
BO-35
OWNMS
NATMS
ERIS-0
PLMN-0
STALL
MAPVER-2
INOPER-120
NRRG-0
CBA-15
CBAZ-15
CAMEL-3
40981 5-38889 4 OBA-200
BO-200
PLMN-0
MAPVER-2
NRRG-0
CBA-18
CBAZ-18
CAMEL-0
END
<MGISP:IMSIS=ALL; !MGCKLI 02!
MT IMSI NUMBER SERIES ANALYSIS DATA
OPERATING TABLE
IMSIS M NA ANRES
942111 6-33313 4 OBA-150
BO-49
PLMN-0
MAPVER-2
NRRG-0
CBA-22
CBAZ-22
CAMEL-3
942123 6-889134 4 OBA-150
BO-49
PLMN-0
MAPVER-2
NRRG-0
CBA-22
CBAZ-22
END
<MGISP:IMSIS=ALL;!MGCLS-03!
MT IMSI NUMBER SERIES ANALYSIS DATA
OPERATING TABLE
IMSIS M NA ANRES
2556798 5-44770 4 OBA-150
BO-49
PLMN-0
MAPVER-2
NRRG-0
CBA-67
CBAZ-67
CAMEL-2
END
and desired output is:
#,NODE,IMSIS,M,NA,OBA,BO,PLMN,MAPVER,NRRG,CBA,CBAZ,CAMEL,INOPER,OWNMS,NATMS,ERIS,STALL
1,MGCPTS 13,24569929,6-77182,4,200,200,0,2,0,58,58,,121,,,,
2,MGCPTS 13,33342,5-44531,4,60,35,0,2,0,15,15,3,120,1,1,0,1
3,MGCPTS 13,40981,5-38889,4,200,200,0,2,0,18,18,0,,,,,
1,MGCKLI 02,942111,6-33313,4,150,49,0,2,0,22,22,3,,,,,
2,MGCKLI 02,942123,6-889134,4,150,49,0,2,0,22,22,,,,,,
1,MGCLS-03,2556798,5-44770,4,150,49,0,2,0,67,67,2,,,,,