Past Perfect Continuous Tense:
S + had + been + V + ing
It is used for an action that began inthe past and continued up to that time.
e.g: At that time he had been writing a novelfor two months.