Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem with procedure name retrieving

Status
Not open for further replies.

polo022

Programmer
Mar 14, 2006
15
LU
Hello, using Webfocus 7.1,
I would like to retrieve the procedure name from the procedure during batch execution.
I tried with &focfocexec but it returned '_ADHOCRQ'
I tried with GETUSER() but it returned 'SYSTEM'
I tried with CNCTUSR() but it returned my username.

Which instruction, variable or command could return the procedure name durin batch execution? (I do not want to hard-code it)

Thank you very much for your help
 
Can you provide more detail? From WHERE were you running the FEX? Did it exist on the server, or in the MRE repository? Were you executing the saved procedure, or 'RUN'ing while in the editor?
 
Hello Vendor,
The fex is on the server, not in the MRE repository.
I run it from the editor and from the saved procedure too (Right click 'RUN'). In both situations I have the same problem, I have never retrived the fex name.

Thanks for your help Vendor
 
Here are some details after a new test.

Fex executed from studio developer while in editor retrieve : '_ADHOCRQ'

Fex executed from saved procedure retrieve : '_fexname'

Fex executed from Report Caster retrieve : 'RCASTER'

&FOCFOCEXEC retrieved the fex name when executed as a saved procedure. I would like to have the same result when it is executed from Report Caster. Is it possible?

Thanks a lot
 
Could this come from the server configuration?
 
You see '_ADHOCRQ' when you're in the editor and run the procedure, because you haven't saved it yet. We run what the editor has as an 'ad-hoc request', with a shell built around it, named '_ADHOCRQ'.

From a saved procedure, we build a shell named '_procedurename' (where procedurename is the name of your FEX), set various variables, then do a '-INCLUDE' of your procedure.

From Caster, there's also a shell, called RCASTER.

You can use the variable &FOCFEXNAME, which SHOULD give the name of the currently running FEX, whether it was -INCLUDEd or executed, but you'll still get '_ADHOCRQ' from the editor, for the reason stated above.
 
Hello,

I tried to do what you said.
&FOCFEXNAME return ADHOCRQ (without "_") when run from the editor.
But it returns an error when run from the saved procedure (erro 32026) or from ReportCaster (error 32073).
 
In the Developer's Studio Command console, issue the following command:

? RELEASE

It SOUNDS like you're using a external server, from an earlier release.
 
After issuing ? RELEASE, the release number returned is R720710B.
Is this help you to help me?
 
We tried the request here, using your release, and it worked, so, without the full error message, I'm stumped.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top