RPG call from OneWorld

Daniel Skoy

Daniel Skoy

Does anyone have detailed instructions on how to call a RPG program from OneWorld?

I've used the execute external command BSFN. I need a business function or something to use in order to pass parameters back and forth.
<P ID="edit"><FONT SIZE=-1>Edited by dskoy on 10/3/01 06:38 AM.</FONT></P>
You can use BSFN B34A1030 - Execute External Program

This BSFN will execute a command using the native command interpreter for
the platform where the BSFN is mapped to run.
· The input command line must be valid for the platform where this
BSFN is run.
· The BSFN runs the command line synchronously - it will not return
until the command line is done executing.
· Security and permissions to execute certain commands may be
platform-dependant as well.
· This BSFN cannot detect the status of the command. It can only
detect if the command appeared to run, but not if the command completed
· Processing: Call ANSI function system( ) with command line as
parameter. If system( ) returns less than 0, set cErrorCode to '1' and
szErrorMessageId to '3143'.

Note the following Data Structure Description:

Data Item Data Structure Description I/O Notes .
SUPPS cSuppressErrorMessage I Input '1' if you don't want
the BSFN to set 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:
Use alias CMDS for
the report variable used to construct the command string. ie.)
Are you trying to submit a command on the AS/400? If so, I may have a backdoor solution.

In JDE, create a table of AS400 commands, keyed by user.
Then write an interactive app for the user to select and confirm one or more commands.
Write an rpg program to be triggered by update on this file, and call or submit the selected command.

Works here.

XE sp:14 ES:AS/400 Citrix, NT, 2000

<P ID="edit"><FONT SIZE=-1>Edited by maurice_rice on 11/8/01 04:23 AM.</FONT></P>