|
|
MIMLOAD - Data Load and Unload
MIMLOADenable you to use theLOADandUNLOADcommands at your operating system's command prompt.Syntax
You control
MIMLOADusing 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.
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 whenMIMLOADhas executed successfully.> 1 (error)2 (error) This error code is used whenMIMLOADfailed to execute successfully.Examples
Loading Data
The following example loads the file
store.sqlinto 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_admfrom the databasestoreto the filestore.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,STDOUTandSTDERRare short names for the standard input, standard output and standard error streams, respectively.Windows/UNIX-style Examples
In the commands below,
STDINis denoted by '<' (this is short for '0<', equal to reading from file descriptor number0which is the standard input).STOUTis denoted by '>' (this is short for '1>', equal to writing to file descriptor number1which is the standard output) andSTDERRis denoted by '2>' (equal to writing to file descriptor number2which is the standard error).In the following example, the generated output from
UNLOADis written to standard output, which in this case is redirected to the filestore_db.unl. The log information is written to standard error, which is redirected to the filestore_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
LOADis taken from standard input, i.e. from the filestore_db.unl, and log information is written to standard error, in this case to the filestore_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,STDOUTandSTDERRin two ways, either by definingSYS$INPUT,SYS$OUTPUTandSYS$ERRORor 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
UNLOADis written to standard output, which in this case is redirected to the fileD1:<DATA>STORE_DB.UNL. The log information is written to standard error, which is redirected to the fileD1:<LOG>STORE_DB.LOG.Example using
SYS$OUTPUTandSYS$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
LOADis taken from standard input, i.e. from the fileD1:<DATA>STORE_DB.UNL, and log information is written to standard error, in this case to the fileD1:<LOG>STORE_DB_LOAD.LOG.Example using
SYS$OUTPUTandSYS$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 |
|
|