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     Parsing an amper variable

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Parsing an amper variable
 Login/Join
 
<Derek>
posted
Does anyone know the correct way to parse an amper variable. I'm passing in a variable called &CENTER from an html form. I want to extract the first 3 chars. and put them in a like statement. I've tried using EDIT and SUBSTR without success.

I tried to use an edit and receive this error... (FOC002) A WORD IS NOT RECOGNIZED: SUB_CENTER/A3

TABLE FILE TBLLIC_BASE
PRINT
OWNING_ORG
LICENSE_NUMBER
FORMAL_NAME
LICENSE_INITIATED
EXECUTION_DATE
CLOSE_DATE
TITLE

SUB_CENTER/A3 = EDIT(&CENTER, '999*');

WHERE TBLLIC_BASE.OWNING_ORG LIKE 'SUB_CENTER%';


I have also tried this and recived an error saying...(FOC36355) INVALID TYPE OF ARGUMENT #2 FOR USER FUNCTION SUBSTR

DEFINE FILE TBLLIC_BASE
SUB_CENTER/A3=SUBSTR(5, &CENTER, 1, 3, 3, SUB_CENTER);
END;

TABLE FILE TBLLIC_BASE
PRINT
OWNING_ORG
LICENSE_NUMBER
FORMAL_NAME
LICENSE_INITIATED
EXECUTION_DATE
CLOSE_DATE
TITLE
WHERE TBLLIC_BASE.OWNING_ORG LIKE 'SUB_CENTER%';
 
Report This Post
Silver Member
posted Hide Post
try:

-SET &CNTR = EDIT(&CENTER,'999')|'%';

TABLE FILE TBLLIC_BASE
PRINT
OWNING_ORG
LICENSE_NUMBER
FORMAL_NAME
LICENSE_INITIATED
EXECUTION_DATE
CLOSE_DATE
TITLE

WHERE TBLLIC_BASE.OWNING_ORG LIKE '&CNTR';

hth,

drew
 
Posts: 46 | Location: San Francisco, California | Registered: April 14, 2003Report This Post
<Pietro De Santis>
posted
You should be able to do the following:

-SET &SUB_CENTER = EDIT(&CENTER, '999');

Then:

TABLE FILE TBLLIC_BASE
...
WHERE TBLLIC_BASE.OWNING_ORG LIKE '&SUB_CENTER.EVAL%';
END
 
Report This Post
<Derek>
posted
Thanks for the quick response. Pietro's solution worked. It looks like it needed the .EVAL in the like statement.
 
Report This Post
Platinum Member
posted Hide Post
You left out the words AND COMPUTE .
eg.
AND COMPUTE SUB_CENTER/A3 = EDIT(&CENTER, '999*');
 
Posts: 226 | Registered: June 08, 2003Report This Post
Virtuoso
posted Hide Post
quote:
Originally posted by Pietro De Santis:
[qb] ... LIKE '&SUB_CENTER.EVAL%'; ...
[/qb]
.EVAL is not necesary here, and can cause problems if &CENTER's value contains an ampersand.

You need something to avoid interpretation of the "%" as part of the & parameter's name. In cases like this (where an & name abuts a non-blank character that can be part of an & name), use "|" to delimit the & name, as in:

LIKE '&SUB_CENTER|%';
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 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     Parsing an amper variable

Copyright © 1996-2020 Information Builders