[Prev] [Next] [Top] [Bottom] [Contents] (6 out of 9)

EXEC Objects

An EXEC Object is used to define how executables can be used in conjunction with a CGI. Data provided to an EXEC Object can be on the command-line or on Standard-in. What the executable does is up to the developer. It can provide results by sending data to Standard-out in delimited or Fixed Width form.

How EXEC Objects are Managed

EXEC objects are saved on your hard disk using a naming convention described below. Sapphire/Web needs to know where to read and write EXEC Objects at start-up. If the environment variable DSQLDIR is set to point to a directory path, Sapphire/Web will look in that path. The DSQLDIR environment variable is useful for sharing EXEC Objects between multiple developers.

If the DSQLDIR environment variable is not set, Sapphire/Web will look in the project's directory.

EXEC Object Naming Convention

EXEC Objects are saved using the following naming conventions:

EXEC,EXEC,object_name,E
where

object_name
is the name of the EXEC Object
E
Data Object Type

How to Create EXEC Objects

To create an EXEC Object, use the Object Editor. See the section on the Object Editor for more information.

Components of an EXEC Object

An EXEC Object describes the executable that is to be manipulated. It describes input to the executable and output from the executable. Several things must be specified in order to define an EXEC Object:

EXEC Object Options

When creating EXEC Objects, Options can be specified in the Options Editor. These Options fine tune the behavior of the EXEC Object. The following is a table of EXEC Object Options.

EXEC Arguments

There are two types of Arguments that can be specified by an EXEC Object. These types are Command-line and Standard-in. Each type can be used by itself, or both can be used at once.

When specifying Arguments for EXEC Data Objects, use this simple format:

#name, type[, remove_previous]#
Where

name = The name of the argument. This will appear in the Object Bind Editor.

type = This can be WRAP or NO_WRAP. WRAP means to wrap the argument value with quotes and NO_WRAP means to not wrap the value with quotes.

remove_previous = This is an optional parameter. A value of True means to remove the prefix of this argument if the value returned for the argument is NULL or empty. False means do not remove the prefix.

Examples:

Using NO_WRAP

Command-line Argument definition:

	-f #filename, NO_WRAP# -v
Data provided by end-user:

	myfile.dat
Resulting String:

	-f myfile.dat -v

Using WRAP

Command-line Argument definition:

	-f #filename, WRAP# -v
Data provided by end-user:

	myfile.dat
Resulting String:

	-f "myfile.dat" -v

Using WRAP without remove_previous

Command-line Argument definition:

	-f #filename, WRAP# -v
Data provided by end-user:

	NULL
Resulting String:

	-f -v

Using WRAP without remove_previous

Command-line Argument definition:

	-f #filename, WRAP, True# -v
Data provided by end-user:

	NULL
Resulting String:

	-v


[Prev] [Next] [Top] [Bottom] [Contents] (6 out of 9)