imagename Command--Run a Completed Application
To run a completed application, use the following command syntax at the operating system prompt:
imagename [ -d[v_node::]dbname | -database=[v_node::]dbname ]
| -nodatabase ] [-uusername] [framename |[-p]procname]
[-noforms|forms] [SQL option flags] [-Ggroupid]
[-Rrolename]
[-constants_file='filename']
[-a application_specific_parameter
{application_specific_parameter}]
Windows: To run a standard application image, created by running imageapp, use the previous command syntax. If you created an interpreted image, by selecting Image from within ABF or by running imagebld, not all of the command flags are supported. Use the following syntax:
imagename [ -d[-database][v_node::]dbname | -nodatabase ]
[-uusername] [-fframename |[-p]procname]
[-constants_file='filename']
[-a application_specific_parameter
{application_specific_parameter}]
imagename
Specifies the name of the application image. By default, the image name is the same as your application name.
-d[v_node::]dbname |
-database[v_node::] dbname
Runs the application with the database specified by dbname.
The -database flag can be abbreviated -d.
The -database or -d flag lets you run the application with a database other than the one the database resides in. The new database must contain the same tables and reports as those used in the application's queries.
For example, you can develop an application on a test database and later run it on a production database.
If you are using a database that resides on a remote host, you must specify nodename, followed by two colons. For example:
-dserver1::orderdb
-nodatabase
Starts the application without an open database session. The -nodatabase flag can be used to run an application that does not require access to a database, or an application that starts a database session with the 4GL connect statement.
See the 4GL section of this guide for information about database connections.
-uusername
Runs the application as if you were the user represented by username.
Files created under this flag are owned by the user actually running the ABF process, not by username.
To use this option, you must be a privileged user.
If you are using Enterprise Access Products (formerly Gateways), see your Enterprise Access documentation before using this parameter.
framename
Runs the application with the specified frame as the top frame
[-p]procname
Runs the application beginning with the procedure represented by procname.
You must include the -p flag before the procedure name if you are invoking an image created under a previous release of Vision and the procedure has the same name as a frame in the application.
-noforms|-forms
The -noforms flag lets you run an imaged application without initializing the Forms Runtime System. If the application attempts an operation that requires the forms system, a runtime error is reported.
The -noforms flag can only be used to run applications that do not require any forms. The application can contain forms, if you run the application in a way that does not call the forms. For example, you can start the application from a procedure instead of a frame by specifying the procname on the command line.
The message statement does not require the forms system.
The -forms flag to call the forms system is the default and is included only for consistency.
SQL option flags
The SQL option flags are flags that affect the database behavior. Vision passes the flags to the database, which interprets them.
See the sql command description in the Command Reference Guide for detailed information on these flags. The following SQL option flags are accepted when you run an image:
-f +U -l -x
-Ggroupid
Lets you run or edit the application as a member of the group specified.
VMS: Capital letter flags require double quotes in VMS, for example:
"-Ggroupid"
-Rrolename
Runs the application image with the role specified.
If you specify a role name, you are prompted for the role's password.
VMS: Capital letter flags require double quotes, for example:
"-Rrolename"
-constants_file='filename'
Specifies a file containing values for the application's constants. If the
-constants_file flag is specified, the values in the constants file override the values for the constants stored in the application.
The filename can be the full directory path name for the constants file.
-a application_ specific_parameters
Allows the user to pass one or more application-specific parameters to the application.
The -a flag must be the last flag that appears on the command line. There must be a blank space between the -a flag and the first parameter that follows it.
Any characters following the -a flag are passed as a single string of parameters.
Example—imagename command:
To run the order entry application that you imaged as "orders," enter the following command at the operating system prompt:
Windows:
orders
The orders file must be in the PATH.
UNIX:
orders
VMS:
run orders
or
run orders.exe
The application runs from the top frame or other default start frame (see
Set a Default Start Frame).
To access the application beginning with the frame AddOrders, the user enters:
Windows:
orders addorders
UNIX:
orders addorders
VMS:
The imagename must be defined as a DCL foreign command. See the following section for instructions and an example.
You also can let users run the application with a command that you specify as described in
Defining Symbols for Different Users.