Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     MRE 'Name' into Amber-Var?

Read-Only Read-Only Topic
Go
Search
Notify
Tools
MRE 'Name' into Amber-Var?
 Login/Join
 
Platinum Member
posted
When the MRE Admin defines a new MRE user, both the 'Name' (long name with spaces) and the 'UserID' (8char) are supplied and stored in the .htm file inside the basedir directory as
 <A HREF='jdoe' NAME='jdoe'>John Doe</A> 


Can the 'Name' (long form) be gotten into an Dialogue Manager amber-variable?
How?


WIN/2K running WF 7.6.4
Development via DevStudio 7.6.4, MRE, TextEditor.
Data is Oracle, MS-SQL.
 
Posts: 154 | Location: NY | Registered: October 27, 2005Report This Post
Expert
posted Hide Post
$64,000 question.


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Expert
posted Hide Post
Chris
you could write a fex to read that .htm, and do some fancy EDITs (focus funSmiler ) to extract and store a linkage table of shortname-to-longname
and at run time, look up the longname using the MRE userid , which already exists as an &var.

in 7.6n there's a nice set of &vars for fexname, both long and short, but i've not heard of an existing cute &var for long username, so i'ld just do it the above way, for now.




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
Virtuoso
posted Hide Post
Maybe IBI has some surprises for us in Nashville....




Frank

prod: WF 7.6.10 platform Windows,
databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7
test: WF 7.6.10 on the same platform and databases,IE7

 
Posts: 2387 | Location: Amsterdam, the Netherlands | Registered: December 03, 2006Report This Post
Expert
posted Hide Post
Here's something Trav developed a couple of years ago (Report against user.htm?)

This is a Master that describes the MRE User file:
$-------------------------------------------------------------------------------
$  Module Name   : mreuser.mas
$  Description   : Master to describe the contents of the MRE USER HTML file
$  Developed by  : Francis Mariani - Francis Mariani Inc.
$  Date Developed: May 2006
$-------------------------------------------------------------------------------

FILE=MREUSER, SUFFIX=FIX, DATASET=D:\ibi\WebFOCUS53\basedir\user.htm, $

SEGNAME=MRE_LINE, SEGTYPE=S0, $
  FIELD=MRE_LINE, MRE_LINE, A200, A200, MISSING=OFF ,$
$
DEFINE x_LINE_EDIT1/A200 = CTRAN(200, MRE_LINE, BYTVAL('<','I3'), BYTVAL('[','I3'), 'A200');
DEFINE x_LINE_EDIT/A200  = CTRAN(200, x_LINE_EDIT1, BYTVAL('>','I3'), BYTVAL(']','I3'), 'A200');
DEFINE MRE_LINE_TYPE/A10 =
  IF MRE_LINE CONTAINS 'PASSWORD' THEN 'USER' ELSE
  IF MRE_LINE CONTAINS '.htm' AND MRE_LINE CONTAINS 'MRFLAG=' THEN 'DOMAIN' ELSE
  IF MRE_LINE CONTAINS 'A HREF=''#' AND MRE_LINE CONTAINS '<LI' THEN 'USERGROUP' ELSE
  IF MRE_LINE CONTAINS 'A HREF=''#' THEN 'GROUP' ELSE
'LINE';
$
$-- Determine Group attributes
DEFINE x_GRPIS/I4 = POSIT(MRE_LINE, 200, 'HREF=''#', 7, 'I4') + 7;
DEFINE x_GRPIE/I4 = POSIT(MRE_LINE, 200, 'NAME=', 5, 'I4') - 3;
DEFINE x_GROUP_ID/A12 = SUBSTR(200, MRE_LINE, x_GRPIS, x_GRPIE, 12, 'A12');

DEFINE x_GRPMS/I4 = POSIT(x_LINE_EDIT, 200, ']', 1, 'I4') + 1;
DEFINE x_GRPME/I4 = POSIT(x_LINE_EDIT, 200, '[/A]', 4, 'I4') - 1;
DEFINE x_GROUP_NM/A100 = SUBSTR(200, x_LINE_EDIT, x_GRPMS, x_GRPME, 100, 'A100');

