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     [Solved] &&FOCSECUSER and a DEFINE error in my MFD

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[Solved] &&FOCSECUSER and a DEFINE error in my MFD
 Login/Join
 
Guru
posted
I'm using &&FOCSECUSER in my DBA security. I have it in my MFDs as a variable, then later on I need to do a DEFINE to get upper case and a substring starting in position 5, because I want to skip over the 'pth/' part of the variable. I tried several variations of this, but the error remains. Below is what I did (generalized), which works. However, in the synonym canvas of App Studio the CURRENT_USER field (the DEFINE) shows in red, and by looking at the properties the error is

(FOC101) ERROR IN DEFINE IN MASTER FILE: CURRENT_USER
(FOC36335) PARAMETER LENGTH CONFLICT IN FUNCTION "SUBSTRING", ARG 1.

When I save the MFD, App Studio displays a warning that it failed validation, but I can say OK and it will save, and the thing actually does work when I access the MFD.

So, 2 questions:

1 - How do I make the error go away (just to make me feel good)
2 - Does anyone know where these FOC errors (all of them) are defined? I tried the technical library but no entry for the 36335 error.


FILENAME=thefile, SUFFIX=SQLORA ,
REMARKS='Data File', $
VARIABLE NAME=&&FOCSECUSER, USAGE=A50V, $
SEGMENT=thesegment, SEGTYPE=S0,
DESCRIPTION='the description', $
FIELDNAME=USER_ID, ALIAS=USER_ID, USAGE=A50V, ACTUAL=A50V, ACCESS_PROPERTY=(INTERNAL),
TITLE='UserID', DESCRIPTION='User ID - Key Field', $
DEFINE CURRENT_USER/A50V=UPPER( SUBSTRING( '&&FOCSECUSER', 5, 46 ) );
DESCRIPTION='User ID', $
END
DBA=thedbapassword, $
USER=A, ACCESS=R, RESTRICT=VALUE_WHERE, NAME=SYSTEM, VALUE=USER_ID EQ CURRENT_USER;, $

Solution:

I opened a ticket with IBI, and John Cullen sent me an idea that worked. It has to do with the subroutine not resolving the length, so he added an intermediate DEFINE like below. The intermediate define has a known length of 50 now (the &&FOCSECUSER did not have a known length). And this gets converted to SQL properly so you get aggregation done at the DBMS level.

DEFINE FOCSECUSER/A50='&&FOCSECUSER'; ACCESS_PROPERTY=(INTERNAL),
DESCRIPTION='This is an intermediary define to get the logged-on user.', $

DEFINE CURRENT_USER/A50=UPPER( SUBSTRING( FOCSECUSER, 5, 45 ) ); ACCESS_PROPERTY=(INTERNAL),
DESCRIPTION='Returns the logged-on user. For DBA securirty purposes.', $

This message has been edited. Last edited by: Mike in DeLand,


Webfocus 8
Windows, Linux
 
Posts: 258 | Location: Palm Coast, FL | Registered: February 05, 2010Report This Post
Virtuoso
posted Hide Post
In the Text Editor, type ? Error Number and you get a little more detail.

? 36335 returned the following:

(FOC36335) PARAMETER LENGTH CONFLICT IN FUNCTION "%1", ARG %2.
The parameter length of a user function or a directive is either
below or above enforced limits or conflicts with the length
provided as a constant in another parameter.


WebFOCUS 8206, Unix, Windows
 
Posts: 1853 | Location: New York City | Registered: December 30, 2015Report This Post
Guru
posted Hide Post
DOH! I totally forgot about that. Thanks!


Webfocus 8
Windows, Linux
 
Posts: 258 | Location: Palm Coast, FL | Registered: February 05, 2010Report This Post
Expert
posted Hide Post
does 8 have different functional forms?
I see
SUBSTR(length, source_string, start, end, sublength, output)
as the functional form for the SUBSTR function, but I'm reading a 7705 functions manual.




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
Yes, they are called Simplified Character Functions introduced in 8.x. According to the manual, they have streamlined parameter lists, similar to those used by SQL functions and don't have output arguments. Instead each function has a specified data type.

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


WebFOCUS 8206, Unix, Windows
 
Posts: 1853 | Location: New York City | Registered: December 30, 2015Report 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     [Solved] &&FOCSECUSER and a DEFINE error in my MFD

Copyright © 1996-2020 Information Builders