Tim,

Do you have much, if any, programming experience?

Did you look at the sample calls in
https://github.com/SJLennon/IBM-i-RPG-Free-CLP-Code/blob/master/PGM_REFS/pgm_refs_test.sql

That said, of course you need to provide (at least) two parameters, the library and the program name. The 3rd and 4th will take sensible defaults if you don't provide them.

From the code:
CREATE OR REPLACE PROCEDURE PGM_REFS (
IN p_INLIB varCHAR(10)
,IN p_INPGM varCHAR(10)
,IN p_INTYPE varCHAR(10) default '*PGM'
,in p_Depth integer default(0)
)

The "A function or procedure with the specified name and compatibilbe
> arguments not found." means exactly that--you can't call the procedure with no parameters.

I do not recommend you copy the *CLE program. Instead, recreate it by running the corrected SQL. I'm not sure what will happen to the SQL Catalog if you move the executable.


On 6/30/2023 1:24 PM, tim ken wrote:
Hi,

Thanks for looking into this.

For point number 3 I forgot to mention that when I tried to call it like
this way but not sure if that is correct or not?

1) STRSQL
2) CALL MYLIB.PGM_REFS

so after this step 2, I got error and seems it was not called though I had
checked that PGM_REFS was created in some other library (where I did not
want it to be created) then I copied this CLE object from that library to
my library then only I tried to call it here as mentioned in step 2) here
so the moment I called it ,I got some error:-

l

Message ID :- SQL0440 Severity 30

Message type :- Diagonostic

Message :- Routine PGM_REFS in MY LIBRARY not found with specified
parameters. ( I am not sure what parameters it is looking at here?)

Cause:- A function or procedure with the specified name and compatibilbe
arguments not found. This could be due to an authorization failure.

Recovery:- Specify the correct number and type of parameters on the CALL
statement ,CREATE OR REPLACE statement , or function invocation. Try the
request again.






3) When i do DSPPGMREF mylib/PGM_REFS it shows as :-

number of object referenced 6:-

QSQSQPRC,QSQROUTQ,QC2UTIL1,QLEAWI,QSQPTABL,REFS.


When I do DSPPGMREF on unwanted lib( where it(PGM_REFS) was created might
be due to some mistake ) /PGM_REFS then get the same objects as referenced
like above.


at line 82-83( insert in to mylib.refs values ..) I already changed the
library to the same library where the REFS file was created.


So could you please advise what is wrong happening here which is
preveting to call this PGM_REFS here successfully?

I hope once I am able to call it successfully using CALL MYLIB.PGM_REFS
from the STRSQL session I should be able to see correct program references
to the highest level.



Thanks a lot ...







On Fri, Jun 30, 2023, 21:14 Sam_L <lennon_s_j@xxxxxxxxxxx> wrote:

Tim,

I think you are way out of your technical depth on this project,
whatever it may be. You need professional help.

On 6/30/2023 2:57 AM, tim ken wrote:
Hi,

I just changed the long name 'PGM_REFS_TBL.SQL' to N1 with 'TXT' type
member and PGM_REFS.SQL to 'N2' with 'TXT' type member just for my own
convenience and to test this tool.

1) I was able to create 'REFS' file object using 1st PGM_REFS_TBL.SQL (
copied source in txt type member and then ran RUNSQLSTM Command for that
member with type as 'TXT'))

Presumably you changed the library name where the REFS table is built?
see

https://github.com/SJLennon/IBM-i-RPG-Free-CLP-Code/tree/master/PGM_REFS#pgm_refs_tblsql

RUNSQLSTM SRCFILE(MYLIB/MYSOURCEFILE) SRCMBR(N1)

2) I was able to create an object of 'PGM_REFS' *PGM type object and
it's
attribute is showing as 'CLE' , what is it's full form please?

Stored procedures are created as a C program, which have a type of *CLE.
(Similar to *RPGLE for RPG programs.)

But it was not created in my library, it was created in some other
library
not sure why ? whereas 'i changed the library into the source of
'PGM_REFS.SQL' ( at 'insert into mylib.refs values (' statement) to the
same library where this 'REFS' file was created. and my library was also
on
the top of the library list as well.

Sorry, no idea what you did wrong. Ffom the readme:
"pgm_refs.sql

This is the code to create the PGM_REFS procedure. The library in which
the REFS file is built needs to be changed to suit your environment."
Lines 82-83
-- <<<< Change this table library >>>>>
insert into lennonsb.refs values (

RUNSQLSTM SRCFILE(MyLIB/MYSOURCEFILE) SRCMBR(N2)

3) Once i found this object of 'PGM_REFS' was created in some other
library
Which library? Did you check the spool file created by the RUNSQLSTM
command.

, i tried to call it using strsql session like this command "CALL 'that
libname'.PGM_REFS and then checked the file REFS then found it was still
blank no records found in it.

Presumably you debugged it by doing DSPPGMREF on the library and file
you specified, and it showed that this program existed and had some
objects? (DSPPGMREF produces a listing to the screen, or a spool file,
or a output file, depending on what you specify.)

4) If i need to know a reference program for a specific program till
unlimited depth how can i use this program , i mean do i need to call it
by
passing any parameters in int lib. name source file name and that program
name?
or

simply I could query this file 'REFS' file for a specific program name ?

The REFS file can be used however you wish.


--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/midrange-l.

Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related
questions.





As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.