DEFINE x_GROUP_IDY/A12  = IF MRE_LINE_TYPE EQ 'GROUP' THEN x_GROUP_ID ELSE '';
DEFINE x_GROUP_NMY/A100 = IF MRE_LINE_TYPE EQ 'GROUP' THEN x_GROUP_NM ELSE '';

DEFINE MRE_GROUP_ID/A12  = IF MRE_LINE_TYPE EQ 'GROUP' THEN x_GROUP_IDY ELSE MRE_GROUP_ID;
DEFINE MRE_GROUP_NM/A100 = IF MRE_LINE_TYPE EQ 'GROUP' THEN x_GROUP_NMY ELSE MRE_GROUP_NM;
$
$-- Determine Domain attributes
DEFINE x_DOMIS/I4 = POSIT(MRE_LINE, 200, '[*]<A HREF=', 12, 'I4') + 13;
DEFINE x_DOMIE/I4 = POSIT(MRE_LINE, 200, '/', 1, 'I4') - 1;
DEFINE x_DOMAIN_ID/A8 = SUBSTR(200, MRE_LINE, x_DOMIS, x_DOMIE, 8, 'A8');

DEFINE x_DOMMS/I4 = POSIT(x_LINE_EDIT, 200, ''']', 2, 'I4') + 2;
DEFINE x_DOMME/I4 = POSIT(x_LINE_EDIT, 200, '[/A]', 4, 'I4') - 1;
DEFINE x_DOMAIN_NM/A100 = SUBSTR(200, x_LINE_EDIT, x_DOMMS, x_DOMME, 100, 'A100');

DEFINE x_DOMAIN_IDY/A13  = IF MRE_LINE_TYPE EQ 'DOMAIN' THEN x_DOMAIN_ID ELSE '';
DEFINE x_DOMAIN_NMY/A100 = IF MRE_LINE_TYPE EQ 'DOMAIN' THEN x_DOMAIN_NM ELSE '';

DEFINE MRE_DOMAIN_ID/A13  = IF MRE_LINE_TYPE EQ 'DOMAIN' THEN x_DOMAIN_IDY ELSE MRE_DOMAIN_ID;
DEFINE MRE_DOMAIN_NM/A100 = IF MRE_LINE_TYPE EQ 'DOMAIN' THEN x_DOMAIN_NMY ELSE MRE_DOMAIN_NM;
$
$-- Determine User attributes
DEFINE x_USEIS/I4   = IF MRE_LINE_TYPE EQ 'USER' THEN POSIT(MRE_LINE, 200, 'NAME=', 5, 'I4') + 6       ELSE 0;
DEFINE x_USEIE/I4   = IF MRE_LINE_TYPE EQ 'USER' THEN POSIT(MRE_LINE, 200, ' MRFLAG=', 8, 'I4') - 2    ELSE 0;
DEFINE x_USER_ID/A8 = IF MRE_LINE_TYPE EQ 'USER' THEN SUBSTR(200, MRE_LINE, x_USEIS, x_USEIE, 8, 'A8') ELSE '';

DEFINE x_USEMS/I4 = IF MRE_LINE_TYPE EQ 'USER' THEN POSIT(x_LINE_EDIT, 200, ''']', 2, 'I4') + 2;
DEFINE x_USEME/I4 = IF MRE_LINE_TYPE EQ 'USER' THEN POSIT(x_LINE_EDIT, 200, '[/A]', 4, 'I4') - 1;
DEFINE x_USER_NM/A100 = SUBSTR(200, x_LINE_EDIT, x_USEMS, x_USEME, 100, 'A100');

