Index: trunk/ippToPsps/jython/batch.py
===================================================================
--- trunk/ippToPsps/jython/batch.py	(revision 31934)
+++ trunk/ippToPsps/jython/batch.py	(revision 31935)
@@ -128,4 +128,19 @@
 
     '''
+    Looks for a dictionary entry. If it is not there, then replaces it with the supplied default
+    if, and only if, in test mode
+    '''
+    def safeDictionaryAccessWithDefault(self, header, key, default):
+
+         value = self.safeDictionaryAccess(header, key)
+
+         if value != "NULL": return value
+         else:
+             if not self.testMode: return "NULL"
+             header[key] = default
+             self.logger.infoPair("Hardcoding " + key + " to", header[key])
+             return header[key]
+
+    '''
     Returns the string value from this dictionary or else "NULL"
     '''
@@ -133,5 +148,7 @@
 
          if key in header: return header[key]
-         else: return "NULL"
+         else:
+             self.logger.errorPair("Missing header field", key)
+             return "NULL"
 
     '''
