Consultor Eletrônico



Kbase P85303: Is it possible to send and receive parameters calling an AS/400 HLL program from a Progress GUI sess
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   22/06/2004
Status: Unverified

GOAL:

Is it possible to send and receive parameters calling an AS/400 HLL program from a Progress GUI session.

GOAL:

How to retrieve the return parameters from an AS/400 HLL program called with QCMD interface

FACT(s) (Environment):

IBM AS/400 (RISC)

FACT(s) (Environment):

Progress/400 DataServer

FIX:

The only way to call an AS/400 HLL program (CL, Cobol, RPG) from a remote Progress 4GL client is to use the QCMD interface. It's possible to pass certain parameters to a HLL program but no output can be returned (apart from the status that might be checked).

The QCMD interface is a "one-way" parameter form for simply submitting the jobs (SBMJOB) or processing the OS/400 commands. However it doesn't care about it, once validated.

The QCMD interface can return information to the client via the RECID function. After a server command is executed, it sends a status back to the client in the RECID of QCMD. This return values can be interrogated using the following p code:

status = RECID(QCMD).

"status" will contain a non-zero value that has been returned by the server. A return value of 1 (one) usually indicates success and a value other than 1 (one) usually indicates failure.

There's only one way to workaround this limitation. The returned values should be stored in the physical file (in additional fields or separate table) and then accessed or checked from Progress 4GL client.