DEFINE x_USEES/I4     = IF MRE_LINE_TYPE EQ 'USER' THEN POSIT(x_LINE_EDIT, 200, 'email=', 6, 'I4') + 6      ELSE 0;
DEFINE x_USEEE/I4     = IF MRE_LINE_TYPE EQ 'USER' THEN POSIT(x_LINE_EDIT, 200, ' PASSWORD=', 10, 'I4') - 2 ELSE 0;
DEFINE x_USER_EM/A100 = IF MRE_LINE_TYPE EQ 'USER' AND x_USEES GT 7 THEN SUBSTR(200, x_LINE_EDIT, x_USEES, x_USEEE, 100, 'A100') ELSE '';

DEFINE x_USER_IDY/A13  = IF MRE_LINE_TYPE EQ 'USER' THEN x_USER_ID ELSE '';
DEFINE x_USER_NMY/A100 = IF MRE_LINE_TYPE EQ 'USER' THEN x_USER_NM ELSE '';

DEFINE MRE_USER_ID/A13  = IF MRE_LINE_TYPE EQ 'USER' THEN x_USER_IDY ELSE MRE_USER_ID;
DEFINE MRE_USER_NM/A100 = IF MRE_LINE_TYPE EQ 'USER' THEN x_USER_NMY ELSE MRE_USER_NM;

DEFINE MRE_USER_EMAIL/A100 = IF MRE_LINE_TYPE EQ 'USER' THEN x_USER_EM ELSE MRE_USER_EMAIL;
$
$-- Determine User MRE parameters
DEFINE x_PMS/I4 = IF MRE_LINE_TYPE EQ 'USER' THEN POSIT(MRE_LINE, 200, 'MRFLAG=', 7, 'I4') + 8 ELSE 0;
DEFINE x_PME/I4 = IF MRE_LINE_TYPE EQ 'USER' THEN POSIT(MRE_LINE, 200, '''>', 2, 'I4') - 1     ELSE 0;
DEFINE x_PML = x_PME - x_PMS + 1;
DEFINE x_PARMS/A60 = IF MRE_LINE_TYPE EQ 'USER' THEN SUBSTR(200, MRE_LINE, x_PMS, x_PME, x_PML, 'A60') ELSE '';

DEFINE MRE_PARMS_RC/A3 = IF x_PARMS CONTAINS 'rcadmin' THEN 'Yes' ELSE 'No';
  TITLE='Caster,Administrator', $
DEFINE MRE_PARMS_LI/A3 = IF x_PARMS CONTAINS 'library' THEN 'Yes' ELSE 'No';
  TITLE='Library', $
DEFINE MRE_PARMS_AD/A3 = IF x_PARMS CONTAINS 'admin' THEN 'Yes' ELSE 'No';
  TITLE='Administrator', $
DEFINE MRE_PARMS_US/A3 = IF x_PARMS CONTAINS 'user' THEN 'Yes' ELSE 'No';
  TITLE='User', $
DEFINE MRE_PARMS_AC/A3 = IF x_PARMS CONTAINS 'active' THEN 'Yes' ELSE 'No';
  TITLE='Active', $
DEFINE MRE_PARMS_RO/A3 = IF x_PARMS CONTAINS 'robot' THEN 'Yes' ELSE 'No';
  TITLE='Robot?', $
$
$-- Determine User Group attributes
DEFINE x_UGRIS/I4 = IF MRE_LINE_TYPE EQ 'USERGROUP' THEN POSIT(MRE_LINE, 200, 'HREF=''#', 7, 'I4') + 7;
DEFINE x_UGRIE/I4 = x_UGRIS + 12;
DEFINE x_UGROUP_ID/A12 = SUBSTR(200, MRE_LINE, x_UGRIS, x_UGRIE, 12, 'A12');

DEFINE x_UGRMS/I4 = POSIT(x_LINE_EDIT, 200, ''']', 2, 'I4') + 2;
DEFINE x_UGRME/I4 = POSIT(x_LINE_EDIT, 200, '[/A]', 4, 'I4') - 1;
DEFINE x_UGROUP_NM/A100 = SUBSTR(200, x_LINE_EDIT, x_UGRMS, x_UGRME, 100, 'A100');

