Receive results from AS400 Command

dwall1160

Member
I am trying to get the e-mail address back from the AS400 directory entry. Is there a BF that will let you send a command and get the result back?
 
Hi

In short, no! The BSFN B34A1030 uses an API called "system" which only accepts a return code.

Note: The error code will return an error if the AS400 command/program being called creates an exception error (I think *DIAG or *ESCAPE type errors).

Under some conditions, the Kernal jobs JDENET_K) will run the AS400 command, so care needs to be taken to ensure the AS400 command/program does not hang, or cause stability problems.
Using SBMJOB removes this risk, but then the Return Code will always be successful (unless the calling program monitors the submitted job and waits for the SBMJOB to finish before returning back to OW).

I may have a possible solution to your problem:
Create a BSFN which calls B34A1030, and map the OCM for the new BSFN to always run server-side.
The AS400 program writes to a OW table with the results required, and our new BSFN reads this table once the AS400 program has completed.

Hope this all makes sense.

Regards,
Terry
 
Thanks. The solution I came up with was similar to your suggestion. I found a field in OW table that we can use for a remark. I run grab the data in a CL/SQL routine on the 400 using B34A1030 and store the result in this field. Then I do a fetch single on this record/field to get my value.

Around OneWorld :D in 80 seconds are less ;)
 
Back
Top