ExecuteExternalProgram

Execute External Program

Minor Business Rule

Object Name: B34A1030

Parent DLL: CMFG

Location: Client/Server

Language: C

1.Functional Description

1.1Purpose
This business function will execute a command using the native command interpreter for the platform 
where business function is mapped to run.


1.2Setup Notes and Prerequisites

The input command line must be valid for the platform where this business function is run. The 
business function runs the command line synchonously  it will not return until the command line is done 

executing. Security and permissions to execute certain commands may be platform-dependant as well.


Also note that this business function cannot detect the status of the command. It can detect if the 

command appeared to run, but not if the command completed successfully. 


2.Technical Specifications


2.4Processing 

Call ANSI function system() with the command line as parameter. If system() returns less than 0, 
set cErrorCode to  '1' and szErrorMessageId to '3143'.


^

Data Structure

D34A1030 - Execute External Program

Data Item    Data Structure Description    I/O    Required    Notes
SUPPS        cSuppressErrorMessage         I                  Input '1' if you don't want the 

business function to set any errors

ERRC         cErrorCode                    O                  '1' if there are errors, '0' otherwise

DTAI         szErrorMessageId              O                  Error code to be set, if any

NFLF         szCommandLine                 I                  Command line to be executed.


^

Parameter NameData ItemData TypeReq/OptI/O/Both
cSuppressErrorMessageSUPPScharOPTINPUT

A flag indicating whether or not runtime error messaging will occur when an error message is issued from a business function.        0 = allow 
runtime error message handling.        1 = suppress runtime error message handling.

cErrorCodeERRCcharOPTOUTPUT

This error code indicates if any errors occurred during the creation of the Trip Document Detail (F4914) records by the Delivery Document 
Set Server program (XT4914).

szErrorMessageIdDTAIcharOPTOUTPUT

A code that identifies and defines a unit of information. It is an alphanumeric code up to 8 characters long that does not allow blanks or 
special characters such as %, &, or +. You create new data items using system codes 55-59. You cannot change the alias.

szCommandLineNFLFcharOPTINPUT

The name of the flat file. This includes the directory path where the flat file exists.

Related Functions

None

Related Tables

None