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.
and you've tried fiddling with the RECFM in the output filedef? making it V for VARiable length records, not F? I'm not suggesting that this will work, tho, Francis, just adding it to the list of tinkerables. and then there's the output csv file.. it's compacted...no trailing spaces on any of the fields...If your output file has only 1 field, maybe try FORMAT COMMA
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003
as i recall, parms to a filedef are preceeded by a left paren FILEDEF mastername DISK D:\IBI\...\filename.txt (RECFM V LRECL 80 totally inelegant, but works: FILEDEF TRYTHAT DISK D:\IBI\APPS\AS400\TRYTHAT.FTM (RECFM V TABLE FILE somesourcefile PRINT field ON TABLE HOLD AS TRYTHIS FORMAT ALPHA END -RUN -SET &KOUNTER = 0 ; -TOPLOOP -READ TRYTHIS &NAME1.A26 -SET &KOUNTER = &KOUNTER + 1 ; -SET &NAME2 = TRIM('T', &NAME1, 26 , ' ' , 1 , A26 ); -WRITE TRYTHAT &NAME1 -IF &KOUNTER EQ 10 GOTO ENDLOOP ; -GOTO TOPLOOP; -ENDLOOP
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003
COM and COMT don't truncate the field width. They look like they do, but then when you open the file in textpad, you'll see that the field is still the same width. i thought they did, too. but , alas. t'was wishful coding. Triming the field in dialog manager and -WRITEing it does works, when you open the file in textpad, each record is only as long as it needs to be. But what an inelegant solution! As much help as Francis gives all of us, i wish we could come up with something cooler for him.
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003
In my particular case, the trailing blanks are harmless, but there should be an elegant way to do this, withour resorting to Dialog Manager.
By the way, when I use an AnV formatted field, the resulting HOLD file has the length of the data as the first six characters of each row, but the data is still not trimmed.
Susannah, thanks for trying, I appreciate the suggestions.
"If the [output] format is AnV, the length is set equal to the number of characters left after trimming."
(http://techsupport.ibi.com/ibase/masterindex/html/html_iway71/dmfunctions_71/var_chara6.htm)This message has been edited. Last edited by: <Maryellen>,
- Jack Gross WF through 8.1.05
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005
I assume TRIMV requires an AnV field as output. WHen I try that, the length of the data is prepended to the beginning of the data - this is worse than having the trailing blanks.
TABLE FILE EQ_DATA1 PRINT COMPUTE EQ_DATAS/A400 = SQUEEZ(1000, SQL_COMMAND, 'A400'); NOPRINT COMPUTE EQ_DATAT/A400V = TRIMV('T', EQ_DATAS, 400, ' ', 400, EQ_DATAT); ON TABLE SAVE AS EQ_DATA END