Miguel,
The SQL Way is easier if you do know some RPGLE (little more challenging to do in CLLE though not impossible) .
If its just CLLE that you would like to compile and go , have a look at these two references :
- https://www.rpgpgm.com/2019/07/easiest-way-to-retrieve-programs-name.html
- https://code400.com/forum/forum/iseries-programming-languages/clp-clle/5459-retrieve-name-of-calling-program-in-cl
They both have valid CLLE programs you can just compile and change to suite your needs.
HTH
Marius