In the panel group I've got the following setup:
:CLASS NAME=exitcl
BASETYPE='PTR'.
:ECLASS.
:VAR NAME=exitopt
CLASS=exitcl.
:VARRCD NAME=exit
VARS='exitopt'.
:LISTACT ENTER='CMD ?CHGSAVF FILE(&lib./&fil.) &prm.'
PROMPT='CMD ?CHGSAVF FILE(&lib./&fil.) &prm.'
HELP=genhlp
USREXIT='CALL exitopt'
OPTION=2.2=Change Save File
In the RPG I've got a data structure with a procedure pointer in it:
Dcl-DS DS1;
PTR Pointer(*PROC);
End-DS;
I then populate the pointer with the address of my exit procedure in the RPG and put the dialogue variable:
// Put exit program
PTR = %PAddr('EXIT_OPT');
QUIPUTV(WK0HANDLE : DS1 : %Len(DS1) : 'EXIT' : ErrDS);
My exit procedure isn't doing anything at the moment, as it fails before it gets there:
Dcl-Proc EXIT_OPT;
Dcl-PI *n;
pLST LikeDS(EUIQALX) Const;
End-PI;
Return;
End-Proc;
Regards.
Liam.
Liam Henderson | Application Consultant
Getronics
T. +441908992044 | M. +447985875181 | E. Liam.Henderson@xxxxxxxxxxxxx | W. www.getronics.com
Getronics Services UK Limited - Registered in England and Wales with No: 07966594. VAT No: GB 130 6848 20.
Registered Office - Getronics, Holland House, 4 Bury Street, London, EC3A 5AW, UK
The information transmitted is intended only for use by the addressee and may contain confidential and/or privileged material. Any review, re-transmission, dissemination or other use of it, or the taking of any action in reliance upon this information by persons and/or entities other than the intended recipient is prohibited. If you received this in error, please inform the sender and/or addressee immediately and delete the material. Thank you.
Legal disclaimer:
http://www.getronics.com/legal/
-----Original Message-----
From: RPG400-L <rpg400-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of Vernon Hamberg
Sent: 15 June 2020 16:33
To: RPG programming on IBM i <rpg400-l@xxxxxxxxxxxxxxxxxx>
Subject: Re: UIM Exit Programs in RPG/ILE
CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.
Hello Liam
How are the parameters defined? I guess I don't feel like burrowing into the documentation! Heh!
Vern
As an Amazon Associate we earn from qualifying purchases.