Highlighted
Absent Member.
Absent Member.
864 views

Creating Tables with Relativity

Jump to solution

I'm using relativity to create temporary workfiles via ODBC -- 

Does anybody know how to create the file in a different directory than the install directory for relativity -- hopefully this is possible to do from within the query -- because I'd like different temp tables to be placed in different directories to help organize them

For example -- the following query works

CREATE TABLE tester
(
col1 CHAR(10),
col2 CHAR(100),
col3 CHAR(50),
col4 CHAR(1),
col5 decimal (10, 7)
);

but I was hoping that something like this would work somehow

CREATE TABLE tester @FILENAME=/tmp/tester.tmp.data
(
col1 CHAR(10),
col2 CHAR(100),
col3 CHAR(50),
col4 CHAR(1),
col5 decimal (10, 7)
);

creates a file /opt/microfocus/relativity/data-server/tester.tbl

I was hoping to have this file be located elsewhere --

/tmp/tester.tmp.data

I have figured out how to use the following commands to move the path of the file -- however it still ends up leaving an empty file tester.tbl sitting in the install directory.

{call DBA_ListFileConns()};

{call DBA_ModifyPathName('CCKJ ', '/tmp/tester.tmp.data', '')};

{call RDB_CreateFile('tester')};

 

 

Tags (1)
0 Likes
1 Solution

Accepted Solutions
Micro Focus Expert
Micro Focus Expert

Sorry, Relativity is NOT a general purpose database.

Its purpose is to access data in COBOL data files from an ODBC application.  So, don't expect it to be able to do fancy things like create tables in arbitrary places.  The main reason that it creates tables at all is because it was easier to create test cases.

On the bright side, it does NOT create the file's table in the installation directory.  It creates them in the same directory as the catalog.  So, if you want to create files in the /tmp directory, simply place the catalog there.

Michael Schultz
Software System Developer - Senior Principal

View solution in original post

0 Likes
1 Reply
Micro Focus Expert
Micro Focus Expert

Sorry, Relativity is NOT a general purpose database.

Its purpose is to access data in COBOL data files from an ODBC application.  So, don't expect it to be able to do fancy things like create tables in arbitrary places.  The main reason that it creates tables at all is because it was easier to create test cases.

On the bright side, it does NOT create the file's table in the installation directory.  It creates them in the same directory as the catalog.  So, if you want to create files in the /tmp directory, simply place the catalog there.

Michael Schultz
Software System Developer - Senior Principal

View solution in original post

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.