Previous Topic Next topic Print topic


MFExtractSchemaInfo command

Executes the HCOSS Extract Schema tool from the command line.

Syntax:

MFExtractSchemaInfo [DB2={DB2Connection | SQLServerConnection;]
                    [ACTION={DELETE | EXTRACT | EXPORT | IMPORT | LIST};]
                    [U=DB2UserID;] 
                    [P=DB2Password;]
                    [{NAME | OUT}=SchemaExtractFileName;]
                    [{OUTLocal={TRUE | FALSE}} |
                        LOCATION={LOCAL | SHARED}};]
                    [{SCHEMA={* | DB2Schema1[, DB2Schema2 ...]} | 
                       TBS={DB2Tablespace1[, DB2Tablespace2 ...]}}];
                    [PATH=DirectoryPath;]
                    [ROWCOUNT={ESTIMATE | EXACT};]
                    [CATALOG=DB2SchemaName;]
                    [TYPELOG={CONSOLE | FILE | BOTH};]

Parameters:

DB2
The name of a cataloged DB2 connection or, when using the Offline Extract Schema Solution, the name of a cataloged SQL Server connection. Required when ACTION=EXTRACT, which is the default setting.
ACTION
Specifies the action to perform:
DELETE Deletes the schema extract file.
EXTRACT Extract the schema(s) specified by the SCHEMA parameter. Default.
EXPORT Copy the generated schema extract file to the directory specified by the PATH parameter, enabling you to use it to import the schema into the tool when the mainframe is not available.
IMPORT Import a previously exported schema extract file, located in the directory specified by the PATH parameter.
LIST Outputs a list to the console, showing the schema extract files located in the directory specified by the OUTLocal parameter setting.
The following matrix shows the additional required and optional parameters for each ACTION value:
ACTION
Parameter DELETE EXTRACT EXPORT IMPORT LIST
DB2 N/A Required N/A N/A N/A
U N/A Optional N/A N/A N/A
P N/A Optional N/A N/A N/A
NAME | OUT Required Required Required Required N/A
OUTLocal Optional Optional Optional Optional Optional
LOCATION Optional Optional Optional Optional Optional
SCHEMA | TBS N/A Required N/A N/A N/A
PATH N/A N/A Required Required N/A
ROWCOUNT N/A Optional N/A N/A N/A
CATALOG N/A Optional N/A N/A N/A
TYPELOG Optional Optional Optional Optional Optional
U
The user ID required to access the DB2 database specified by the DB parameter, if applicable.
P
The password required for the user ID specified by the U parameter, if applicable.
NAME | OUT
The name of the generated schema extract file for ACTION=DELETE, EXTRACT, IMPORT or EXPORT. Do not specify a file extension. The default file extension is .hcodbs.
OUTLocal
Determines the location of the generated schema extract file. Schema extract files are stored in the \Schemas subdirectory of either of the following, depending on the value specified:
TRUE Directory specified by the Local HCOSS Directory HCOSS option. Default.
FALSE Directory specified by the Shared HCOSS Directory HCOSS option.
LOCATION
Sets the output directory for the schema extract file to:
LOCAL Directory specified by the Local HCOSS Directory HCOSS option. Default.
SHARED Directory specified by the Shared HCOSS Directory HCOSS option.
SCHEMA
The name of one or more valid DB2 schemas to extract. An asterisk (*) extracts all schemas in the catalog. Separate schema names with a comma (,).
TBS
The name of one or more valid DB2 tablespaces to extract. Separate tablespace names with a comma (,).
PATH
Specifies the directory to be used for IMPORT and EXPORT of schema extracts.
ROWCOUNT
Specifies the type of table row count information recorded:
ESTIMATE Records the estimated table row count based on the schema statistics stored in SYSIBM.SYSTABLES. Use this option to improve performance. Default.
EXACT Records both the estimated table row count and the actual row count as retrieved using a SELECT BIG-COUNT(*) query. Use this option to provide accuracy.
CATALOG
The name of the DB2 catalog schema. Defaults to SYSIBM.
TYPELOG
Sets the type of logging to perform. Defaults to the equivalent of the value specified for the Type of logging to do HCOSS option.

Example:

MFExtractSchemaInfo DB2=MVS91; OUT=LocalSchemaExtract; SCHEMA=MFIREX,SDI002; TYPELOG=FILE
MFExtractSchemaInfo DB2=MVS91; OUT=SharedSchemaExtract; OUTLocal=FALSE; SCHEMA=MFIREX%,SDI002
Previous Topic Next topic Print topic