Calling a internal procedure of external procedure

Kalyan

New Member
Hi,
i am trying to call a internal procedure of another external procedure and it doesnt seem to work properly. i tried putting messages in that internal proc and it doesnt seem to display any. Is there any other way to call the program. following is my code where xxporcxr1.p is the external proc and initializeAttributes is the internal proc called.


{pxrun.i &PROC='initializeAttributes' &PROGRAM='xxporcxr1.p'
&PARAM="(buffer pod_det,
input eff_date,
output chg_assay,
output chg_grade,
output chg_expire,
output chg_status,
output assay_actv,
output grade_actv,
output expire_actv,
output status_actv,
output err_flag)"
&NOAPPERROR=True
&CATCHERROR=True}

Please advice.
 
The code you've posted isn't running anything - it's using an include, which judging from the name and structure is a substitute for the Progress RUN statement, the pointfulness of which I will refrain from commenting on.
 
Hi,
Is there any other way to call the program. following is my code where xxporcxr1.p is the external proc and initializeAttributes is the internal proc called.

The standard (non-OO) way to call internal procedures in an external procedure that isn't supered to the session is to get the external proc ready, then call the internal procedure:

RUN external-proc PERSISTENT SET external-proc-handle.
RUN internal-proc IN external-proc-handle (<params>).

eg.
Code:
RUN xxporcxr1.p PERSISTENT SET hxx.
RUN initializeAttributes IN hxx (buffer pod_det,
input eff_date, yada yada...).
 

GregTomkins

Active Member
What's the source code of pxrun.i?

It is really too bad that P4GL does not let you call IP's without running the enclosing procedure first (aka. static methods in Java), but it doesn't.

On a similar note it's really too bad that P4GL doesn't let you do GET-SIGNATURE on the 'main' (non-IP) parameters of a procedure file. I heard this might be available sometime soon, does anybody know?
 

Casper

ProgressTalk.com Moderator
Staff member
It is really too bad that P4GL does not let you call IP's without running the enclosing procedure first (aka. static methods in Java), but it doesn't.

The concept of static was introduced in 10.1C for OOABL.

On a similar note it's really too bad that P4GL doesn't let you do GET-SIGNATURE on the 'main' (non-IP) parameters of a procedure file.
works at least in 10.1B:
Code:
run someprocedure.p persistent set h.
message h:get-signature('').
gives you the signature of the procedure.
But ok, it doesn't work by providing the procedure name, and I guess that is what you mean.

Casper.
 

GregTomkins

Active Member
run someprocedure.p persistent set h.
message h:get-signature('').
This doesn't really make sense, because without knowing the parameters in advance, you wouldn't be able to do either the RUN or the GET-SIGNATURE.

I wonder if the static thing applies to OOABL only, or if it also implies you can do a GET-SIGNATURE("c:/myproc.p") type thing. That would be cool for those of us who aren't that interested in OOABL.
 

Casper

ProgressTalk.com Moderator
Staff member
I agree that the get-signature('') is kinda stupid, but this is what the help told me to do :).
I dont think 'static' will get in the ABL procedures, but I might be wrong. It is kinda an OO-concept which was the main reason for Progress to implement it in the first place.

Casper.
 

shanthimarie79

New Member
if at the specified path of the 'run persistent' statement , the .p is actually a .r
- would running the procedure in persistent fail ?
 
Top