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 am facing issue while querying hold file after reading some values in a loop. I get 0 records , seems like -RUN and READFILE clears all records in previous file.
Below is the code and I am getting 0 count for HLD_COUNT1 and HLD_COUNT2 as they are used in last join.
Code:
I am calculation Terminated counts in 3 different date ranges and average of Active employees at month end between 3 different time ranges
JOIN INNER HRAD_EMPLT_HIST.HRAD_EMPLT_HIST.CCR_CDE IN hrad_emplt_hist TO UNIQUE HRAD_GL_HIER.HRAD_GL_HIER.CCR_CDE IN hrad_gl_hier TAG J0 AS J0 END
TABLE FILE HRAD_EMPLT_HIST BY LOWEST HRAD_EMPLT_HIST.HRAD_EMPLT_HIST.EMP_ID BY LOWEST HRAD_EMPLT_HIST.HRAD_EMPLT_HIST.TRMNTN_DT BY LOWEST 1 HRAD_EMPLT_HIST.HRAD_EMPLT_HIST.EFF_DT BY LOWEST 1 HRAD_EMPLT_HIST.HRAD_EMPLT_HIST.EFF_SEQ WHERE ( HRAD_EMPLT_HIST.HRAD_EMPLT_HIST.TRMNTN_DT GE &FROM_DT1.(|FORMAT=YYMD).From Date:.QUOTEDSTRING ) AND ( HRAD_EMPLT_HIST.HRAD_EMPLT_HIST.TRMNTN_DT LE &TO_DT1.(|FORMAT=YYMD).To Date:.QUOTEDSTRING ); WHERE HRAD_EMPLT_HIST.HRAD_EMPLT_HIST.PAY_GRP NE 'DIR' OR 'DCP' OR 'CDR'; WHERE HRAD_EMPLT_HIST.HRAD_EMPLT_HIST.TNRE_AT_TERM LE 1.00 WHERE HRAD_EMPLT_HIST.HRAD_EMPLT_HIST.RGLTRY_RGN EQ &RGLTRY_RGN.(OR(FIND HRAD_EMPLT_HIST.HRAD_EMPLT_HIST.RGLTRY_RGN IN HRAD_EMPLT_HIST|FORMAT=A5)).Country:.; WHERE (( J0.HRAD_GL_HIER.ORG_LVL_2_ID EQ &FIN_HIER_ROLLUP.(|FORMAT=A10).Financial Rollup:.QUOTEDSTRING ) OR ( J0.HRAD_GL_HIER.ORG_LVL_3_ID EQ &FIN_HIER_ROLLUP.(|FORMAT=A10).Financial Rollup:.QUOTEDSTRING ) OR ( J0.HRAD_GL_HIER.ORG_LVL_4_ID EQ &FIN_HIER_ROLLUP.(|FORMAT=A10).Financial Rollup:.QUOTEDSTRING ) OR ( J0.HRAD_GL_HIER.ORG_LVL_5_ID EQ &FIN_HIER_ROLLUP.(|FORMAT=A10).Financial Rollup:.QUOTEDSTRING ) OR ( J0.HRAD_GL_HIER.ORG_LVL_6_ID EQ &FIN_HIER_ROLLUP.(|FORMAT=A10).Financial Rollup:.QUOTEDSTRING ) OR ( J0.HRAD_GL_HIER.ORG_LVL_7_ID EQ &FIN_HIER_ROLLUP.(|FORMAT=A10).Financial Rollup:.QUOTEDSTRING ) OR ( J0.HRAD_GL_HIER.ORG_LVL_8_ID EQ &FIN_HIER_ROLLUP.(|FORMAT=A10).Financial Rollup:.QUOTEDSTRING ) OR ( J0.HRAD_GL_HIER.ORG_LVL_9_ID EQ &FIN_HIER_ROLLUP.(|FORMAT=A10).Financial Rollup:.QUOTEDSTRING ) OR ( J0.HRAD_GL_HIER.ORG_LVL_10_ID EQ &FIN_HIER_ROLLUP.(|FORMAT=A10).Financial Rollup:.QUOTEDSTRING ) OR ( J0.HRAD_GL_HIER.ORG_LVL_11_ID EQ &FIN_HIER_ROLLUP.(|FORMAT=A10).Financial Rollup:.QUOTEDSTRING ) OR ( J0.HRAD_GL_HIER.ORG_LVL_12_ID EQ &FIN_HIER_ROLLUP.(|FORMAT=A10).Financial Rollup:.QUOTEDSTRING ) OR ( J0.HRAD_GL_HIER.ORG_LVL_13_ID EQ &FIN_HIER_ROLLUP.(|FORMAT=A10).Financial Rollup:.QUOTEDSTRING ) OR ( J0.HRAD_GL_HIER.ORG_LVL_14_ID EQ &FIN_HIER_ROLLUP.(|FORMAT=A10).Financial Rollup:.QUOTEDSTRING ) OR ( J0.HRAD_GL_HIER.ORG_LVL_15_ID EQ &FIN_HIER_ROLLUP.(|FORMAT=A10).Financial Rollup:.QUOTEDSTRING ) OR ( J0.HRAD_GL_HIER.ORG_LVL_16_ID EQ &FIN_HIER_ROLLUP.(|FORMAT=A10).Financial Rollup:.QUOTEDSTRING ) OR ( J0.HRAD_GL_HIER.ORG_LVL_17_ID EQ &FIN_HIER_ROLLUP.(|FORMAT=A10).Financial Rollup:.QUOTEDSTRING ) OR ( J0.HRAD_GL_HIER.ORG_LVL_18_ID EQ &FIN_HIER_ROLLUP.(|FORMAT=A10).Financial Rollup:.QUOTEDSTRING ) OR ( J0.HRAD_GL_HIER.ORG_LVL_19_ID EQ &FIN_HIER_ROLLUP.(|FORMAT=A10).Financial Rollup:.QUOTEDSTRING ) OR ( J0.HRAD_GL_HIER.ORG_LVL_20_ID EQ &FIN_HIER_ROLLUP.(|FORMAT=A10).Financial Rollup:.QUOTEDSTRING )); ON TABLE SET PAGE-NUM NOLEAD ON TABLE SET ASNAMES ON ON TABLE SET BYDISPLAY ON ON TABLE NOTOTAL ON TABLE HOLD AS HLD_TERMS11 END
TABLE FILE HLD_TERMS11 SUM CNT.EMP_ID COMPUTE DUMMY/A1 = '1'; ON TABLE HOLD AS HLD_TERMS1 END
-REPEAT LOOP1 FOR &I1 FROM 0 TO &I1;
DEFINE FILE HRAD_JOB_SUMMARY MTH_END/YYMD = &DT_EOM1; MONTHEND/YYMD = IF MTH_END GE &DT_LAST1 THEN &DT_LAST1 ELSE &DT_EOM1; END
TABLE FILE HRAD_JOB_SUMMARY BY HRAD_JOB_SUMMARY.HRAD_JOB_SUMMARY.EMP_ID BY MONTHEND BY HIGHEST 1 HRAD_JOB_SUMMARY.HRAD_JOB_SUMMARY.EFF_DT BY HIGHEST 1 HRAD_JOB_SUMMARY.HRAD_JOB_SUMMARY.EFF_SEQ WHERE ( HRAD_JOB_SUMMARY.HRAD_JOB_SUMMARY.EFF_DT GE &FROM_DT1.(|FORMAT=YYMD).From Date:.QUOTEDSTRING ) AND ( HRAD_JOB_SUMMARY.HRAD_JOB_SUMMARY.EFF_DT LE &TO_DT1.(|FORMAT=YYMD).To Date:.QUOTEDSTRING ); WHERE MTH_END GE EFF_DT ;
ON TABLE SET BYDISPLAY ON ON TABLE HOLD AS HLD_ACTIVE FORMAT SQL_SCRIPT END
JOIN EMP_ID AND EFF_DT AND EFF_SEQ IN HRAD_EMPLT_HIST TO UNIQUE EMP_ID AND EFF_DT AND EFF_SEQ IN HLD_ACTIVE TAG J1 AS J1 END
DEFINE FILE HRAD_EMPLT_HIST MTH_END/YYMD = &DT_EOM1; MONTHEND/YYMD = IF MTH_END GE &DT_LAST1 THEN &DT_LAST1 ELSE &DT_EOM1; ACTV_CNT/I10 = IF EMP_STATUS EQ 'A' OR 'L' OR 'P' OR 'S' THEN 1 ELSE 0; TENURE/D20.2 = DATEDIF(SRVC_DT,MONTHEND, 'Y'); END
TABLE FILE HRAD_EMPLT_HIST BY EMP_ID BY MONTHEND BY HIGHEST 1 EFF_DT BY EFF_DT NOPRINT BY EFF_SEQ BY EMP_STATUS BY ACTV_CNT BY TENURE WHERE ( EFF_DT GE &FROM_DT1.(|FORMAT=YYMD).From Date:.QUOTEDSTRING ) AND ( EFF_DT LE &TO_DT1.(|FORMAT=YYMD).To Date:.QUOTEDSTRING ); WHERE MONTHEND GE EFF_DT; ON TABLE NOTOTAL ON TABLE HOLD AS HLD_ACTCOUNT END
TABLE FILE HLD_ACTCOUNT SUM ACTV_CNT BY MONTHEND WHERE EMP_STATUS EQ 'A' OR 'L' OR 'P' OR 'S'; WHERE TENURE LE 1.00; ON TABLE HOLD AS HLD_AVGCNT FORMAT BINARY END
DEFINE FILE HLD_AVGCNT TOTALCNT/I10 = &TOTACTVCNT; MNTHCNT/I10 =&I1; END TABLE FILE HLD_AVGCNT PRINT TOTALCNT MNTHCNT ACTV_CNT NOPRINT COMPUTE AVG_CNT1/I10 = TOTALCNT/MNTHCNT; COMPUTE DUMMY/A1 = '1'; ON TABLE HOLD AS HLD_ACTFIN1 END
JOIN HLD_TERMS1.HLD_TERM.DUMMY IN HLD_TERMS1 TO MULTIPLE DUMMY IN HLD_ACTFIN1 TAG J2 AS J2;
TABLE FILE HLD_TERMS1 PRINT
EMP_ID AS 'TERMS' AVG_CNT1 AS 'ACTIVES' COMPUTE TRNOVER1/D20% = (EMP_ID/AVG_CNT) * 100 ; DUMMY ON TABLE HOLD AS HLD_COUNT1 END
-*second time duration calculation
TABLE FILE HRAD_EMPLT_HIST BY LOWEST HRAD_EMPLT_HIST.HRAD_EMPLT_HIST.EMP_ID BY LOWEST HRAD_EMPLT_HIST.HRAD_EMPLT_HIST.TRMNTN_DT BY LOWEST 1 HRAD_EMPLT_HIST.HRAD_EMPLT_HIST.EFF_DT BY LOWEST 1 HRAD_EMPLT_HIST.HRAD_EMPLT_HIST.EFF_SEQ WHERE ( HRAD_EMPLT_HIST.HRAD_EMPLT_HIST.TRMNTN_DT GE &FROM_DT2.(|FORMAT=YYMD).From Date:.QUOTEDSTRING ) AND ( HRAD_EMPLT_HIST.HRAD_EMPLT_HIST.TRMNTN_DT LE &TO_DT2.(|FORMAT=YYMD).To Date:.QUOTEDSTRING ); WHERE HRAD_EMPLT_HIST.HRAD_EMPLT_HIST.PAY_GRP NE 'DIR' OR 'DCP' OR 'CDR'; WHERE HRAD_EMPLT_HIST.HRAD_EMPLT_HIST.TNRE_AT_TERM LE 1.00 WHERE HRAD_EMPLT_HIST.HRAD_EMPLT_HIST.RGLTRY_RGN EQ &RGLTRY_RGN.(OR(FIND HRAD_EMPLT_HIST.HRAD_EMPLT_HIST.RGLTRY_RGN IN HRAD_EMPLT_HIST|FORMAT=A5)).Country:.; WHERE (( J0.HRAD_GL_HIER.ORG_LVL_2_ID EQ &FIN_HIER_ROLLUP.(|FORMAT=A10).Financial Rollup:.QUOTEDSTRING ) OR ( J0.HRAD_GL_HIER.ORG_LVL_3_ID EQ &FIN_HIER_ROLLUP.(|FORMAT=A10).Financial Rollup:.QUOTEDSTRING ) OR ( J0.HRAD_GL_HIER.ORG_LVL_4_ID EQ &FIN_HIER_ROLLUP.(|FORMAT=A10).Financial Rollup:.QUOTEDSTRING ) OR ( J0.HRAD_GL_HIER.ORG_LVL_5_ID EQ &FIN_HIER_ROLLUP.(|FORMAT=A10).Financial Rollup:.QUOTEDSTRING ) OR ( J0.HRAD_GL_HIER.ORG_LVL_6_ID EQ &FIN_HIER_ROLLUP.(|FORMAT=A10).Financial Rollup:.QUOTEDSTRING ) OR ( J0.HRAD_GL_HIER.ORG_LVL_7_ID EQ &FIN_HIER_ROLLUP.(|FORMAT=A10).Financial Rollup:.QUOTEDSTRING ) OR ( J0.HRAD_GL_HIER.ORG_LVL_8_ID EQ &FIN_HIER_ROLLUP.(|FORMAT=A10).Financial Rollup:.QUOTEDSTRING ) OR ( J0.HRAD_GL_HIER.ORG_LVL_9_ID EQ &FIN_HIER_ROLLUP.(|FORMAT=A10).Financial Rollup:.QUOTEDSTRING ) OR ( J0.HRAD_GL_HIER.ORG_LVL_10_ID EQ &FIN_HIER_ROLLUP.(|FORMAT=A10).Financial Rollup:.QUOTEDSTRING ) OR ( J0.HRAD_GL_HIER.ORG_LVL_11_ID EQ &FIN_HIER_ROLLUP.(|FORMAT=A10).Financial Rollup:.QUOTEDSTRING ) OR ( J0.HRAD_GL_HIER.ORG_LVL_12_ID EQ &FIN_HIER_ROLLUP.(|FORMAT=A10).Financial Rollup:.QUOTEDSTRING ) OR ( J0.HRAD_GL_HIER.ORG_LVL_13_ID EQ &FIN_HIER_ROLLUP.(|FORMAT=A10).Financial Rollup:.QUOTEDSTRING ) OR ( J0.HRAD_GL_HIER.ORG_LVL_14_ID EQ &FIN_HIER_ROLLUP.(|FORMAT=A10).Financial Rollup:.QUOTEDSTRING ) OR ( J0.HRAD_GL_HIER.ORG_LVL_15_ID EQ &FIN_HIER_ROLLUP.(|FORMAT=A10).Financial Rollup:.QUOTEDSTRING ) OR ( J0.HRAD_GL_HIER.ORG_LVL_16_ID EQ &FIN_HIER_ROLLUP.(|FORMAT=A10).Financial Rollup:.QUOTEDSTRING ) OR ( J0.HRAD_GL_HIER.ORG_LVL_17_ID EQ &FIN_HIER_ROLLUP.(|FORMAT=A10).Financial Rollup:.QUOTEDSTRING ) OR ( J0.HRAD_GL_HIER.ORG_LVL_18_ID EQ &FIN_HIER_ROLLUP.(|FORMAT=A10).Financial Rollup:.QUOTEDSTRING ) OR ( J0.HRAD_GL_HIER.ORG_LVL_19_ID EQ &FIN_HIER_ROLLUP.(|FORMAT=A10).Financial Rollup:.QUOTEDSTRING ) OR ( J0.HRAD_GL_HIER.ORG_LVL_20_ID EQ &FIN_HIER_ROLLUP.(|FORMAT=A10).Financial Rollup:.QUOTEDSTRING )); ON TABLE SET PAGE-NUM NOLEAD ON TABLE SET ASNAMES ON ON TABLE SET BYDISPLAY ON ON TABLE NOTOTAL ON TABLE HOLD AS HLD_TERMS22 END TABLE FILE HLD_TERMS22 SUM CNT.EMP_ID COMPUTE DUMMY/A1 = '1'; ON TABLE HOLD AS HLD_TERMS2 END
-REPEAT LOOP2 FOR &I2 FROM 0 TO &I2;
DEFINE FILE HRAD_JOB_SUMMARY MTH_END/YYMD = &DT_EOM2; MONTHEND/YYMD = IF MTH_END GE &DT_LAST2 THEN &DT_LAST2 ELSE &DT_EOM2; END
TABLE FILE HRAD_JOB_SUMMARY BY HRAD_JOB_SUMMARY.HRAD_JOB_SUMMARY.EMP_ID BY MONTHEND BY HIGHEST 1 HRAD_JOB_SUMMARY.HRAD_JOB_SUMMARY.EFF_DT BY HIGHEST 1 HRAD_JOB_SUMMARY.HRAD_JOB_SUMMARY.EFF_SEQ WHERE ( HRAD_JOB_SUMMARY.HRAD_JOB_SUMMARY.EFF_DT GE &FROM_DT2.(|FORMAT=YYMD).From Date:.QUOTEDSTRING ) AND ( HRAD_JOB_SUMMARY.HRAD_JOB_SUMMARY.EFF_DT LE &TO_DT2.(|FORMAT=YYMD).To Date:.QUOTEDSTRING ); WHERE MTH_END GE EFF_DT ;
ON TABLE SET BYDISPLAY ON ON TABLE HOLD AS HLD_ACTIVE1 FORMAT SQL_SCRIPT END
JOIN EMP_ID AND EFF_DT AND EFF_SEQ IN HRAD_EMPLT_HIST TO UNIQUE EMP_ID AND EFF_DT AND EFF_SEQ IN HLD_ACTIVE1 TAG J3 AS J3 END
DEFINE FILE HRAD_EMPLT_HIST MTH_END/YYMD = &DT_EOM2; MONTHEND/YYMD = IF MTH_END GE &DT_LAST2 THEN &DT_LAST2 ELSE &DT_EOM2; ACTV_CNT/I10 = IF EMP_STATUS EQ 'A' OR 'L' OR 'P' OR 'S' THEN 1 ELSE 0; TENURE/D20.2 = DATEDIF(SRVC_DT,MONTHEND, 'Y'); END
TABLE FILE HRAD_EMPLT_HIST BY EMP_ID BY MONTHEND BY HIGHEST 1 EFF_DT BY EFF_DT NOPRINT BY EFF_SEQ BY EMP_STATUS BY ACTV_CNT BY TENURE WHERE ( EFF_DT GE &FROM_DT2.(|FORMAT=YYMD).From Date:.QUOTEDSTRING ) AND ( EFF_DT LE &TO_DT2.(|FORMAT=YYMD).To Date:.QUOTEDSTRING ); WHERE MONTHEND GE EFF_DT; ON TABLE NOTOTAL ON TABLE HOLD AS HLD_ACTCOUNT END
TABLE FILE HLD_ACTCOUNT SUM ACTV_CNT BY MONTHEND WHERE EMP_STATUS EQ 'A' OR 'L' OR 'P' OR 'S'; WHERE TENURE LE 1.00; ON TABLE HOLD AS HLD_AVGCNT END
DEFINE FILE HLD_AVGCNT2 TOTALCNT2/I10 = &TOTACTVCNT; MNTHCNT/I10 =&I2; END TABLE FILE HLD_AVGCNT2 PRINT ACTV_CNT NOPRINT TOTALCNT2 MNTHCNT COMPUTE AVG_CNT2/I10 = TOTALCNT2/MNTHCNT; COMPUTE DUMMY/A1 = '1'; ON TABLE HOLD AS HLD_ACTFIN2 END
JOIN HLD_TERMS2.HLD_TERM.DUMMY IN HLD_TERMS2 TO MULTIPLE HLD_ACTFIN2.HLD_ACTF.DUMMY IN HLD_ACTFIN2 TAG J4 AS J4 END
TABLE FILE HLD_TERMS2 PRINT EMP_ID AVG_CNT2 COMPUTE TRNOVER2/D20% = (EMP_ID/AVG_CNT2) * 100 ; DUMMY ON TABLE HOLD AS HLD_COUNT2 END
-*third time duration calculation
TABLE FILE HRAD_EMPLT_HIST BY LOWEST HRAD_EMPLT_HIST.HRAD_EMPLT_HIST.EMP_ID BY LOWEST HRAD_EMPLT_HIST.HRAD_EMPLT_HIST.TRMNTN_DT BY LOWEST 1 HRAD_EMPLT_HIST.HRAD_EMPLT_HIST.EFF_DT BY LOWEST 1 HRAD_EMPLT_HIST.HRAD_EMPLT_HIST.EFF_SEQ WHERE ( HRAD_EMPLT_HIST.HRAD_EMPLT_HIST.TRMNTN_DT GE &FROM_DT2.(|FORMAT=YYMD).From Date:.QUOTEDSTRING ) AND ( HRAD_EMPLT_HIST.HRAD_EMPLT_HIST.TRMNTN_DT LE &TO_DT2.(|FORMAT=YYMD).To Date:.QUOTEDSTRING ); WHERE HRAD_EMPLT_HIST.HRAD_EMPLT_HIST.PAY_GRP NE 'DIR' OR 'DCP' OR 'CDR'; WHERE HRAD_EMPLT_HIST.HRAD_EMPLT_HIST.TNRE_AT_TERM LE 1.00 WHERE HRAD_EMPLT_HIST.HRAD_EMPLT_HIST.RGLTRY_RGN EQ &RGLTRY_RGN.(OR(FIND HRAD_EMPLT_HIST.HRAD_EMPLT_HIST.RGLTRY_RGN IN HRAD_EMPLT_HIST|FORMAT=A5)).Country:.; WHERE (( J0.HRAD_GL_HIER.ORG_LVL_2_ID EQ &FIN_HIER_ROLLUP.(|FORMAT=A10).Financial Rollup:.QUOTEDSTRING ) OR ( J0.HRAD_GL_HIER.ORG_LVL_3_ID EQ &FIN_HIER_ROLLUP.(|FORMAT=A10).Financial Rollup:.QUOTEDSTRING ) OR ( J0.HRAD_GL_HIER.ORG_LVL_4_ID EQ &FIN_HIER_ROLLUP.(|FORMAT=A10).Financial Rollup:.QUOTEDSTRING ) OR ( J0.HRAD_GL_HIER.ORG_LVL_5_ID EQ &FIN_HIER_ROLLUP.(|FORMAT=A10).Financial Rollup:.QUOTEDSTRING ) OR ( J0.HRAD_GL_HIER.ORG_LVL_6_ID EQ &FIN_HIER_ROLLUP.(|FORMAT=A10).Financial Rollup:.QUOTEDSTRING ) OR ( J0.HRAD_GL_HIER.ORG_LVL_7_ID EQ &FIN_HIER_ROLLUP.(|FORMAT=A10).Financial Rollup:.QUOTEDSTRING ) OR ( J0.HRAD_GL_HIER.ORG_LVL_8_ID EQ &FIN_HIER_ROLLUP.(|FORMAT=A10).Financial Rollup:.QUOTEDSTRING ) OR ( J0.HRAD_GL_HIER.ORG_LVL_9_ID EQ &FIN_HIER_ROLLUP.(|FORMAT=A10).Financial Rollup:.QUOTEDSTRING ) OR ( J0.HRAD_GL_HIER.ORG_LVL_10_ID EQ &FIN_HIER_ROLLUP.(|FORMAT=A10).Financial Rollup:.QUOTEDSTRING ) OR ( J0.HRAD_GL_HIER.ORG_LVL_11_ID EQ &FIN_HIER_ROLLUP.(|FORMAT=A10).Financial Rollup:.QUOTEDSTRING ) OR ( J0.HRAD_GL_HIER.ORG_LVL_12_ID EQ &FIN_HIER_ROLLUP.(|FORMAT=A10).Financial Rollup:.QUOTEDSTRING ) OR ( J0.HRAD_GL_HIER.ORG_LVL_13_ID EQ &FIN_HIER_ROLLUP.(|FORMAT=A10).Financial Rollup:.QUOTEDSTRING ) OR ( J0.HRAD_GL_HIER.ORG_LVL_14_ID EQ &FIN_HIER_ROLLUP.(|FORMAT=A10).Financial Rollup:.QUOTEDSTRING ) OR ( J0.HRAD_GL_HIER.ORG_LVL_15_ID EQ &FIN_HIER_ROLLUP.(|FORMAT=A10).Financial Rollup:.QUOTEDSTRING ) OR ( J0.HRAD_GL_HIER.ORG_LVL_16_ID EQ &FIN_HIER_ROLLUP.(|FORMAT=A10).Financial Rollup:.QUOTEDSTRING ) OR ( J0.HRAD_GL_HIER.ORG_LVL_17_ID EQ &FIN_HIER_ROLLUP.(|FORMAT=A10).Financial Rollup:.QUOTEDSTRING ) OR ( J0.HRAD_GL_HIER.ORG_LVL_18_ID EQ &FIN_HIER_ROLLUP.(|FORMAT=A10).Financial Rollup:.QUOTEDSTRING ) OR ( J0.HRAD_GL_HIER.ORG_LVL_19_ID EQ &FIN_HIER_ROLLUP.(|FORMAT=A10).Financial Rollup:.QUOTEDSTRING ) OR ( J0.HRAD_GL_HIER.ORG_LVL_20_ID EQ &FIN_HIER_ROLLUP.(|FORMAT=A10).Financial Rollup:.QUOTEDSTRING )); ON TABLE SET PAGE-NUM NOLEAD ON TABLE SET ASNAMES ON ON TABLE SET BYDISPLAY ON ON TABLE NOTOTAL ON TABLE HOLD AS HLD_TERMS33 END TABLE FILE HLD_TERMS33 SUM CNT.EMP_ID COMPUTE DUMMY/A1 = '1'; ON TABLE HOLD AS HLD_TERMS3 END
-REPEAT LOOP3 FOR &I3 FROM 0 TO &I3;
DEFINE FILE HRAD_JOB_SUMMARY MTH_END/YYMD = &DT_EOM3; MONTHEND/YYMD = IF MTH_END GE &DT_LAST3 THEN &DT_LAST3 ELSE &DT_EOM3; END
TABLE FILE HRAD_JOB_SUMMARY BY HRAD_JOB_SUMMARY.HRAD_JOB_SUMMARY.EMP_ID BY MONTHEND BY HIGHEST 1 HRAD_JOB_SUMMARY.HRAD_JOB_SUMMARY.EFF_DT BY HIGHEST 1 HRAD_JOB_SUMMARY.HRAD_JOB_SUMMARY.EFF_SEQ WHERE ( HRAD_JOB_SUMMARY.HRAD_JOB_SUMMARY.EFF_DT GE &FROM_DT3.(|FORMAT=YYMD).From Date:.QUOTEDSTRING ) AND ( HRAD_JOB_SUMMARY.HRAD_JOB_SUMMARY.EFF_DT LE &TO_DT3.(|FORMAT=YYMD).To Date:.QUOTEDSTRING ); WHERE MTH_END GE EFF_DT ; ON TABLE SET BYDISPLAY ON ON TABLE HOLD AS HLD_ACTIVE3 FORMAT SQL_SCRIPT END
JOIN EMP_ID AND EFF_DT AND EFF_SEQ IN HRAD_EMPLT_HIST TO UNIQUE EMP_ID AND EFF_DT AND EFF_SEQ IN HLD_ACTIVE3 TAG J5 AS J5 END
DEFINE FILE HRAD_EMPLT_HIST MTH_END/YYMD = &DT_EOM3; MONTHEND/YYMD = IF MTH_END GE &DT_LAST3 THEN &DT_LAST3 ELSE &DT_EOM3; ACTV_CNT/I10 = IF EMP_STATUS EQ 'A' OR 'L' OR 'P' OR 'S' THEN 1 ELSE 0; TENURE/D20.2 = DATEDIF(SRVC_DT,MONTHEND, 'Y'); END
TABLE FILE HRAD_EMPLT_HIST BY EMP_ID BY MONTHEND BY HIGHEST 1 EFF_DT BY EFF_DT NOPRINT BY EFF_SEQ BY EMP_STATUS BY ACTV_CNT BY TENURE WHERE ( EFF_DT GE &FROM_DT3.(|FORMAT=YYMD).From Date:.QUOTEDSTRING ) AND ( EFF_DT LE &TO_DT3.(|FORMAT=YYMD).To Date:.QUOTEDSTRING ); WHERE MONTHEND GE EFF_DT; ON TABLE NOTOTAL ON TABLE HOLD AS HLD_ACTCOUNT3 END
TABLE FILE HLD_ACTCOUNT3 SUM ACTV_CNT BY MONTHEND WHERE EMP_STATUS EQ 'A' OR 'L' OR 'P' OR 'S'; WHERE TENURE LE 1.00; ON TABLE HOLD AS HLD_AVGCNT3 FORMAT BINARY END