DEFINE x_UGROUP_IDY/A12  = IF MRE_LINE_TYPE EQ 'USERGROUP' THEN x_UGROUP_ID ELSE '';
DEFINE x_UGROUP_NMY/A100 = IF MRE_LINE_TYPE EQ 'USERGROUP' THEN x_UGROUP_NM ELSE '';

DEFINE MRE_UGROUP_ID/A12  = IF MRE_LINE_TYPE EQ 'USERGROUP' THEN x_UGROUP_IDY ELSE MRE_UGROUP_ID;
DEFINE MRE_UGROUP_NM/A100 = IF MRE_LINE_TYPE EQ 'USERGROUP' THEN x_UGROUP_NMY ELSE MRE_UGROUP_NM;

This code will print the user and name:

TABLE FILE MREUSER
PRINT
MRE_USER_ID MRE_USER_NM
WHERE MRE_LINE_TYPE EQ 'USER'
END

You could use this to create a FOCUS database that contains just these two fields. You could also add other user attribute, like email address.

Here's something similar with mre basedir:

how to list reports in a dashboard block

A couple of very valuable freebies. Of course I haven't tested these in anything above 5.3.2.


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Expert
posted Hide Post
well, guess what...in version 7
there are MRE extract utilities
that will get you User info, Domain info, etc.
Go read the MRE ADMIN manual, start on page 156.
The extract utility mrextract.bat
found in the webfocus76/utilities directory
will create the comma-delimited extract files for you.
The masters for them are in the ibisamp dir.
IBIMRUSR.MAS for your example, Chris.
And in the manual there are a couple of fex examples to read the lists.
Hmmm....As Tony says, pays to RTFM Wink




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
Expert
posted Hide Post
Susannah,

Those extract utilities have been around since at least 5.2. That is when I first used them.


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
 
Posts: 2723 | Location: Ann Arbor, MI | Registered: April 05, 2006Report This Post
Expert
posted Hide Post
I have never understood why MRE information is stored in HTML files and not in a database, like ReportCaster information.


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Expert
posted Hide Post
I don't think I would use the MRE Extract programs on the fly, just to find the name of the logged-in user...


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Master
posted Hide Post
Is this how you assign an 'Amber' Variable?

-SET &VARIABLE='Name' ;



Server: WF 7.6.2 ( BID/Rcaster) Platform: W2003Server/IIS6/Tomcat/SQL Server repository Adapters: SQL Server 2000/Oracle 9.2
Desktop: Dev Studio 765/XP/Office 2003 Applications: IFS/Jobscope/Maximo
 
Posts: 888 | Location: Airstrip One | Registered: October 06, 2006Report This Post
Expert
posted Hide Post
LOL. I was waiting for someone to make a wisecrack about that. I just couldn't think of a good one.

Great job, John!


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
 
Posts: 2723 | Location: Ann Arbor, MI | Registered: April 05, 2006Report This Post
Platinum Member
posted Hide Post
Thanks, all, for your suggestions.

I can see that this is a tougher thing to do than I expected.

I'll go the simpler AmberVar-in-Profile route and add my own &&var to the profiles of users needing this ability (with a default value set in EDASPROF.cfg).

Chris


WIN/2K running WF 7.6.4
Development via DevStudio 7.6.4, MRE, TextEditor.
Data is Oracle, MS-SQL.
 
Posts: 154 | Location: NY | Registered: October 27, 2005Report This Post
Expert
posted Hide Post
Frankie, no i wouldn't either. That wasn't my intention.. i meant extract it once a day, say, and construct a lookup table of userid to longname...then at fexecution time, take the current MRE USER ID and decode out the &longname from that lookup table.
See?




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
Expert
posted Hide Post
Absolutely!


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     MRE 'Name' into Amber-Var?

Copyright © 1996-2020 Information Builders