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.
We want a null or missing condition rather than a zero.
Here is the code: SET ALL = PASS JOIN PIN IN EMPDATA TO ALL PIN IN TRAINING END -* DEFINE FILE EMPDATA HDATE/MDYY MISSING ON = DATECVT(HIREDATE,'A8YYMD','MDYY'); SDATE/MDYY MISSING ON = DATECVT(COURSESTART,'A8YYMD','MDYY'); DAYS/D9.1 MISSING ON NEEDS ALL DATA = DATEDIF(SDATE,HIREDATE,'D'); END -* TABLE FILE EMPDATA PRINT PIN DEPT HIREDATE COURSESTART COURSECODE DAYS ON TABLE HOLD AS HOLD1 END -* TABLE FILE HOLD1 COMPUTE AVE.DAYS BY DEPT END
For pin #30 coursecode #NAMA730 we are getting the null condition correctly since a record does exist in the child table. However, for pin #20, since there is no child record the cooursestart is "populating" with a zero giving us an incorrect DAYS difference. How can we get the zero to be a null so that our DAYS calculate properly?This message has been edited. Last edited by: <Kathryn Henning>,
I don't think I understand correctly what exactly you need. The sample output you attached is also very hard to read due to the font size being used. Please edit your post and enclose your code and "desired result" in CODE tags.
Anyway, run this code and analyze the resulting data:
SET ALL = PASS
JOIN PIN IN EMPDATA TO ALL PIN IN TRAINING
END
-*
DEFINE FILE EMPDATA
HDATE/MDYY MISSING ON = DATECVT(HIREDATE,'A8YYMD','MDYY');
SDATE/MDYY MISSING ON = DATECVT(COURSESTART,'A8YYMD','MDYY');
DAYS/D9.1 MISSING ON NEEDS ALL DATA = DATEDIF(SDATE,HIREDATE,'D');
END
-*
TABLE FILE EMPDATA
PRINT
EMPDATA.PIN AS 'E_PIN'
TRAINING.PIN AS 'T_PIN'
DEPT
HIREDATE
COURSESTART
COURSECODE
DAYS
WHERE EMPDATA.PIN EQ '0000000$$'
END
Short-path (missing child record) entries are highlighted in the output and I can see that both COURSESTART and DAYS have a correct missing value in those cases. Where exactly are you seeing a "zero" value instead?
This has been solved. We believe this was happening because the source table was SQL. When we saved the data to a focus hold table and then did the join the date fields populated with blanks properly.