I am facing an error while trying to extract a deployment set using option 13 from the "Work with Deployment Sets" menu.
Below is the sequence of steps I am following:
STRACMS -> 6. Deployment menu -> 1. Work with deployment sets -> F6 to add a deployment set.
From this screen, I select the three objects below:
CLSTKFN *FUNCTN SQL
CLSTKR *MODULE RPGLE
CLSTKR *SRVPGM RPGLE
Here CLSTKFN is an SQL user defined function that uses the CLSTKR service program.
Then I set the auto-start step to 1 which submits a job Job 982648/ALDONCMS/ACMSATOJOB. This job completes without issues.
But the status of the deployment set remains EXF which means failed.
Though the ACMSATOJOB completes without errors, it submits another job Job 981824/ALDONCMS/ACMSEXTDVR which fails with end code 20.
Below are the messages in the spool file:


It says "Not authorized to function CLSTKFN in PAVT_TESTP". I don't understand this error. Why would there be an authorization failure. This UDF is also created through Aldon. So I don't understand what authority is missing here.
Below is the function code:
CREATE OR REPLACE FUNCTION CLSTKFN( RELATIVESTACKENTRY INT, USEPGMLEVEL VARCHAR(1), IGNORESYSLIBS VARCHAR(1)) RETURNS VARCHAR(160) LANGUAGE RPGLE EXTERNAL NAME 'CLSTKR(UDFCLSTK)' PARAMETER STYLE GENERAL NOT FENCED NO EXTERNAL ACTION NO SQL SECURED STATEMENT DETERMINISTIC; GRANT ALL ON FUNCTION CLSTKFN TO PUBLIC; Please help ASAP.
------------------------------
Thejwal Pavithran
Rocket Forum Shared Account
------------------------------