发布日期: 08/07/2020

Stored Processes

stp<<Begin Run(<named arguments>)

Description

Starts this stored process executing in the background. This message is paired with End Run, which should also be called at some point after Begin Run to wait for the stored process to complete.

Returns

-1 = execution failed.

1 = not started.

2 = running.

3 = canceled.

10 = completed successfully.

11 = completed with errors.

Optional Named Arguments

Same as Run, except AutoOpenResults and NoAlerts are not supported. They are available on EndRun.

AutoResume(<filename>)

If specified with no argument, it specifies that the stored process results should be auto-opened when the stored process completes. If a quoted filename is specified, filename is opened rather than all results of the stored process being auto-opened.

AutoResumeScript(script)

Specifies that after stored process execution completes, the quoted script should be evaluated. If the script is a function taking at least one argument, the function is evaluated with the scriptable stored process object passed as the first (and only) argument. AutoResume and AutoResumeScript are mutually exclusive.

stp<<Delete Results(<named arguments>)

Description

Deletes all results from the execution of this stored process.

Returns

1 if deletion is successful, 0 otherwise (error message to JMP log).

Optional Named Arguments

NoAlerts(Boolean)

If True, the user is not prompted for confirmation before the attempt is made to delete results.

DeleteDirectory(Boolean)

If true, deletes the directory containing the stored process results along with the result files themselves. The default value is true.

stp<<Edit Param Values()

Description

Opens the stored process window for interactively setting parameter values.

Returns

1 if the user clicks OK to dismiss the window, 0 if the user clicks Cancel.

stp<<End Run(<named arguments>)

Description

Waits a specified amount of time (or forever) for a stored process started with Begin Run to complete. If the stored process is complete, retrieves the results, and opens them.

Returns

-1 = execution failed.

1 = not started.

2 = running.

3 = canceled.

10 = completed successfully.

11 = completed with errors.

Optional Named Arguments

AutoOpenResults(Boolean)

Optional, Boolean. If True, results are automatically opened if the stored process completes in the time specified by MaxWait. If False, results are not automatically opened, and can be manually opened via the object returned by the Get Results message. Default is True.

MaxWait(milliseconds)

An integer that specifies the maximum amount of time in milliseconds to wait for the stored process to complete. If MaxWait is not specified, End Run waits forever for the stored process to complete.

NoAlerts(Boolean)

If True, error messages are sent to the JMP log rather than message boxes. The default value is False.

stp<<Get Metadata Id()

Description

Returns the metadata ID of the stored process.

Returns

A string.

stp<<Get Metadata Path()

Description

Returns the full metadata path of the stored process.

Returns

A string.

Stp<<Get Name()

Description

Returns the name of the stored process.

Returns

A string.

stp<<Get Param Enum Labels(name)

Description

Gets the enumeration labels specified by the quoted name for a parameter.

Returns

A list of strings.

Arguments

name

Specifies the quoted name of the parameter whose enumeration labels to retrieve.

stp<<Get Param Enum Values(name)

Description

Gets the possible enumerated values for a parameter.

Returns

A list of strings.

Arguments

name

Specifies the quoted name of the parameter whose possible enumerated values to retrieve.

stp<<Get Param Names(<named arguments>)

Description

Gets a list of parameter names for this stored process of specific types.

Returns

A list of strings.

Optional Named Arguments

Visible(Boolean)

If true, gets only visible parameters. If False, gets only non-visible parameters. If not specified, gets both visible and non-visible parameters.

Modifiable(Boolean)

If true, gets only modifiable parameters. If False, gets only non-modifiable parameters. If not specified, gets both modifiable and non-modifiable parameters.

Required(Boolean)

If true, gets only required parameters. If False, gets only non-required parameters. If not specified, gets both required and non-required parameters.

Expert(Boolean)

If true, gets only expert parameters. If False, gets only non-expert parameters. If not specified, gets both expert and non-expert parameters.

stp<<Get Param Value(name)

Description

Gets the current value of the specified parameter.

Returns

String.

Arguments

name

Specifies the name of the parameter whose value to retrieve.

stp<<Get Results()

Description

Gets the results generated by the execution of this stored process as a scriptable object.

Returns

A SAS Results scriptable object.

stp<<Get Status()

Description

Gets the execution status of the stored process.

Returns

-1 = execution failed.

1 = not started.

2 = running.

3 = canceled.

10 = completed successfully.

11 = completed with errors.

stp<<Get Status Message()

Description

Gets the message associated with the failure of the stored process, if any.

Returns

String.

stp<<Reset Param Values()

Description

Resets all parameter values to their metadata-defined default values.

Returns

Void.

stp<<Run(<named arguments>)

Description

Executes this stored process object in the foreground.

Returns

-1 = execution failed.

1 = not started.

2 = running.

3 = canceled.

10 = completed successfully.

11 = completed with errors.

Optional Named Arguments

AutoOpenResults(Boolean)

If True, results are automatically opened when the stored process completes. If False, results are not auto-opened, and can be manually opened via the object returned by the GetResults message. The default value is True.

UserName(username)

Specifies the quoted user name under which to run the stored process.

Password(password)

Specifies the quoted password for UserName.

AuthDomain(authDomain)

Specifies the quoted authentication domain of the credentials (username, password) given.

ODSDest(dest)

Specifies the quoted ODS destination ("HTML", "PDF", "tagsets.SASReport12") for any ODS-generated results from the stored process. This requires the stored process SAS code to call %STPBEGIN. The default value is "HTML".

GraphicsDevice(device)

Specifies the quoted SAS graphics device to use when generating graphics in ODS results. This requires the stored process SAS code to call %STPBEGIN. The default value is "GIF".

ODSStyle(style name)

Specifies the quoted ODS style to apply to the results. This requires the stored process SAS code to call %STPBEGIN. There is no default value.

ODSStyleSheet(path)

Specifies the quoted path to a CSS file on the client machine that is to be applied to generated ODS results. This requires the stored process SAS code to call %STPBEGIN. There is no default value.

NoAlerts(Boolean)

If True, error messages are sent to the JMP log rather than message boxes. The default value is False.

stp<<Set Param Value(name, value)

Description

Sets the value of the specified stored process parameter to the specified value.

Returns

1 if successful, 0 otherwise (value can violate the parameter’s constraints).

Arguments

name

Specifies the quoted name of the parameter whose value to set.

value

Specifies the quoted string that you want to set the parameter to.

stp<<Set Results Directory(path)

Description

Sets the quoted path on the client machine where stored process results are placed.

Returns

String.

Arguments

path

Specifies the full quoted path of the directory where results of the stored process execution should be placed. The directory must exist or be creatable. If the results directory is not set, a temporary location appropriate for the operating system will be used, and that directory can be retrieved from the stored process Results scriptable object after the stored process executes.

需要更多信息?有问题?从 JMP 用户社区得到解答 (community.jmp.com).