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.
Is it possible to have a condition statement that would allow me to set the BUSDAYS varible to EQ _MTWTF_ OR _MTWTFS depending if a field in a record is set to "Y" or "N"?
Record Layout Name (A24) StartDate EndDate Sat (A1)
Want to use the DATEIF function to determine the # of business days between the two dates. If the Sat field EQ "Y" then want to set BUSDAYS EQ _MTWTFS ELSE BUSDAYS EQ _MTWTF_
The sat field is used to designate if the employee works 6 days a week (Mon - Sat) vs 5 days a week (Mon - Fri)This message has been edited. Last edited by: Jeff_Rowland,
TABLE FILE CAR
PRINT SEATS
ON TABLE SAVE AS S001
END
-RUN
-READ S001 &SEATS.I3.
-TYPE &SEATS
-SET &BUSDAYS = IF &SEATS GE 1 THEN '_MTWTF_' ELSE '_MTWTFS';
SET BUSDAYS = &BUSDAYS
-RUN
? SET BUSDAYS
Francis
Give me code, or give me retirement. In FOCUS since 1991
Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
To my knowledge, there isn't a way to adjust the business days on a record by record basis. The easiest way to do this would be to split the file according to the number of days worked - YOU WILL NEED TO ADJUST THIS LOGIC AND/OR SYNTAX
TABLE FILE MYFILE
PRINT *
WHERE FLAG EQ 'N'
ON TABLE HOLD AS FRIWRKRS
END
TABLE FILE MYFILE
PRINT *
WHERE FLAG EQ 'N'
ON TABLE HOLD AS SATWRKRS
END
-SET &BUSDAYS = '_MTWTF_' ELSE '_MTWTFS';
FILEDEF FINISHED DISK /your path/FINISHED.FTM
TABLE FILE FRIWRKRS
your processes
ON TABLE HOLD AS FINISHED
END
-** THIS WILL PUT THE FILE BACK TOGETHER
FILEDEF FINISHED DISK /your path/FINISHED.FTM APPEND
-SET &BUSDAYS = '_MTWTFS';
TABLE FILE SATWRKRS
your processes
ON TABLE HOLD AS FINISHED
END
-* SORT THE FILE INTO THE ORDER YOU NEED IT
-* IF YOU ARE USING THE END RESULTS IN A REPORT YOU MAY NOT NEED
-* TO HOLD THE SORTED FILE, JUST CREATE YOUR REPORT
TABLE FILE FINISHED
PRINT *
BY EMP_NO NOPRINT
ON TABLE HOLD AS SORTEDFL
END
Pat WF 7.6.8, AIX, AS400, NT AS400 FOCUS, AIX FOCUS, Oracle, DB2, JDE, Lotus Notes
Posts: 755 | Location: TX | Registered: September 25, 2007
Thanks for the input. This was the type of solution I was looking into, using two hold files and then putting back together. You example helped and was able to get the data I needed for a report.