Examples (Running Archive and Restore Processes From Command Line)

The following examples show command line usage for Archive and Restore Processes.

Run a Single Process from the Command Line

The following examples show how to run a single process from the command line.

To run a process directly from the command line, enter:

PR0CMND /R TYPE=type REQUEST=identifier.name
  • To run an Archive Request named MARKET.YTD and display results, use:
    PR0CMND /R PST=PSTDEMO TYPE=ARCHIVE REQUEST=MARKET.YTD
  • To run an Archive Request named SALES.MONTHLY and add the results to an existing output file named PLAN.TXT, use:
    PR0CMND /R TYPE=ARCHIVE REQUEST=SALES.MONTHLY OUTPUT=PLAN.TXT+
  • To run a Restore Request named MARKET.REFRESH, display prompts and error dialogs during the process, and write results to an output file named RESULTS.TXT, use:
    PR0CMND /R TYPE=RESTORE REQUEST=MARKET.REFRESH OUTPUT=RESULTS.TXT QUIET‑

Run One or More Processes as a Scheduled Job from the Command Line

The following examples show how to run one or more processes as a scheduled job from the command line.

You can create scheduled jobs using the Scheduling Editor. Refer to the Common Elements Manual for details.

To run a scheduled job directly from the command line, use:

PR0CMND /R JOB=‘jobname'
  • To run a job named CUSTDATA and write the results to an output file named CUSTOUT.TXT, specify:
    PR0CMND /R JOB=‘CUSTDATA' OUTPUT=C:\CUSTOUT.TXT
  • To run the same job and display prompts and error dialogs during the process, specify:
    PR0CMND /R JOB=‘CUSTDATA' OUTPUT=C:\CUSTOUT.TXT QUIET-
  • To run a job named PAYROLL and display information dialogs during the process, specify:
    PR0CMND /R JOB=‘PAYROLL' OUTPUT=PAY.TXT MONITOR+

Run One or More Processes Using a Parameter File

The following examples show how to run one or more processes using a parameter file.

To run one or more processes from a file, use:

PR0CMND /R @filename

For example, to run processes in a parameter file named STATS.TXT, enter:

PR0CMND /R @C:\STATS.TXT

Parameter File Format

In this example, STATS.TXT includes the following:

TYPE=ARCHIVE REQUEST=MONTHLY.SALES STOP=WARNING 
TYPE=ARCHIVE REQUEST=MONTHLY.QUOTAS
TYPE=ARCHIVE REQUEST=SALES.YTD STOP=FATAL

Run a Process Using an Override File

The following examples show how to run a process using an override file.

To run an Archive Request named SALES.CUST from the command line, and apply overrides from a file named CHANGES.TXT, enter:

PR0CMND /R TYPE=ARCHIVE REQUEST=SALES.CUST OV=CHANGES.TXT

In this example, CHANGES.TXT includes the following:

DEFQUAL ORACLE1.TELEM
STARTTAB CUSTOMERS
ROWLIMIT 600
SQL CUSTOMERS ST='NJ' AND ZIP='08540'

Run a Process Using a Parameter File with Overrides

The following examples show how to run a process using a parameter file with overrides.

Archive Parameter File Example A

To run an Archive Request named SALES.CUST using a parameter file named LEADS.TXT that supplies command-line and override keywords, enter:

PR0CMND /R @C:\TEMP\LEADS.TXT

File Format

In this example, C:\TEMP\LEADS.TXT includes the following:

TYPE=ARCHIVE REQUEST=SALES.CUST OV=*
DEFQUAL ORACLE1.TELEM
STARTTAB CUSTOMERS
ROWLIMIT 600
SEL CUSTOMERS CUST_ID>'1234'
END

Archive Parameter File Example B

To run an Archive Request named MARKET.SALES and write the process report to an output file, using a parameter file named STATS.TXT that supplies command-line and override keywords and stops processing if a Warning message results, enter:

PR0CMND /R @C:\TEMP\STATS.TXT /OUTPUT=NEWSTATS.TXT

File Format

In this example, the parameter file C:\TEMP\STATS.TXT includes the following:

TYPE=ARCHIVE REQUEST=MARKET.SALES STOP=W OV=*
SERVER ARCHIVSERV
AFFILE Y:\ARCHV\APRLDATA.AF
AFXFILE Y:\ARCHV\APRLDATA.AFX
ADNAME LISTS.APR98
DEFQUAL UDB98.TELEM
VAR STATE 'NJ'
//Other variables to use default values
ROWLIMIT 400
END

Restore Parameter File Example

To restore data from two Archive Files using a parameter file named ORDS.TXT that supplies command-line and override keywords, enter:

PR0CMND /R @C:\TEMP\ORDS.TXT

File Format

In this example, the parameter file C:\TEMP\ORDS.TXT includes the following:

TYPE=RESTORE REQUEST=RESTR.ORDERS OV=*
DELARES YES
CONONERR YES
[AF1]
SERVER ARCHIVSERV
AFFILE Y:\ARCHV\APRLDATA.AF
GLOSELSQL NO
CFFILE APRIL.CF
PROCTYPE UPDINS
[AF2]
AFID 767
GLOSELSQL YES
SUBXFFILE GLOBNJ.XF
END