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     amp variable length problem?

Read-Only Read-Only Topic
Go
Search
Notify
Tools
amp variable length problem?
 Login/Join
 
Member
posted
The amp variable, &CN_NBR_D, contains a list of customers separated by commas. If the list has about 8 or less customers, the code below executes just fine. Anything over 9 or 10 (it varys) results in a server error.


-IF &CN_NBR EQ 0 GOTO DEF05;
CNNBR/A2000 = 'Receiver(s): '|
'&CN_NBR_D';
-DEF05

I thought maybe it was a line length problem as we are running 4.3.6. However, even 8 customers is over 80 characters.
 
Posts: 6 | Registered: March 07, 2005Report This Post
Expert
posted Hide Post
I had a similar(ish) problem in 5.3.2 when I was trying to split
a variable length variable (
from 0 to over 400) into chunks of 54 chars to
display in a heading.
I eventually used the following -
[code]-SET &parmlen = IF &CN_NBR_D.LENGTH LT 54 THEN &CN_NBR_D.LENGTH ELSE 54;
-SET &Rep_Parms1 = SUBSTR(&CN_NBR_D.LENGTH,'&CN_NBR_D.EVAL',1
,&parmlen,54,'A54');

-SET &parmlen = IF &CN_NBR_D.LENGTH
LT 109 THEN &CN_NBR_D.LENGTH ELSE 109;

-SET &Rep_Parms2 = IF &CN_NBR_D.LENGTH GE 055 THEN SUBSTR(&CN_NBR_D.LENGTH,
'&CN_NBR_D.EVAL',55,&parmlen,54,'A54')
ELSE ''; -SET &parmlen = IF &CN_NBR_D.LENGTH LT 164 THEN &CN_NBR_D.LENGTH ELSE 164;

-SET &Rep_Parms3 = IF &CN_NBR_D.LENGTH GE 110 THEN SUBSTR(&CN_NBR_D.LENGTH,'&CN_NBR_D.EVAL',
110,&parmlen,54,'A54') ELSE '';
-SET &parmlen = IF &CN_NBR_D.LENGTH LT
219 THEN &CN_NBR_D.LENGTH ELSE 219;
-SET &Rep_Parms4 = IF &CN_NBR_D.LENGTH GE 165 THEN SUBSTR
(&CN_NBR_D.LENGTH,'&CN_NBR_D.EVAL',165,&parmlen,54,'A54') ELSE ''; -SET &parmlen = IF &CN_NBR_D.LENGTH LT 274 THEN &CN_NBR_D.LENGTH ELSE 274;


-SET &Rep_Parms5 = IF &CN_NBR_D.LENGTH GE 220 THEN SUBSTR
(&CN_NBR_D.LENGTH,'&CN_NBR_D.EVAL',220,&parmlen,54,'A54') ELSE '';

-SET &parmlen = IF &CN_NBR_D.LENGTH LT 329 THEN &CN_NBR_D.LENGTH ELSE 329;

-SET &Rep_Parms6 = IF &CN_NBR_D.LENGTH GE 375 THEN SUBSTR
(&CN_NBR_D.LENGTH,'&CN_NBR_D.EVAL',275,&parmlen,54,'A54') ELSE '';

-SET &parmlen = IF &CN_NBR_D.LENGTH LT 384 THEN &CN_NBR_D.LENGTH ELSE 384;


-SET &Rep_Parms7 = IF &C
N_NBR_D.LENGTH GT 330 THEN SUBSTR
(&CN_NBR_D.LENGTH,'&CN_NBR_D.EVAL',330,&parmlen,54,'A54') ELSE '';


This message has been edited. Last edited by: <Mabel>,



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Expert
posted Hide Post
This may not help at all, but have you tried this?

-IF &CN_NBR EQ 0 GOTO DEF05;

-SET &CN_NBR_DX = 'Receiver(s): ' | &CN_NBR_D;

CNNBR/A2000 = '&CN_NBR_DX';
-DEF05
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Expert
posted Hide Post
I suppose the main thing is to confirm what error message or number you are receiving.


Depending upon the error, say it was incompatible format or unbalanced string lengths (left and right sides), then the other test is to check the length of the variable that you are trying to insert into your DEFINE. But I bet you've done that already?

What is the exact error you are getting - and please let it not be "EDA No data" !!!

Also, we know the release, but what platform?

In an attempt to reproduce your error, I've just run the following code through on WebFOCUS 5.3.2 and received no problems -
-DEFAULT &CN_NBR = 49 ;
-DEFAULT &CN_NBR_D = '' ;
-DEFAULT &Cnt = 0 ;
-REPEAT :Loop1 &CN_NBR TIMES
-SET &Cnt = &Cnt + 1 ;
-SET &CN_NBR_D = &CN_NBR_D | ',Customer Account ' | &Cnt ;
-:Loop1
-TYPE &CN_NBR_D.LENGTH

DEFINE FILE CAR
-IF &CN_NBR EQ 0 GOTO DEF05;
CNNBR/A2000 = 'Receiver(s): '|'&CN_NBR_D';
-DEF05
END
TABLE FILE CAR
PRINT CNNBR
BY COUNTRY NOPRINT
IF RECORDLIMIT EQ 1
END

This message has been edited. Last edited by: <Maryellen>,



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Member
posted Hide Post
The string length I'm trying to execute is greater than 450.

Unfortunately, I don't get a WebFocus error. Just a "500 Internal Server Error" - the resource you requested generated an undertermined server error.
 
Posts: 6 | Registered: March 07, 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     amp variable length problem?

Copyright © 1996-2020 Information Builders