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.
In a FOCUS project I inherited, in the master file, I have a date field that has a format of P06YYM. I also have JCL that inputs a Year field of 4 digits. Currently, the FOCEXEC appends a two-digit month to the inputted year field, giving a date of, say, 200706.
What I want to do is to take the computed date field of 200706 and compute a prior date that is 16 months in the past. After I do that, I want to modify my FOCEXEC so that I can check to see if my datafield is between the date of 200706 and the date that is 16 months in the past.
I've not had any luck yet in writing correct code to do this....I've tried the AYM function and the CHGDAT function, but think I'm probably making this more difficult than it has to be.
Can anyone possibly help me out? Thank you so much in advance!This message has been edited. Last edited by: webmeister,
Well, I don't have any mainframe at hand currently, but I've tried to piece some things together using my webfocus 713 release. Here's what I did, and with is succesfull for me:
Please notice in GamP's response that he used I6YYM as the format. Have you tried changing the P06YYM to I6YYM in a define and then doing the AYM function? I think that is your key.
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
Please be careful if the file you are reporting against is a relational DB. Comparing a data base field to a defined field will cause the date screen to not be passed to the data base so all the data will be returned and WebFOCUS will have to do the date screen.
No, you aren't missing something.... I was having difficulty wrapping my head around the date comparisons and the first two replies to my plight helped me solve my problem. I am not using relational databases.... these are VSAM files and the previous suggestions worked beautifully. I'm sure your suggestion would also work.
You are most welcome. However, it is still more efficient to do WHERE clauses against literals as opposed to defined fields. That way the record is rejected before all the defines are applied. If you don't have very many defines then the discussion is moot. However, if you have a bunch of defines then the efficiency will become more apparent.