×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Problem with procedure name retrieving

Problem with procedure name retrieving

Problem with procedure name retrieving

(OP)
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

RE: Problem with procedure name retrieving

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?

RE: Problem with procedure name retrieving

(OP)
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

RE: Problem with procedure name retrieving

(OP)
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

RE: Problem with procedure name retrieving

(OP)
Could this come from the server configuration?

RE: Problem with procedure name retrieving

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.

RE: Problem with procedure name retrieving

(OP)
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).   

RE: Problem with procedure name retrieving

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.

RE: Problem with procedure name retrieving

(OP)
After issuing ? RELEASE, the release number returned is R720710B.
Is this help you to help me?

RE: Problem with procedure name retrieving

Can you provide the FULL error message, not just the number?

RE: Problem with procedure name retrieving

We tried the request here, using your release, and it worked, so, without the full error message, I'm stumped.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close