Focal Point
[CLOSED SHARING] IBIMR_user variable?

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/6047041326

August 13, 2012, 02:43 PM
Doug
[CLOSED SHARING] IBIMR_user variable?
Would someone please remind me why is it that &IBIMR_user is available when executing a report from within MRE but not when executing the same report from RC?

Executing a report from within MRE:
 CURRENTLY DEFINED & VARIABLES STARTING WITH 'I':
 &IBIAPP_app   = app1 app2 app3 baseapp
 &IBIMR_domain = app1/app1.htm
 &IBIMR_folder =
 &IBIMR_user   = douglaslee
 &INDEXIO      =        0
 &INPUT        =        0
 &INVALID      =        0

Executing a report from RC:
 CURRENTLY DEFINED & VARIABLES STARTING WITH I :
&INDEXIO = 0
&INPUT = 0
&INVALID = 0 

The reason I ask is that I want to determine "who" is executing "this procedure". So, the following should work (unless someone has a better idea):
-DEFAULTH &DSTEDAUSER = 'ExecutedFromRC' 
-DEFAULTH &IBIMR_user = 'ExecutedFromMRE'

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




   In FOCUS Since 1983 ~ from FOCUS to WebFOCUS.
   Current: WebFOCUS Administrator at FIS Worldpay | 8204, 8206
August 13, 2012, 03:07 PM
Severus.snape
Hi,

Might be because when a report is run from RC ..RC will not go thru the WF client component ..so the variables from client component are not sent out to the reporting server. I think it only picks up the FEX from MRE and doesnt execute all the preprocessing steps in the WF client ..like the odin.cfg/cgivars/site.wfs....where all these variables are setup to be PASSed to the reproting server..



thanks
Sashanka


WF 7.7.03/Windows/HTML,PDF,EXL
POC/local Dev Studio 7.7.03 & 7.6.11
August 13, 2012, 04:04 PM
Doug
Thanks for the confirmation, that is what I was thinking... Now, I think that the -DEFAULTH code should be an acceptable work-around either way.
August 15, 2012, 05:13 PM
ABT
Doug,
Consider the following code. It was originally intended to do one thing if executed via BID/Ad Hoc but do something else if executed via ReportCaster. My attempt was to use the same fex to support a manual and adhoc process. If executed manually, it would prompt for values, if executed via ReportCaster, it would hit a routine that calculates a start/end date.

-***********************************************************************
-SET &PGMNAME = 'CPIMPERR';
-SET &RPTNAME = 'Changepoint: Interface Errors';
-SET &ANALYST = 'BLAKE THOMPSON';
-***********************************************************************
-IF &FOCFOCEXEC NE 'RCASTER' THEN GOTO LOGUSER ELSE GOTO SKIPLOG;
-***********************************************************************
-LOGUSER
-* USER is a human coming in through MRE.
-***********************************************************************
-SET &USERID = UPCASE(25,&IBIMR_user,&IBIMR_user);
-SET &GROUPID = 'SOLUTION';
-SET &REPORTID = &PGMNAME;
-SET &UNIQUEID = '';
-MRNOEDIT -INCLUDE RUNEVENT
-*****OPTIONS ARE (UHS, BRT, CHO, HET, OBH, PCMH, RCH) AND (PROTECTED,UNPROTECTED)
-SET &SECURITY = 'UHS UNPROTECTED';
-SET &RPTNAME = &RPTNAME;
-SET &KEYWORDS = 'CHANGEPOINT INTERFACE';
-MRNOEDIT -INCLUDE RPTNAME
-***********************************************************************
-SKIPLOG


-IF &FOCFOCEXEC EQ 'RCASTER' THEN GOTO SETAUTO ELSE GOTO SETMAN;

-SETMAN
-* USER is a human coming in through MRE.
-PROMPT &BEGDATE.Provide the BEGINNING date you wish to see import errors for (yyyymmdd hh:mm:ss):.;
-PROMPT &ENDDATE.Provide the ENDING date you wish to see import errors for (yyyymmdd hh:mm:ss):.;
-GOTO ENDSET


-SETAUTO
-* USER is ReportCaster and must be fed a date parm.
-SET &PB=1;
-MRNOEDIT -INCLUDE SDRYYMD
-SET &BEGDATE = &BKDAYS_YYMD | ' 00:00:00';
-SET &ENDDATE = &BKDAYS_YYMD | ' 23:59:59';
-GOTO ENDSET
-ENDSET


-ENDDATE


SET ASNAMES = ON

-*BEGIN REPORT -------------
TABLE FILE CAR
PRINT
*
END


-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
August 16, 2012, 11:47 AM
nd
The CNCTUSR function seems to return the reportcaster execution ID, if, for some reason, you needed more info

--and if you were setting the execution ID to the MR user who was scheduling the job.


WF: WebFocus 7.7.03
Data: Oracle, MSSQL, DB2
OS: Windows
Output: HTML/AHTML,PDF,EXL2K FORMULA, COMT
August 16, 2012, 12:50 PM
ABT
quote:
Originally posted by nd:
The CNCTUSR function seems to return the reportcaster execution ID, if, for some reason, you needed more info


On 7.6.11, it seems to report the 'Run as' user as &DSTEDAUSER. &DSTOWNER will report who created the RC job.

- 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
August 16, 2012, 01:41 PM
Doug
Good One Thanks, I'll check this out and see if it works for our "situation"...
August 16, 2012, 02:13 PM
Doug
Good One I broke it down to its simpliest form and I Like It Cool
-TYPE *** &|FOCFOCEXEC = &FOCFOCEXEC ***

Branch accordingly...

From MRE:
*** &FOCFOCEXEC = _ADHOCRQ ***

From Report caster:
*** &FOCFOCEXEC = RCASTER  ***
I hope you like it and find it useful Chris.
August 17, 2012, 07:22 AM
ABT
quote:
_ADHOCRQ

I think this only gets displayed when you use the Command Console or execute the fex from Dev Studio in Edit mode. You should get a different value when running it via BID or right-click, run.


------------------------------------
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