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.
Hi all I am looking for help with a DFIX file that we re preparing for a feed to a third party application the reqirements are quite rigid that they want a pipe delimited file with no spaces. I chose DFIX because attempting to do concatenations gave me leading or triling spaces. the DFIX works quite well except in regards to null values. when I have empty fields I have spaces between the pipes. | | Anyone have have any tips or insight as to how i could remove these?
the code is faily complex so I will only show the last pass through the data. My hold files are default until thsi point which should be alpha.
-*************JOIN ALL TOGETHER AND ADD HONORS AND SPORT**************************************************************** JOIN CLEAR * JOIN LEFT_OUTER HOLDSUMMA2.HOLDSUMM.PIDM_KEY IN HOLDSUMMA2 TO UNIQUE GOREMAL.GOREMAL.GOREMAL_PIDM IN GOREMAL TAG J20 AS J20 END JOIN LEFT_OUTER HOLDSUMMA2.HOLDSUMM.PIDM_KEY IN HOLDSUMMA2 TO UNIQUE HOLDSPRT.HOLDSPRT.SGRSPRT_PIDM IN HOLDSPRT TAG J11 AS J11 END JOIN LEFT_OUTER HOLDSUMMA2.HOLDSUMM.PIDM_KEY IN HOLDSUMMA2 TO UNIQUE HOLDHON.HOLDHON.RRRAREQ_PIDM IN HOLDHON TAG J13 AS J13 END DEFINE FILE HOLDSUMMA2 BUILDING/A30= IF HOLDSUMMA2.HOLDSUMM.DEF_BUILD EQ ' ' THEN 'Off Campus' ELSE HOLDSUMMA2.HOLDSUMM.DEF_BUILD; DUMMY/A4='N/A'; D_MONTH/M=DEFDOB; DEF_MONTH_ALPHA/A2=EDIT(D_MONTH); D_DAY/D=DEFDOB; DEF_DAY_ALPHA/A2=EDIT(D_DAY); D_YEAR/YY=DEFDOB; DEF_YEAR_ALPHA/A4=EDIT(D_YEAR); DEF_ALPHA_DATE/A10=DEF_YEAR_ALPHA || '-' ||DEF_MONTH_ALPHA || '-' ||DEF_DAY_ALPHA; DEF_TODAY/YYMD=&YYMD; D_MONTH_TODAY/M=DEF_TODAY; DEF_MONTH_ALPHA1/A2=EDIT(D_MONTH_TODAY); D_DAY_TODAY/D=DEF_TODAY; DEF_DAY_ALPHA1/A2=EDIT(D_DAY_TODAY); D_YEAR_TODAY/YY=DEF_TODAY; DEF_YEAR_ALPHA1/A4=EDIT(D_YEAR_TODAY); DEF_ALPHA_DATE1/A10=DEF_YEAR_ALPHA1 || '-' ||DEF_MONTH_ALPHA1 || '-' ||DEF_DAY_ALPHA1; DEF_GEN/A6=DECODE HOLDSUMMA2.HOLDSUMM.GENDER( F Female M Male ELSE '' ); DEF_ATH/A12=IF J11.HOLDSPRT.SGRSPRT_ACTC_CODE EQ ' ' THEN 'Not Athlete' ELSE J11.HOLDSPRT.SGRSPRT_ACTC_CODE ; DEF_HON/A24=IF J13.HOLDHON.RTVTREQ_SHORT_DESC EQ ' ' THEN 'Not Honors' ELSE J13.HOLDHON.RTVTREQ_SHORT_DESC ; END -*************FORMAT DISPLAY WITH HYPHENS IN DATES APPENS SYSDATE FOMRATTED WITH HYPHENS**************************************** TABLE FILE HOLDSUMMA2 PRINT HOLDSUMMA2.HOLDSUMM.ID HOLDSUMMA2.HOLDSUMM.GOBTPAC_EXTERNAL_USER HOLDSUMMA2.HOLDSUMM.LASTN HOLDSUMMA2.HOLDSUMM.FIRSTN HOLDSUMMA2.HOLDSUMM.SPRIDEN_MI HOLDSUMMA2.HOLDSUMM.DEF_ALPHA_DATE HOLDSUMMA2.HOLDSUMM.DEF_GEN HOLDSUMMA2.HOLDSUMM.ETHN_DESC HOLDSUMMA2.HOLDSUMM.BUILDING HOLDSUMMA2.HOLDSUMM.CK_BED_SPACE HOLDSUMMA2.HOLDSUMM.ADDRESSCB HOLDSUMMA2.HOLDSUMM.CITYCB HOLDSUMMA2.HOLDSUMM.STATCB HOLDSUMMA2.HOLDSUMM.ZIPCB HOLDSUMMA2.HOLDSUMM.PHONELO HOLDSUMMA2.HOLDSUMM.PHONECE HOLDSUMMA2.HOLDSUMM.ADDRESSPR HOLDSUMMA2.HOLDSUMM.CITYPR HOLDSUMMA2.HOLDSUMM.STATPR HOLDSUMMA2.HOLDSUMM.ZIPPR HOLDSUMMA2.HOLDSUMM.PHONEPR HOLDSUMMA2.HOLDSUMM.PHOMEM J20.GOREMAL.GOREMAL_EMAIL_ADDRESS HOLDSUMMA2.HOLDSUMM.ADVISOR HOLDSUMMA2.HOLDSUMM.INST_PTGPA_GPA HOLDSUMMA2.HOLDSUMM.INST_LGPA_GPA DEF_ATH DUMMY DEF_HON DUMMY DEF_ALPHA_DATE1 BY HOLDSUMMA2.HOLDSUMM.ID NOPRINT BY HIGHEST J20.GOREMAL.GOREMAL_ACTIVITY_DATE NOPRINT WHERE ( J20.GOREMAL.GOREMAL_EMAL_CODE EQ 'UNIS' ) AND ( J20.GOREMAL.GOREMAL_STATUS_IND NE 'I' ); ON TABLE SET PAGE-NUM NOLEAD ON TABLE NOTOTAL ON TABLE PCHOLD AS OUT1 FORMAT DFIX DELIMITER | END
thanksThis message has been edited. Last edited by: Geoff Fish,
construct your entire record as one variable, pipes and all. use STRIP command to make sure you haven't got anything you don't want. FILEDEF your output as a .CSV file extension, and SAVE it, or HOLD FORMAT ALPHA
In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003
Yes, I suggest using the three together (with HOLDMISS=ON). If that doesn't work, the next step would be to ensure that all fields that may have missing values are defined with the MISSING=ON attribute (either in the master/synonym or in the DEFINE). Try it with a single field first. If it still doesn't work, then possible work-arounds might be susannah's suggestion, or a -READ/STRREP/-WRITE repeat loop following your DFIX HOLD to replace '| |' with '||'.
WebFOCUS 7.7.05
Posts: 1213 | Location: Seattle, Washington - USA | Registered: October 22, 2007
It may just be a case of defining the field correctly using MISSING ON instead of setting the value to '' -
DEFINE FILE CAR
NEW_DCOST/D12 MISSING ON = IF COUNTRY NE 'ENGLAND' THEN DCOST ELSE MISSING;
END
TABLE FILE CAR
SUM RCOST
COMPUTE NEW_RCOST/D12 MISSING ON = IF COUNTRY EQ 'ENGLAND' THEN RCOST ELSE MISSING;
COMPUTE NEW_TEXT/A3 = IF COUNTRY EQ 'ENGLAND' THEN 'ENG' ELSE '';
NEW_DCOST
DCOST
BY COUNTRY
BY CAR
BY MODEL
ON TABLE HOLD AS MYDFIX FORMAT DFIX DELIMITER |
END
-RUN
CMD TYPE mydfix.ftm
Works with either PCHOLD or HOLD output.
T
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, 2004
As a backup plan , you can build the pipe delimited line in a define, etc, and use PUTDDREC to write the line to a file, with the 4th parameter (String length) set using ARGLEN to remove the trailing spaces.