Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] &IBIMR_user but for ReportCaster?
Go
New
Search
Notify
Tools
Reply
  
[CLOSED] &IBIMR_user but for ReportCaster?
 Login/Join
 
Master
posted
In Managed Reporting, you can use &IBIMR_user variable, but this is not picked up when the same .fex is run via ReportCaster. What variable would I use to determine which user is running a ReportCaster job?

-ABT

This message has been edited. Last edited by: ABT,


------------------------------------
WF Environment:
------------------------------------
Server/Client, ReportCaster, Dev Studio: 7.6.11
Resource Analyzer, Resource Governor, Library, Maintain, InfoAssist
OS: Windows Server 2003
Application/Web Server: Tomcat 5.5.25
Java: JDK 1.6.0_03
Authentication: LDAP, MRREALM Driver
Output: PDF, EXL2K, HTM

------------------------------------
Databases:
------------------------------------
Oracle 10g
DB2 (AS/400)
MSSQL Server 2005
Access/FoxPro
 
Posts: 561 | Registered: February 03, 2010Reply With QuoteReport This Post
<JJI>
posted
ABT,

RC is not picking up the &IBIMR_user because the site.wfs is not red by RC.
I don't know what exactly you are trying to do but you need to manualy supply a value for the variable in order to make this work in RC.
You could do that by using a pre-execution step or by just using a -DEFAULT and a -SET so when you schedule a report you can then supplie the value for it.
Exampl.:

-DEFAULT &RC_IBIMRUSER = 'FOCNONE';
-SET &IBIMR_user       =  &RC_IBIMRUSER ;


Hope this helps,
 
Reply With QuoteReport This Post
Master
posted Hide Post
JJI,
thanks for the confirmation. Basically, I have a fex that 'does stuff', but to do this stuff, it needs to determine who a user is. As currently written, if &IBIMR_user = A, do 'this' branch of logic, else do 'that' branch of logic. The fex works as expected when run from MRE or from our dashboard. When ReportCaster initiates it, the &IBIMR_user var doesn't get populated (since site.wfs is not processed, as you've noted) and throws an error ('Task error: A VALUE IS MISSING FOR: &IBIMR_user').

To complicate the matter (or challenge, depending on your perspective) I need to avoid requiring (or even allowing) the user to override the variable, so your suggestion of manually setting won't really work for me. It sounds like I need to try to set IBIMR_user (or make an IBIRC_user) variable in the server config. Even with that, will that pick up the ReportCaster scheduling ID or does that **have** to be done in a preprocessing step?

Thanks,
-ABT


------------------------------------
WF Environment:
------------------------------------
Server/Client, ReportCaster, Dev Studio: 7.6.11
Resource Analyzer, Resource Governor, Library, Maintain, InfoAssist
OS: Windows Server 2003
Application/Web Server: Tomcat 5.5.25
Java: JDK 1.6.0_03
Authentication: LDAP, MRREALM Driver
Output: PDF, EXL2K, HTM

------------------------------------
Databases:
------------------------------------
Oracle 10g
DB2 (AS/400)
MSSQL Server 2005
Access/FoxPro
 
Posts: 561 | Registered: February 03, 2010Reply With QuoteReport This Post
Platinum Member
posted Hide Post
If you use the following in a pre-execution FEX, I think you will get what you're looking for:

-SET &IBIMR_user = &DSTOWNER;

DSTOWNER is the owner of the ReportCaster schedule, which is most likely the MR userid you're trying to grab.

FYI, a little trick to see what variables are available.

Create a FEX with only the following within it:
-? &

Schedule the FEX to run within ReportCaster.

After it executes, check its last last execution.

You will see all the variables set at the execution time of ReportCaster.

e.g. The following is the output I got in 7611.
Job Description:
myVar
User:
admin
Procedure:
J15cnhfu094g
Schedule ID:
S15cnhfee709
Start Time:
2010-09-20 08:22:01 AM
End Time:
2010-09-20 08:22:02 AM



Schedule Executed Due To NEXTRUNTIME



Starting task: Task 1



Task type: MR Standard Report



Task domain: untitled/untitled.htm



Retrieving MR report: app/myvar



Connecting to server EDASERVE with execution id SRVADMIN



Executing focexec.



No report to create.



CURRENTLY DEFINED & VARIABLES:



&ACCEPTS = 0



&APPROOT = \\ssg.ibi.com\ServerPaths\apps



&AUTOINDEX = NO



&BASEIO = 0



&CHNGD = 0



&DATE = 09/20/10



&DBMSERR = 0



&DELTD = 0



&DMY = 200910



&DMYY = 20092010



&DSTEDAUSER = SRVADMIN



&DSTHOST = SSG-7611



&DSTJOBID = J15cnhfu094g



&DSTJOBNAME = app/myvar



&DSTOWNER = admin



&DSTPACKETID = P15cnhfef60a



&DSTPORT = 8200



&DSTPOSRPC2 =



&DSTPOSTRPC1 =



&DSTPRERPC1 =



&DSTPRERPC2 =



&DSTSCHEDID = S15cnhfee709



&DSTTASKID = T15cnhf49m01



&DUPLS = 0



&ECHO = OFF



&EXITRC = 0



