rule "Primo VE Display - Subject 600" when MARC."600" has any "a-z" AND MARC."600".ind"2" equals "0" then set TEMP"1" to MARC."600" subfields "a-u" delimited by " " remove substring using regex "\\.+$" set TEMP"2" to MARC."600" sub without sorting "v-z" delimited by " -- " remove substring using regex (TEMP"2","\\.+$") concatenate with delimiter (TEMP"1",TEMP"2"," -- ") create pnx."display"."subject" with TEMP"1" end rule "Primo VE Display- Subject 610" when MARC."610" has any "a-z" AND MARC."610".ind"2" equals "0" then set TEMP"1" to MARC."610" subfields "a-u" delimited by " " remove substring using regex "\\.+$" set TEMP"2" to MARC."610" sub without sorting "v-z" delimited by " -- " remove substring using regex (TEMP"2","\\.+$") concatenate with delimiter (TEMP"1",TEMP"2"," -- ") create pnx."display"."subject" with TEMP"1" end rule "Primo VE Display- Subject 611" when MARC."611" has any "a-z" AND MARC."611".ind"2" equals "0" then set TEMP"1" to MARC."611" subfields "a-u" delimited by " " remove substring using regex "\\.+$" set TEMP"2" to MARC."611" sub without sorting "v-z" delimited by " -- " remove substring using regex (TEMP"2","\\.+$") concatenate with delimiter (TEMP"1",TEMP"2"," -- ") create pnx."display"."subject" with TEMP"1" end rule "Primo VE Display- Subject 630" when MARC."630" has any "a-z" AND MARC."630".ind"2" equals "0" then set TEMP"1" to MARC."630" subfields "a-u" delimited by " " remove substring using regex "\\.+$" set TEMP"2" to MARC."630" sub without sorting "v-z" delimited by " -- " remove substring using regex (TEMP"2","\\.+$") concatenate with delimiter (TEMP"1",TEMP"2"," -- ") kormarc remove nonfiling brackets MARC."630" sourcetag "630" from TEMP"1" create pnx."display"."subject" with TEMP"1" end rule "Primo VE Display- Subject 650 with Japanese Canada internment" when MARC."650" has any "a-z" AND MARC."650".ind"2" equals "0" AND MARC."650"."a" match "Japanese" AND MARC."650"."z" match "Canada" then set TEMP"1" to MARC."650" subfields "a-u" delimited by " " remove substring using regex "\\.+$" set TEMP"2" to MARC."650" sub without sorting "v-z" delimited by " -- " remove substring using regex (TEMP"2","\\.+$") concatenate with delimiter (TEMP"1",TEMP"2"," -- ") replace string by string (TEMP"1","internment","incarceration") create pnx."display"."subject" with TEMP"1" end rule "Primo VE Display- Subject 650 with internment" when MARC."650" has any "a-z" AND MARC."650".ind"2" equals "0" AND (MARC."650"."a" match "Japanese Americans" OR MARC."650"."a" match "Aleuts") then set TEMP"1" to MARC."650" subfields "a-u" delimited by " " remove substring using regex "\\.+$" set TEMP"2" to MARC."650" sub without sorting "v-z" delimited by " -- " remove substring using regex (TEMP"2","\\.+$") concatenate with delimiter (TEMP"1",TEMP"2"," -- ") replace string by string (TEMP"1","Illegal alien","Undocumented immigrant") replace string by string (TEMP"1","illegal alien","undocumented immigrant") replace string by string (TEMP"1","Aliens","Noncitizens") replace string by string (TEMP"1","Alien criminals","Noncitizen criminals") replace string by string (TEMP"1","Alien detention centers","Immigrant detention centers") replace string by string (TEMP"1","Church work with aliens","Church work with noncitizens") replace string by string (TEMP"1","internment","incarceration") create pnx."display"."subject" with TEMP"1" end rule "Primo VE Display- Subject 650 without internment" when MARC."650" has any "a-z" AND MARC."650".ind"2" equals "0" AND NOT (MARC."650"."a" match "Japanese Americans" OR MARC."650"."a" match "Aleuts") AND NOT (MARC."650"."a" match "Japanese" AND MARC."650"."z" match "Canada") then set TEMP"1" to MARC."650" subfields "a-u" delimited by " " remove substring using regex "\\.+$" set TEMP"2" to MARC."650" sub without sorting "v-z" delimited by " -- " remove substring using regex (TEMP"2","\\.+$") concatenate with delimiter (TEMP"1",TEMP"2"," -- ") replace string by string (TEMP"1","Illegal alien","Undocumented immigrant") replace string by string (TEMP"1","illegal alien","undocumented immigrant") replace string by string (TEMP"1","Aliens","Noncitizens") replace string by string (TEMP"1","Alien criminals","Noncitizen criminals") replace string by string (TEMP"1","Alien detention centers","Immigrant detention centers") replace string by string (TEMP"1","Church work with aliens","Church work with noncitizens") create pnx."display"."subject" with TEMP"1" end rule "Primo VE Display- Subject 650 with homoit" when MARC."650" has any "a-z,2" AND MARC."650"."2" match "homoit" then set TEMP"1" to MARC."650" subfields "a-u" delimited by " " remove substring using regex "[//.+$]\\.+$" set TEMP"2" to MARC."650" sub without sorting "v-z" delimited by " -- " remove substring using regex (TEMP"2","[//.+$]\\.+$") concatenate with delimiter (TEMP"1",TEMP"2"," -- ") create pnx."display"."subject" with TEMP"1" end rule "Primo VE Display- Subject 650 with gsso" when MARC."650" has any "a-z,2" AND MARC."650"."2" match "gsso" then set TEMP"1" to MARC."650" subfields "a-u" delimited by " " remove substring using regex "[//.+$]\\.+$" set TEMP"2" to MARC."650" sub without sorting "v-z" delimited by " -- " remove substring using regex (TEMP"2","[//.+$]\\.+$") concatenate with delimiter (TEMP"1",TEMP"2"," -- ") create pnx."display"."subject" with TEMP"1" end rule "Primo VE Display- Subject 651" when MARC."651" has any "a-z" AND MARC."651".ind"2" equals "0" then set TEMP"1" to MARC."651" subfields "a-u" delimited by " " remove substring using regex "\\.+$" set TEMP"2" to MARC."651" sub without sorting "v-z" delimited by " -- " remove substring using regex (TEMP"2","\\.+$") concatenate with delimiter (TEMP"1",TEMP"2"," -- ") create pnx."display"."subject" with TEMP"1" end rule "Primo VE Display- Subject 690" when MARC is "690"."a" then create pnx."display"."subject" with MARC "690"."a" end rule "Primo VE Display- Subject 880-600" when MARC."880" has any "a-z" AND MARC."880".ind"2" equals "0" AND MARC."880"."6" match "600-.*" then set TEMP"1" to MARC."880" subfields "a-u,w" delimited by " " remove substring using regex "\\.+$" set TEMP"2" to MARC."880" sub without sorting "v-z" delimited by " -- " remove substring using regex (TEMP"2","\\.+$") concatenate with delimiter (TEMP"1",TEMP"2"," -- ") create pnx."display"."subject" with TEMP"1" end rule "Primo VE Display- Subject 880-610" when MARC."880" has any "a-z" AND MARC."880".ind"2" equals "0" AND MARC."880"."6" match "610-.*" then set TEMP"1" to MARC."880" subfields "a-u,w" delimited by " " remove substring using regex "\\.+$" set TEMP"2" to MARC."880" sub without sorting "v-z" delimited by " -- " remove substring using regex (TEMP"2","\\.+$") concatenate with delimiter (TEMP"1",TEMP"2"," -- ") create pnx."display"."subject" with TEMP"1" end rule "Primo VE Display- Subject 880-611" when MARC."880" has any "a-z" AND MARC."880".ind"2" equals "0" AND MARC."880"."6" match "611-.*" then set TEMP"1" to MARC."880" subfields "a-u,w" delimited by " " remove substring using regex "\\.+$" set TEMP"2" to MARC."880" sub without sorting "v-z" delimited by " -- " remove substring using regex (TEMP"2","\\.+$") concatenate with delimiter (TEMP"1",TEMP"2"," -- ") create pnx."display"."subject" with TEMP"1" end rule "Primo VE Display- Subject 880-630" when MARC."880" has any "a-z" AND MARC."880".ind"2" equals "0" AND MARC."880"."6" match "630-.*" then set TEMP"1" to MARC."880" subfields "a-u,w" delimited by " " remove substring using regex "\\.+$" set TEMP"2" to MARC."880" sub without sorting "v-z" delimited by " -- " remove substring using regex (TEMP"2","\\.+$") concatenate with delimiter (TEMP"1",TEMP"2"," -- ") create pnx."display"."subject" with TEMP"1" end rule "Primo VE Display- Subject 880-650" when MARC."880" has any "a-z" AND MARC."880".ind"2" equals "0" AND MARC."880"."6" match "650-.*" then set TEMP"1" to MARC."880" subfields "a-u,w" delimited by " " remove substring using regex "\\.+$" set TEMP"2" to MARC."880" sub without sorting "v-z" delimited by " -- " remove substring using regex (TEMP"2","\\.+$") concatenate with delimiter (TEMP"1",TEMP"2"," -- ") create pnx."display"."subject" with TEMP"1" end rule "Primo VE Display- Subject 880-651" when MARC."880" has any "a-z" AND MARC."880".ind"2" equals "0" AND MARC."880"."6" match "651-.*" then set TEMP"1" to MARC."880" subfields "a-u,w" delimited by " " remove substring using regex "\\.+$" set TEMP"2" to MARC."880" sub without sorting "v-z" delimited by " -- " remove substring using regex (TEMP"2","\\.+$") concatenate with delimiter (TEMP"1",TEMP"2"," -- ") create pnx."display"."subject" with TEMP"1" end