0

I have added a new .p procedure (prodict/myProc.p) in prodict.pl file and saved the prodict.pl file under my program's root folder.

Also, I have added the path of the folder to the PROPATH and it is the first item in the PROPATH.

it is the first item in the PROPARTH list

In order to run the procedure, in the Procedure Editor, I try to run using the code below

RUN prodict/myProc.p

The error message I receive is:

prodict/myProc.p was not found. (293)

How can I make my procedure run?

Note: I'm trying this in order to create a custom prodict/load_df.p, so it can be run without the need of any user interaction. My older question can be found here.

aza
  • 115
  • 13
  • When you add a file to a procedure library you need to be in the root folder of the workspace when you add it otherwise it loses the relative paths. If you list the contents of the PL you'll see most likely it's not relative. You can easily test by doing RUN myProc.p. – jdpjamesp Jun 16 '20 at 14:08
  • When I extract the new prodict.pl file to a folder (c:\test, I see the procedure is in the folder(c:\test\prodict\myProc.p). Instead of prodict/myProc.p, when I try Run myProc.p it gives the same error. I have never used pl files before. As I understand, if I add the pl file in PROPATH it should be able to find it. – aza Jun 16 '20 at 14:16
  • using **prolib prodict.pl -list** I can see prodict/myProc.p is listed. – aza Jun 16 '20 at 14:24
  • 1
    Message propath. Message search( “prodict/myProc.p” ). – Stefan Drissen Jun 16 '20 at 22:00
  • **message propath**: prodict.pl is shown first. **message search("prodict/myProc.p")**: c:\myFolder\prodict.pl<>. **run "prodict/myProc.p"**: "prodict/myProc.p" was not found. (293) – aza Jun 17 '20 at 06:36
  • I have tried **run value(search("prodict/myProc.p"))** and now it gives a different message: Cannot run procedure file prodict/myProc.p from library. (1976). As I understand, you can add .p files to the .pl but you can not run .p files within .pl files. – aza Jun 17 '20 at 06:39

1 Answers1

1

Instead of RUN "prodict/myProc.p", I have used

RUN value(search("prodict/myProc.p")).

The error message is changed to

Cannot run procedure file prodict/myProc.p from library. (1976)

When we look at the error description:

Can't run procedure file from library. (1976)

The named file in the library reference (e.g, progname.p in libname.pl<>) in the RUN statement is a source file, and cannot be run. Only PROGRESS r-code files can be run from a library.

Solution: I have added the compiled .r file to the library through proenv:

 prolib prodict.pl -add prodict/myProc.r

and changed the calling code as:

RUN "prodict/myProc.r".

Now the code runs. Thanks to Stefan Drissen for showing me a way to get the real error message.

aza
  • 115
  • 13
  • Aha! You're welcome. Note that you should not have quotes around what you are running, this makes it look like a string, which it is not. Additionally, you can always run .p - it will run the .r if it finds it - see https://documentation.progress.com/output/ua/OpenEdge_latest/pdsoe/PLUGINS_ROOT/com.openedge.pdt.langref.help/rfi1424920323961.html (see when you specify a suffix or file extension) – Stefan Drissen Jun 17 '20 at 21:17