Code:
awk 'BEGIN {print "Symmetrix ID,DEV,Storage Group Name,Port Group Name,Initiator Group Name,Masking View Name,Port,WWN"
T="SymmetrixID: _ StorageGroupName PortGroupName InitiatorGroupName MaskingViewName"
nt=split (T, X)}
{val=$1$2$3}
T ~ val {ID[val] = $NF; next}
$1 ~ /^WWN/ {WWN=WWN DELIM $NF; DELIM="_"; next}
val ~ /SymDev/ {getline; getline; getline
while ($1 !~ /-/) {L=($0~/^ /); ID[X[2]]=L?ID[X[2]]:$1;
for (i=1; i<=nt; i++) printf "%s,", ID[X[i]]
print (L?$1:$2) "," WWN
getline
}
WWN=DELIM=""
}
' file
Symmetrix ID,DEV,Storage Group Name,Port Group Name,Initiator Group Name,Masking View Name,Port,WWN
000192601507,0149,10000000c960b9cd_13E_1,10000000c960b9cd_13E_1,10000000c960b9cd,TS00P22_13E_1,13E:1,10000000c960b9cd_10000000c960b9dd
000192601507,0149,10000000c960b9cd_13E_1,10000000c960b9cd_13E_1,10000000c960b9cd,TS00P22_13E_1,06E:1,10000000c960b9cd_10000000c960b9dd
000192601507,014A,10000000c960b9cd_13E_1,10000000c960b9cd_13E_1,10000000c960b9cd,TS00P22_13E_1,13E:1,10000000c960b9cd_10000000c960b9dd
000192601507,014A,10000000c960b9cd_13E_1,10000000c960b9cd_13E_1,10000000c960b9cd,TS00P22_13E_1,06E:1,10000000c960b9cd_10000000c960b9dd
000192601507,014B,10000000c960b9cd_13E_1,10000000c960b9cd_13E_1,10000000c960b9cd,TS00P22_13E_1,13E:1,10000000c960b9cd_10000000c960b9dd
000192601507,014B,10000000c960b9cd_13E_1,10000000c960b9cd_13E_1,10000000c960b9cd,TS00P22_13E_1,06E:1,10000000c960b9cd_10000000c960b9dd
000192601507,014C,10000000c960b9cd_13E_1,10000000c960b9cd_13E_1,10000000c960b9cd,TS00P22_13E_1,13E:1,10000000c960b9cd_10000000c960b9dd
000192601507,014C,10000000c960b9cd_13E_1,10000000c960b9cd_13E_1,10000000c960b9cd,TS00P22_13E_1,06E:1,10000000c960b9cd_10000000c960b9dd
000192601507,0149,10000000c960bc81_4E_1,10000000c960bc81_4E_1,10000000c960bc81,:TS00P22_4E_1,04E:1,10000000c960bc81
000192601507,014A,10000000c960bc81_4E_1,10000000c960bc81_4E_1,10000000c960bc81,:TS00P22_4E_1,04E:1,10000000c960bc81
000192601507,014B,10000000c960bc81_4E_1,10000000c960bc81_4E_1,10000000c960bc81,:TS00P22_4E_1,04E:1,10000000c960bc81
000192601507,014C,10000000c960bc81_4E_1,10000000c960bc81_4E_1,10000000c960bc81,:TS00P22_4E_1,04E:1,10000000c960bc81