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 have an application with dozens of Maintains and I would like to set the dates so that any year prior to 25 goes to 2000 - 2025, and year after 25 goes to 1926 - 1999. In theory DEFCENT and YRTHRESH should do it when set in the edasprof, but they don't. I don't want to check all the Maintain files out and set them with SYS_MGR.FOCSET. Can anyone tell me a way to make the dates work properly via a global setting? My edasprof.prf currently reads:
MNTCON EXIT_WARNING OFF -SET NODATA=''; -SET YRTHRESH='25'; -SET DEFCENT='19';
I've tried it about six ways including no quotes, no dash . . . does anyone have an example that works?
J.This message has been edited. Last edited by: Kerry,
Posts: 1012 | Location: At the Mast | Registered: May 17, 2007
Yes, that didn't work for me. I don't know if this is due to Maintain or if I didn't have something exactly correct. Can someone post me an example of tested code?
J.
Posts: 1012 | Location: At the Mast | Registered: May 17, 2007
If the date you are converting is MDY to MDYY DFC and YRT will not affect the outcome, convert to A6MDY and then back again.
SET DEFCENT = 17
SET YRTHRESH = 90
-RUN
MAINTAIN FILE EMPDATA
Declare (newDate/yymd;oldDate/a6ymd;);
Case Top
for all next PIN into empdataStack;
newDate();
EndCase
Case newDate
repeat empdataStack.FocCount i/i4=1;
oldDate = empdataStack(i).hiredate;
newDate = oldDate;
type empdataStack(i).hiredate;
type newDate;
endrepeat i = i + 1;
EndCase
END
DEFINE FILE EMPDATA
OLDDATE/A6YMD = HIREDATE;
NEWDATE/YYMD = OLDDATE;
END
TABLE FILE EMPDATA
PRINT HIREDATE NEWDATE OLDDATE
END
Alan. WF 7.705/8.007
Posts: 1451 | Location: Portugal | Registered: February 07, 2007
If the date you are converting is MDY to MDYY DFC and YRT will not affect the outcome,
I'm converting a string of characters to an MDYY field. This is hand-entered values in a field associated with an MDYY, so I don't know if MDY even applies to the situation.
Setting the environment variables in the Maintain code solves the problem:
Alright, global redefinition is working, but there's a caveat and I ran into a couple of smokescreens that I had to clear.
-- First off what that I had some Maintain routines that specifically had the DEFCENT value set in them years back (set to 20). So when I added a YRTHRESH of 22 along with the DEFCENT VALUE OF 19 in the profile I got some weird behavior. Dates with a year of 12 became 2112.
That's what tipped me off that the values set in the edasprof had suddenly come alive. YRTHRESH made it through but the DEFCENT value in the MAINTAIN routine was last, so it set the final value.
-- The change had a delay to it. I was getting completely out of Maintain when testing but I'm wondering if the agent was preserving the setting when I came back in. My change to the system was on the 15th and the error began to occur on the 17th. Given how little this new test system is used that may have been how long it took the agent to commit suicide after 99 requests.
The thing I discovered that was very useful is that selecting View Source on the Maintain screen displays the system variable settings right near the top of the sheet:
That allowed me to see very quickly what variables were in force, and showed the mismatch between what was set in the edasprof and what was set in the individual Maintains.
The thing that was super-useful was setting Agent Ransack loose on the application directory on the server and searching for "DEFCENT" in all file types. I very quickly had a list of all Maintain files that had the setting hard-coded in them (5) and the fact that they were compiled on the server and so needed to be recompiled again.
In theory this doesn't need a server restart, but I'm recommending it for Maintain users.
J.
Posts: 1012 | Location: At the Mast | Registered: May 17, 2007