I have used \DeclareSourcemap in biblatex for three things, cf. Ordering references with bracketed years in biblatex 2.7, Abbreviate resolved abbreviations in authors' first names in biblatex, and Change US postal codes (CA) to AP stylebook abbreviations (Calif.) in bibliography (biblatex).
As pointed out by moewe in a comment (https://tex.stackexchange.com/a/142665/9077), however, \DeclareSourcemap cannot be used more than once. I have tried to combine the three things I've used \DeclareSourcemap for into one command, as seen in the MWE below. The result, however, is that no. 1 does not work in combination with either no. 2 or 3. No. 2 and 3 work fine together, though. In the output below, where all three are used together, only no. 1 has any effect.
What do I need to do in order to take advantage of all three?
\documentclass{article}
\usepackage[style=authoryear]{biblatex}
\DeclareSourcemap{\maps[datatype = bibtex]{\map{
%% 1. Find year in brackets and sort them as if they were without brackets
\step[fieldsource = year,
match = \regexp{\A\[(.+)\]\z}, final]
\step[fieldset = sortyear, fieldvalue = {$1}]
%% 2. Abbreviate an entry such as Adam J[ohn] Smith to Smith, Adam J.
\step[fieldsource = author,
match = \regexp{\[[^]]+\]},
replace = .]
%% 3. Change US postal codes such as 'MA' to 'StateMA'
\step[fieldsource = location,
match = \regexp{,\s*(MA|CA|NY)},
replace = \regexp{,~\\State\{$1\}}]
}}}
% then change 'StateMA' etc. to AP style abbreviations 'Mass.' etc.
\def\State#1{\csname State#1\endcsname}
\def\StateMA{Mass.}
\def\StateCA{Calif.}
\def\StateNY{N.Y.}
\begin{filecontents}{\jobname.bib}
@ARTICLE{western1889,
AUTHOR = "Aug[ust] Western",
TITLE = "Kurze darstellung des norwegischen lautsystems",
JOURNALTITLE = "Phonetische Studien",
YEAR = "1889",
PAGES = "259--282",
VOLUME = "2"}
@BOOK{lehiste1970,
AUTHOR = "Ilse Lehiste",
TITLE = "Suprasegmentals",
YEAR = "1970",
LOCATION = "Cambridge, MA",
PUBLISHER = "The M.I.T. Press"}
@BOOK{hoff1946,
AUTHOR = "Ingeborg Hoff",
TITLE = "Skjetvem{\aa}let",
YEAR = "1946",
LOCATION = "Oslo",
NUMBER = "1",
PUBLISHER = "Jacob Dybwad",
SERIES = "Skrifter utgitt av Det Norske Videnskaps-Akademi i Oslo. II. Historisk-filosofisk klasse. 1946"}
@INCOLLECTION{hoff1968,
AUTHOR = "Ingeborg Hoff",
BOOKTITLE = "Aurskog og Blaker",
EDITOR = "[Eyvind Lillevold]",
TITLE = "M{\aa}let i Aurskog og Blaker",
YEAR = "[1968]",
LOCATION = "[Aurskog og Blaker]",
PAGES = "685--752",
PUBLISHER = "Bygdeboknemnda for Aurskog og Blaker",
VOLUME = "3"}
\end{filecontents}
\addbibresource{\jobname.bib}
\begin{document}
\nocite{*}
\printbibliography
\end{document}


finaldoesn't seem to be needed at all. Any idea why it was there in the first place? – Sverre Nov 07 '13 at 18:53finalwas there because the PLK re-used some other sourcemap he had written before. While in this instance the final is not needed (I think), simply because if no match is found the replacement text will be empty andsortyearwill be set to empty and discarded, it is in general not a bad idea to have afinalin a place like this. Consider the case in which the second\stepis not\step[fieldset = sortyear, fieldvalue = {$1}], but\step[fieldset = sortyear, fieldvalue = {Hi, Sverre}]and compare the output with and withoutfinal. – moewe Nov 07 '13 at 19:11finalare taken to heart. It turned out that removingfinaltriggered a lot of warnings aboutsortyearbeing empty. – Sverre Nov 07 '13 at 19:42