Regarding how the question and the OPs questions in general could be improved - here's what a complete, minimal code sample would look like in a question such as this one:
$ cat tst.awk
$2 == "FAML" { display = 1 ; next }
$2 == "END" { display = 0 ; next }
display { print }
function luciferin(mstr) {
nlines = split(mstr, astr, "\n")
for (i = 1; i <= nlines; i++) {
print "Luci:", astr[i]
}
}
Luci: ## FAML [ASMB] KEYWORD
Luci: ## Some information.
Luci: ## Some other text.
Luci: ## FAML [ASMB] KEYWORD
Luci: ## Some other information.
Luci: ## Even more text.
$ cat tst.awk
$2 == "FAML" { display = 1 ; next }
$2 == "END" { luciferin(rec); rec = ""; display = 0 ; next }
display { rec = rec $0 ORS }
function luciferin(mstr) {
nlines = split(mstr, astr, "\n")
for (i = 1; i < nlines; i++) {
print "Luci:", astr[i]
}
}
$ awk -f tst.awk input
Luci: ## FAML [ASMB] KEYWORD
Luci: ## Some information.
Luci: ## Some other text.
Luci: ## FAML [ASMB] KEYWORD
Luci: ## Some other information.
Luci: ## Even more text.
which you can then take away and apply the concepts from it to your real code.