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     concatenate with blank at end

Read-Only Read-Only Topic
Go
Search
Notify
Tools
concatenate with blank at end
 Login/Join
 
Member
posted
Hi

I have a rtf text file that I read with a suffix:fix master
containing 1 field

FILE=OffertMall, SUFFIX=FIX
SEGNAME=ROOT_SEG, SEGTYPE=S1, $
FIELD=FIELD1, ALIAS=FIELD1, USAGE=A256, ACTUAL=A256, $

In a define I would like to concatenate the text (FIELD1) with '")' at the end.
My problem is that sometimes a row from the file ends with a blank,
sometimes it doesn't (Can FOCUS recognize that in a text file ?).
The rows can be of different length.

I need to preserve the last blank in the concatenation when it's there.
I finally write the rows on a new file.
It should look like this when it's done.

abcdefg ")
hijklmn asd s sdasdasd")
jdfjj sdasdas ")
asdadadasda")

Any help appreciated !
regards
/T
 
Posts: 5 | Registered: December 10, 2003Report This Post
Platinum Member
posted Hide Post
Concatenate with the | character. This should preserve the trailing spaces. To remove trailing spaces, concatenate with ||.

Sean


------------------------------------------------------------------------
PROD: WebFOCUS 7.6.2 on Unix AIX/Tomcat/Servlet Mode
TEST: WebFOCUS 7.6.2 on Unix AIX/Tomcat/Servlet Mode
 
Posts: 210 | Location: Ottawa | Registered: November 03, 2005Report This Post
Master
posted Hide Post
WF Wont recognise a trailing blank for A256 field because this assumes that all fields are padded out to length 256 with blanks.

If the file is variable length this master will not work. Try a delimited file and A256V type fields since it should recognise cf lf as the end of the record.



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
<lfrerker>
posted
I had to specify variable length in my filedef for blank spaces at the end of my fields to be perserved. I could not get it to work with variable length records when computing/defining the fields so I set the LRECL to my largest record. In my program I actually build a flat file one row at a time appending to my file that I have filedef'd. Here is a snippet of my code -- hope it helps:

FILEDEF EMPSAV DISK /opt/ibi/webfocus/ibi/apps/allhlds/EMPSAV.FTM (LRECL 68 RECFM V


DEFINE FILE EMPHLD
BLSPC1/A1 = ' ';
BLSPC2/A2 = ' ';
BLSPC4/A4 = ' ';
BLSPC15/A15 = ' ';
A_FILLER/A10 = ' ';
B_FILLER/A9 = '000000000';
END
TABLE FILE EMPHLD
PRINT PLAN_NBR NOPRINT
COMPUTE RECID/A61 = PLAN_NBR | BLSPC2 | EMP_SSN | '04' | '1' | EMP_STREET_LINE1 | BLSPC1 ;
BY PLAN_NBR
BY EMP_CODE
BY EMP_SSN
BY PAY_FREQ
ON TABLE SET HOLDLIST PRINTONLY
ON TABLE SAVE AS EMPSAV FORMAT ALPHA
END
 
Report This Post
Member
posted Hide Post
Thanks for your suggestions,
but I haven't manage to solve the problem yet.

It should be possible somehow to read a row until cr lf.

regards

/Tomas
 
Posts: 5 | Registered: December 10, 2003Report 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     concatenate with blank at end

Copyright © 1996-2020 Information Builders