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.
I want the fist 48 characters of STUNAME2, including the commas. EDIT seems to be stopping at the first comma it sees. Is that right? Any other ideas?
The example below probably isn't going to look to good, but you can see that STUNAME2 has 'N, Hall' and what STU)NAME has is 'N,'
This happens with 7.6.8 and 7.6.10 Dev. Studio with 7.6.11 server
DEFINE FILE SPRIDEN
STUNAME2/A185 = SPRIDEN_LAST_NAME||', '|SPRIDEN_FIRST_NAME||' '|SPRIDEN_MI;
STU_NAME/A48 = EDIT(STUNAME2,'999999999999999999999999999999999999999999999999');
END
TABLE FILE SPRIDEN
PRINT
STUNAME2
SPRIDEN_LAST_NAME
SPRIDEN_FIRST_NAME
SPRIDEN_MI
STU_NAME
IF RECORDLIMIT EQ 100
END
STUNAME2 SPRIDEN_LAST_NAME SPRIDEN_FIRST_NAME SPRIDEN_MI STU_NAME N, Hall N Hall . N, Den, Lennox Den Lennox . Den,This message has been edited. Last edited by: Rick Man,
Reporting Server 7.6.10 Dev. Studio 7.6.8 Windows NT Excel, HTML, PDF
Thanks WAZ; however that didn't work either. The plot thickens. What I think is happening is that the strong concatenation isn't working, or at least the way I thought it would. So what it is actually doing is taking th e48 bytes out of the 60 byte LAST_NAME field. Making it appear that it isn't working. When I change to use the parenthesis to concatenate the comma and blank it works. I'll paste the HTML output but it'll be ugly. ASTU_NAME and BSTU_NAME are the output fields.
I am confused about how strong comcatenation works though.
ASTUNAME2 BSTUNAME2 SPRIDEN_LAST_NAME SPRIDEN_FIRST_NAME SPRIDEN_MI ASTU_NAME BSTU_NAME STU_NAME2 N, Hall N, Hall N Hall . N, Hall N, N, Hall Den, Lennox Den, Lennox Den Lennox . Den, Lennox Den, Den, Lennox Cozort, Claudia Marie Cozort, Claudia Marie Cozort Claudia Marie Cozort, Claudia Marie Cozort, Cozort, Claudia Marie Aiden, White Aiden, White Aiden White . Aiden, White Aiden, Aiden, White Allen Eleanor, Inc., Allen Eleanor, Inc., Allen Eleanor, Inc. . . Allen Eleanor, Inc., Allen Eleanor, Inc., Allen Eleanor, Inc.,
Reporting Server 7.6.10 Dev. Studio 7.6.8 Windows NT Excel, HTML, PDF
SPRIDEN_LAST_NAME||', ' moves the comma to the point where the trailing blanks in the Last Name value begin, followed by all the original trailing blanks.
|SPRIDEN_FIRST_NAME then appends the First name field to the result so far -- meaning, after those trailing blanks.You can figure out the rest.
How did well all miss that?
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005
SQUEEZ may work, but when you're focused on what you've used to all your FOCUS/WebFOCUS life you expect it to work. It appears that the line is evaluated/interpreted right to left rather than left to right.
Maybe an IBIer will pick this up and help explain it.
Reporting Server 7.6.10 Dev. Studio 7.6.8 Windows NT Excel, HTML, PDF
@JG: My point was that the result Rick got is correct, and we (not QA) dozed off.
The output of the hard concat operator (||) has the same length as soft concat (|) -- viz., the sum of lengths of its two operands; the only difference is the placement of the characters: || shifts the trailing blanks of its first operand to the end of its result, | does not. This is true of intermediate results, as well as the final result.
When the result of || is used as first operand of |, as in
D = A || B | C
, which is equivalent to
D = (A || B) | C
, the trailing blanks from the particular values of A and B will be placed immediately before the value of C -- and the content of C will in fact have a fixed position in the result, regardless of the content of A and B.
To keep the visible content of A, B, and C together (i.e., to keep all their trailing blanks "trailing" in the result), you have to keep using hard catenation. So Rick can get the desired result with