Calling an RPG program from a BSFN

badda_bing

Well Known Member
Hi all,

Long time JDE Developer here working on an AS400 for the first time!

I have an RPG program that I need to call to validate data interactively from a form. Ie When a user leaves a field this function needs to be called to define if the data is allowed or not – specifically this field is a bank account and the RPG program is a third party program that checks if it is indeed a valid UK bank account.

I know of B34A1030 but this will not allow the parameters to be passed back once the RPG program has been run and I need to return parameters.

How would this normally be done, if indeed it can even be done? How does anyone else validate UK bank accounts upon entry in the P0030A?

TIA,

Paul

XE Update6 SP23_Q1 V5R4
 
Hi Paul,
I use this to call CL that returns job number:
In newBSFN.h:
#ifdef JDENV_AS400
#pragma map(CustomNameInBSFN,"CLname")
#pragma linkage(CustomNameInBSFN, OS)
#endif /* JDENV_AS400 */

In newBSFN.c
CustomNameInBSFN((char *) &dsCL);

Hope this helps,
Bojan
 
Thanks for your response but I don't think this is quite what I am after. I need to call a program interactively, from within a form and have the result back to the form – not run a job in any way.


Paul
 
That’s exactly what "linkage" is doing. Just call new BSFN form "control exited and changed" event.

Bojan
 
Back
Top