Removing "public" from tables in AcuXDBC when populating system catalog

0 Likes

This article describes how to modify AcuXDBC batch files to automate the process of removing public ownership of tables when populating the system catalog.

Problem:

Demo.bat and other supplies batch files automatically make the owner of the tables in the system catalog “public," yet many front-end applications require the owner to be blank. Which of the batch files need to be modified to make this correction, and what modification is necessary?

Resolution:

Add -o “” in the addfile.bat batch file to the xdbcutil commands:

@echo off
rem
rem Copyright (c) 2001-2006 Acucorp, inc.
rem
rem
======================================================================
rem = addfile.bat
rem =
rem = Usage:
rem = addfile [-d catalog_directory] [-x xfd_directory] [-u user] filename
rem = addfile [-d catalog_directory] [-x xfd_directory] [-u user] -f listfile
rem = -d specifies optional directory name to use for the
rem = System Catalog
rem = -x specifies optional directory name to use for the
rem = XFD files
rem = -u table owner
rem = -f listfile
rem = Import an xfd file or list of xfd files into the system catalog
rem =
rem =
rem =
rem
======================================================================
rem
rem

set SVXDBC_BIN=%XDBC_BIN%
set SVCAT=%XDBC_CAT%
set SVXFD=%XDBC_XFD%
set SVFILE=%XDBC_FILE%
set SVLIST=%XDBC_LIST%
set SVUSER=%XDBC_USER%

rem
======================================================================
rem =
rem = You can set your own directory for the AcuXDBC scripts and
rem = executables.
rem = For example:
rem = set XDBC_BIN=c:\user1\bin\
rem =
rem =
rem
======================================================================

set XDBC_BIN="%GENESIS_HOME%"\bin\


rem
======================================================================
rem =
rem = You can set your own default catalog directory
rem = here. For example:
rem = set XDBC_CAT=c:\mycat
rem =
rem =
rem
======================================================================

set XDBC_CAT="%GENESIS_HOME%"\syscat
:set XDBC_CAT=m:\syscat



rem
======================================================================
rem =
rem = You can set your own default XFD directory
rem = here. For example:
rem = set XDBC_XFD=c:\myxfd
rem =
rem =
rem
======================================================================


set XDBC_XFD=.\
:set XDBC_XFD=m:\xfd

set XDBC_FILE=
set XDBC_LIST=
set XDBC_USER=

if "%1" == "" goto show_usage


:loop
if "%1" == "" goto startup
if "%1" == "-d" goto set_catalog
if "%1" == "-D" goto set_catalog
if "%1" == "-x" goto set_xfd
if "%1" == "-X" goto set_xfd
if "%1" == "-f" goto set_list
if "%1" == "-F" goto set_list
if "%1" == "-u" goto set_user
if "%1" == "-U" goto set_user
if "%1" == "-h" goto show_usage
if "%1" == "-H" goto show_usage
if "%1" == "-help" goto show_usage
if "%1" == "-HELP" goto show_usage
if "%1" == "/?" goto show_usage
set XDBC_FILE=%1
goto startup


:set_catalog
shift
set XDBC_CAT=%1
shift
goto loop

:set_xfd
shift
set XDBC_XFD=%1
shift
goto loop

:set_user
shift
set XDBC_USER=-o %1
shift
goto loop

:set_list
shift
set XDBC_LIST=%1
shift
%XDBC_BIN%xdbcutil -z -o "" -d %XDBC_CAT% -x %XDBC_XFD% %XDBC_USER% -v -f %XDBC_LIST%
goto end

:startup
%XDBC_BIN%xdbcutil -z -o "" -d %XDBC_CAT% -x %XDBC_XFD% %XDBC_USER% -v -a %XDBC_FILE%
goto end

:show_usage
echo.
echo Usage:
echo addfile [-d catalog_directory] [-x xfd_directory] [-u user] filename
echo addfile [-d catalog_directory] [-x xfd_directory] [-u user] -f file_list
echo.
goto end

:end

set XDBC_BIN=%SVXDBC_BIN%
set XDBC_CAT=%SVCAT%
set XDBC_XFD=%SVXFD%
set XDBC_FILE=%SVFILE%
set XDBC_LIST=%SVLIST%
set XDBC_USER=%SVUSER%

@echo on

Incident Number: 2267922






Date:

Name:

Description of change:
Date:

Name:

Description of change:

Old KB# 14673
Comment List
Related
Recommended