=== modified file 'rules/schema/import.xml'
--- rules/schema/import.xml	2022-04-06 17:39:09 +0000
+++ rules/schema/import.xml	2022-11-25 17:43:53 +0000
@@ -97,6 +97,7 @@
 **     OM  20210602          Improved error reporting.
 **     OM  20220325          The hardcode [data]/[namespace] is gone. Using [p2j.cfg.xml] now to locate
 **                           database import settings. Dropped dead code.
+**    IAS  20221125          Make location of LOB files configurable for import
 -->
 
 <!--
@@ -188,6 +189,7 @@
    
    <!-- global variables -->
    <variable name="dataPath"        type="java.lang.String" />
+   <variable name="lobPath"         type="java.lang.String" />
    <variable name="dataFile"        type="java.io.File" />
    <variable name="checkTypes"      init="false" />
    <variable name="maxThreads"      init="8" />
@@ -264,6 +266,18 @@
          <action>dataPath = sprintf("data/dump/%s/", dbName)</action>
       </rule>
       
+   	  <rule>!dataPath.endsWith("/")
+     	 <action>dataPath = dataPath.concat("/")</action>
+      </rule>
+      
+   	  <rule>lobPath == null
+   		 <action>lobPath = "lobs"</action>
+   	  </rule>
+
+      <rule>!imp.isAbsolute(lobPath)
+         <action>lobPath = sprintf("%s%s/", dataPath, lobPath)</action>
+      </rule>
+
       <rule>printfln("INFO:  Data export files will be read from '%s'", dataPath)</rule>
       <rule>!io.exists(dataPath, false)
          <action>
@@ -300,7 +314,7 @@
       
       <post-rules>
          <!-- all mappings have been added; initialize the import worker -->
-         <rule>imp.initialize(ormProps, dataPath)</rule>
+         <rule>imp.initialize(ormProps, dataPath, lobPath)</rule>
       </post-rules>
    </rule-set>
    

=== modified file 'src/com/goldencode/p2j/schema/ImportWorker.java'
--- src/com/goldencode/p2j/schema/ImportWorker.java	2022-10-13 23:52:08 +0000
+++ src/com/goldencode/p2j/schema/ImportWorker.java	2022-11-25 17:45:11 +0000
@@ -167,6 +167,7 @@
 **     OM  20221007          Wasted a value in ID_GEN_SEQUENCE's initialization because some dialects have
 **                           issues when requesting the CurVal if positioned at start.
 **     OM  20221013          Insert a file-path separator in sequence dump file path if one is needed.
+**    IAS  20221125          Make location of LOB files configurable for import
 */
 
 /*
@@ -228,6 +229,7 @@
 import java.io.*;
 import java.nio.*;
 import java.nio.charset.*;
+import java.nio.file.*;
 import java.sql.*;
 import java.sql.Statement;
 import java.util.*;
@@ -323,6 +325,9 @@
    /** Directory path containing export files for the database being imported */
    static String dataPath = null;
    
+   /** Directory path containing export LOB data for the database being imported */
+   static String lobPath = null;
+
    /** The database we import into. */
    static Database database = null;
    
@@ -680,9 +685,11 @@
        *          Path of directory containing data export files, and parent directory of LOB
        *          export directory, if any.
        */
-      public void initialize(Properties props, String dataPath)
+      public void initialize(Properties props, String dataPath, String lobPath)
       {
          ImportWorker.dataPath = dataPath;
+         ImportWorker.lobPath = lobPath;
+         
          String databaseName = props.getProperty(Settings.DATABASE_NAME);
          ImportWorker.database = new Database(databaseName, Database.Type.PRIMARY, true);
          
@@ -714,6 +721,16 @@
          startTime = System.currentTimeMillis();
       }
       
+      /** Check is file path is absolute.
+       * 
+       * @param path
+       *        file path to be checked
+       * @return <code>true</code> is file path is absolute. 
+       */
+      public boolean isAbsolute(String path)
+      {
+         return Paths.get(path).isAbsolute();
+      }
       /**
        * Open a new database session.
        *

=== modified file 'src/com/goldencode/p2j/schema/PropertyMapper.java'
--- src/com/goldencode/p2j/schema/PropertyMapper.java	2022-05-20 06:21:12 +0000
+++ src/com/goldencode/p2j/schema/PropertyMapper.java	2022-11-25 17:43:40 +0000
@@ -49,6 +49,7 @@
 **     OM  20210602          Public field member name change.
 **     OM  20210619          Removed references to ImportWorker static field.
 **     CA  20220520          Fixed dataPath when is not ending with file separator.
+**    IAS  20221125          Make location of LOB files configurable for import/
 */
 
 /*
@@ -135,8 +136,8 @@
 public final class PropertyMapper
 implements SchemaParserTokenTypes
 {
-   /** Short name of directory containing LOB data, if any; child of data dump directory */
-   private static final String lobDir = "lobs" + File.separatorChar;
+//   /** Short name of directory containing LOB data, if any; child of data dump directory */
+//   private static final String lobDir = "lobs" + File.separatorChar;
    
    /** The metadata for this property. */
    private final PropertyMeta propertyMeta;
@@ -399,12 +400,12 @@
     */
    private static byte[] readLobData(String locator)
    {
-      String path = ImportWorker.dataPath;
+      String path = ImportWorker.lobPath;
       if (!path.endsWith(File.separator))
       {
          path = path + File.separator;
       }
-      path = path + lobDir + locator;
+      path = path + locator;
       File file = new File(path);
       if (!file.exists())
       {

