|
|
MIMLOAD - Data Load and Unload
MIMLOAD enable you to use the LOAD and UNLOAD commands at your operating system's command prompt.
Syntax
You control MIMLOAD using flagged information specified on the command-line.
The overall syntax for MIMLOAD (expressed in short form UNIX-style) is:
mimload [-u user] [-p password] [-e program -i password] "statement" [database]Note: If you are using double quotes in the LOAD/UNLOAD statement, they must be escaped using the back-slash character \ when UNIX-style switches are used. For VMS-style switches, a double quote " is used as escape character.
If you start MIMLOAD command without specifying options, it displays help on the command-line arguments.
Command-line Arguments
You can use the following arguments with MIMLOAD.
Exit Codes
The following error codes are used:
UNIX/Windows
OpenVMS
Usage
0 (success) 1 (success) This code is used when MIMLOAD has executed successfully. > 1 (error) 2 (error) This error code is used when MIMLOAD failed to execute successfully.Examples
Loading Data
The following example loads the file store.sql into the default database.
UNIX/Windows-style
mimload --username=user1 --password=UsrPwd "load from 'store.sql' log stderr"VMS-style
MIMLOAD /USERNAME=USER1 /PASSWORD="UsrPwd" "LOAD FROM 'STORE.SQL' LOG STDERR"Unloading Data
'The following example unloads all the definitions and data owned by the user store_adm from the database store to the file store.sql.
UNIX/Windows-style
mimload -u store_adm -p StrPwd "unload to 'store.sql' from current user" storeVMS-style
MIMLOAD /USERNAME=STORE_ADM /PASSWORD="StrPwd" "UNLOAD TO 'STORE.SQL' FROM CURRENT USER" STOREUsing STDIN/STDOUT/STDERR
STDIN, STDOUT and STDERR are short names for the standard input, standard output and standard error streams, respectively.
Windows/UNIX-style Examples
In the commands below, STDIN is denoted by '<' (this is short for '0<', equal to reading from file descriptor number 0 which is the standard input). STOUT is denoted by '>' (this is short for '1>', equal to writing to file descriptor number 1 which is the standard output) and STDERR is denoted by '2>' (equal to writing to file descriptor number 2 which is the standard error).
In the following example, the generated output from UNLOAD is written to standard output, which in this case is redirected to the file store_db.unl. The log information is written to standard error, which is redirected to the file store_db.log.
mimload -u store_adm -p StrPwd "unload to stdout log stderr from databank store_db" store > store_db.unl 2> store_db.logIn the following example, input to LOAD is taken from standard input, i.e. from the file store_db.unl, and log information is written to standard error, in this case to the file store_db_load.log.
mimload -u store_adm -p StrPwd "load from stdin log stderr" store < store_db.unl 2> store_db_load.logVMS-style Examples
In the OpenVMS environment, you can use STDIN, STDOUT and STDERR in two ways, either by defining SYS$INPUT, SYS$OUTPUT and SYS$ERROR or by using pipe mode which gives the UNIX behavior for use of file redirection. Both methods are shown below.
In the following example, the generated output from UNLOAD is written to standard output, which in this case is redirected to the file D1:<DATA>STORE_DB.UNL. The log information is written to standard error, which is redirected to the file D1:<LOG>STORE_DB.LOG.
Example using SYS$OUTPUT and SYS$ERROR:
DEFINE/USER SYS$ERROR D1:<LOG>STORE_DB.LOG DEFINE/USER SYS$OUTPUT D1:<DATA>STORE_DB.UNL MIMLOAD /USERNAME=STORE_ADM /PASSWORD="StrPwd" "UNLOAD TO STDOUT LOG STDERR FROM DATABANK STORE_DB" STORE
PIPE MIMLOAD /USERNAME=STORE_ADM /PASSWORD="StrPwd" "UNLOAD TO STDOUT LOG STDERR FROM DATABANK STORE_DB" STORE > D1:<DATA>STORE_DB.UNL 2> D1:<LOG>STORE_DB.LOGIn the following example, input to LOAD is taken from standard input, i.e. from the file D1:<DATA>STORE_DB.UNL, and log information is written to standard error, in this case to the file D1:<LOG>STORE_DB_LOAD.LOG.
Example using SYS$OUTPUT and SYS$ERROR:
DEFINE/USER SYS$ERROR D1:<LOG>STORE_DB_LOAD.LOG DEFINE/USER SYS$INPUT D1:<DATA>STORE_DB.UNL MIMLOAD /USERNAME=STORE_ADM /PASSWORD="StrPwd" "LOAD FROM STDIN LOG STDERR" STOREPIPE MIMLOAD /USERNAME=STORE_ADM /PASSWORD="StrPwd" "LOAD FROM STDIN LOG STDERR" STORE < D1:<DATA>STORE_DB.UNL 2> D1:<LOG>STORE_DB_LOAD.LOG
|
Mimer Information Technology AB Voice: +46 18 780 92 00 Fax: +46 18 780 92 40 info@mimer.se |
|
|