Racking my brains on this (would be most greatful for the help):
Created an AS/400 SQL function that I created from an RPGLE service program, but when I go to run the function through a select, I get the following error --
BBFAPPSTS in *LIBL type *N not found
The function was created from the SQL Command:
Create function pgmrutool/bbfappsts (PIN char(2))
Returns char(5)
Language rpgle
Not deterministic
External name 'PGMRUTOOL/BBRLSTSTS(BBRLSTSTS)'
Parameter style General
The program PGMRUTOOL/BBRLSTSTS is very simple, right, now (I plan to beef it up if I can get the function to work), but has the following code:
H NOMAIN
D BBRLSTSTS PR 5A
D Pin 2A CONST
P BBRLSTSTS B EXPORT
D BBRLSTSTS PI 5A
D Pin 2A CONST
D retField S 5A
C move 'HELLO' retField
C return retField
P BBRLSTSTS E
I created the module and service program with the following commands --
CRTRPGMOD MODULE(pgmrutool/bbrlststs) SRCFILE(pgmrutool/qrpglesrc) BNDDIR(pgmrutool/bbbnddir) DBGVIEW(*source)
CRTSRVPGM SRVPGM(PGMRUTOOL/BBRLSTSTS) MODULE(PGMRUTOOL/BBRLSTSTS)
EXPORT(*SRCFILE) SRCFILE(PGMRUTOOL/QSRVSRC) SRCMBR(BBRLSTSTS)
Everything compiled, but the darn SQL function won't run.
Created an AS/400 SQL function that I created from an RPGLE service program, but when I go to run the function through a select, I get the following error --
BBFAPPSTS in *LIBL type *N not found
The function was created from the SQL Command:
Create function pgmrutool/bbfappsts (PIN char(2))
Returns char(5)
Language rpgle
Not deterministic
External name 'PGMRUTOOL/BBRLSTSTS(BBRLSTSTS)'
Parameter style General
The program PGMRUTOOL/BBRLSTSTS is very simple, right, now (I plan to beef it up if I can get the function to work), but has the following code:
H NOMAIN
D BBRLSTSTS PR 5A
D Pin 2A CONST
P BBRLSTSTS B EXPORT
D BBRLSTSTS PI 5A
D Pin 2A CONST
D retField S 5A
C move 'HELLO' retField
C return retField
P BBRLSTSTS E
I created the module and service program with the following commands --
CRTRPGMOD MODULE(pgmrutool/bbrlststs) SRCFILE(pgmrutool/qrpglesrc) BNDDIR(pgmrutool/bbbnddir) DBGVIEW(*source)
CRTSRVPGM SRVPGM(PGMRUTOOL/BBRLSTSTS) MODULE(PGMRUTOOL/BBRLSTSTS)
EXPORT(*SRCFILE) SRCFILE(PGMRUTOOL/QSRVSRC) SRCMBR(BBRLSTSTS)
Everything compiled, but the darn SQL function won't run.