&FOCEXURL = /ibi_apps/WFServlet?IBIF_webapp=/&IBIC_server=EDASERVE&IBIWF_



&FOCFEXNAME = myvar



&FOCFOCEXEC = RCASTER



&FOCGRAPHCNT = 0



&FOCINCLUDE = myvar



&FOCNEXTPAGE = 0



&FOCUSDB = NO



&FORMAT = 0



&INDEXIO = 0



&INPUT = 0



&INVALID = 0



&LINES = 0



&MDY = 092010



&MDYY = 09202010



&NOMATCH = 0



&READS = 0



&RECORDS = 0



&REJECTS = 0



&RETCODE = 0



&SETFILE =



&SORTIO = 0



&TOD = 08.22.02



&TRANS = 0



&WFDESCRIBE = OFF



&YMD = 100920



&YYMD = 20100920



Task finished.



No report to distribute.


WF 71.x, 76.x, 7701, 8.0 Beta OS: Linux, Win2k3, Win2k, Win2k8, WinXP


 
Posts: 203 | Registered: November 19, 2007Reply With QuoteReport This Post
Master
posted Hide Post
Doug, you hit the nail on the head. FWIW, I am going with &DSTEDAUSER since that seems to correlate to the Execution ID.

Thanks for the tip/reminder on using ? & inside a reportcaster job, I forget that is context sensitive.

I owe you a cookie next time you're on a site visit.

- ABT


------------------------------------
WF Environment:
------------------------------------
Server/Client, ReportCaster, Dev Studio: 7.6.11
Resource Analyzer, Resource Governor, Library, Maintain, InfoAssist
OS: Windows Server 2003
Application/Web Server: Tomcat 5.5.25
Java: JDK 1.6.0_03
Authentication: LDAP, MRREALM Driver
Output: PDF, EXL2K, HTM

------------------------------------
Databases:
------------------------------------
Oracle 10g
DB2 (AS/400)
MSSQL Server 2005
Access/FoxPro
 
Posts: 561 | Registered: February 03, 2010Reply With QuoteReport This Post
Master
posted Hide Post
Last piece of glue to hook this together. When run as is, it kept dying in ReportCaster when it couldn't find the 'IBIMR_user' variable. Hope this helps someone else out (second line):

-* SET USER
-IF &FOCFOCEXEC EQ 'RCASTER' THEN GOTO SETUSERRC ELSE GOTO SETUSERMR;

-SETUSERRC
-SET &PDKUSER = &DSTEDAUSER;
-GOTO ENDSETUSR

-SETUSERMR
-SET &PDKUSER = &IBIMR_user;
-GOTO ENDSETUSR

-ENDSETUSR


The 'pre-process fex' option mentioned earlier was not going to suit my needs, but I appreciate everyone's advice/help.= on this. I think I'm done.

- ABT


------------------------------------
WF Environment:
------------------------------------
Server/Client, ReportCaster, Dev Studio: 7.6.11
Resource Analyzer, Resource Governor, Library, Maintain, InfoAssist
OS: Windows Server 2003
Application/Web Server: Tomcat 5.5.25
Java: JDK 1.6.0_03
Authentication: LDAP, MRREALM Driver
Output: PDF, EXL2K, HTM

------------------------------------
Databases:
------------------------------------
Oracle 10g
DB2 (AS/400)
MSSQL Server 2005
Access/FoxPro
 
Posts: 561 | Registered: February 03, 2010Reply With QuoteReport This Post
Guru
posted Hide Post
Hey ABT,

I've got the same issue going on here. In reference to your last reply about the "glue", can you tell me where you placed this little procedure? I don't want to use the pre-process either. Thanks.


Webfocus 8
Windows, Linux
 
Posts: 247 | Location: Palm Coast, FL | Registered: February 05, 2010Reply With QuoteReport This Post
Platinum Member
posted Hide Post
Mike,
I believe what ABT did was include the following code at the top of his FEX:

-* SET USER
-IF &FOCFOCEXEC EQ 'RCASTER' THEN GOTO SETUSERRC ELSE GOTO SETUSERMR;

-SETUSERRC
-SET &PDKUSER = &DSTEDAUSER;
-GOTO ENDSETUSR

-SETUSERMR
-SET &PDKUSER = &IBIMR_user;
-GOTO ENDSETUSR

-ENDSETUSR


As a result if the call is from Managed Reporting he grabs the value of IBIMR_user. If the call is from ReportCaster he grabs DSTEDAUSER.


WF 71.x, 76.x, 7701, 8.0 Beta OS: Linux, Win2k3, Win2k, Win2k8, WinXP


 
Posts: 203 | Registered: November 19, 2007Reply With QuoteReport This Post
Guru
posted Hide Post
Doug,
That might not help me much then. I have some users who can create reports and schedules, and I'd really like something transparent that will apply the MR security when they run schedules, because we're using DBA file security on several of our tables. I'd prefer not to have them do the pre-process step that was mentioned in this thread, and I don't want them to have to put that code on the top of their procedures either.


Webfocus 8
Windows, Linux
 
Posts: 247 | Location: Palm Coast, FL | Registered: February 05, 2010Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] &IBIMR_user but for ReportCaster?

Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.