Focal Point Banner


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.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] YRTHRESH and DEFCENT in Maintain -- How do I set globally?

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] YRTHRESH and DEFCENT in Maintain -- How do I set globally?
 Login/Join
 
Virtuoso
posted
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, 2007Report This Post
Expert
posted Hide Post
Definitely no dash and no quotes.

SET YRTHRESH = {[-]yy|0}
SET DEFCENT = {cc|19}

SET YRTHRESH = 25
SET DEFCENT = 19

I'm sure these will work if the commands are put in edasprof.prf.

Here's a neat trick to determine the value of a SET commansd (not -SET Dialogue Manager):

-? SET YRTHRESH &ZYRTHRESH
-? SET DEFCENT &ZDEFCENT

-TYPE YRTHRESH &ZYRTHRESH
-TYPE DEFCENT &ZDEFCENT

The first set of lines put the values of the SET commands into DM variables. The second set of lines display the values.

I haven't checked this in Maintain, but I can't see why these values would not be set for the whole WF environment.


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
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Virtuoso
posted Hide Post
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, 2007Report This Post
Master
posted Hide Post
I have:
SET DEFCENT = 19
SET YRTHRESH = 50

in my EDASPROF and it is working for me.
 
Posts: 663 | Location: New York | Registered: May 08, 2003Report This Post
Virtuoso
posted Hide Post
John - Are the Maintains compiled?

Mark - For a compiled Maintain, which set of century settings would govern their operation -- compile-time or run-time?


- Jack Gross
WF through 8.1.05
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Report This Post
Virtuoso
posted Hide Post
They are compiled.

J.



 
Posts: 1012 | Location: At the Mast | Registered: May 17, 2007Report This Post
Master
posted Hide Post
I am being told that the settings should come from compile time.

Mark
 
Posts: 663 | Location: New York | Registered: May 08, 2003Report This Post
Virtuoso
posted Hide Post
Alright, so I need to get the settings in place and then recompile. I'll give that a spin and report back. Thank you for the help.

J.



 
Posts: 1012 | Location: At the Mast | Registered: May 17, 2007Report This Post
Virtuoso
posted Hide Post
No change. I blew away the old copies and recompiled, no change. Then I blew the old copies away and set it to not compile, no change as well.

For the record the field is an MDYY.

Simply remarkable how many times I change settings on Reporting Servers and their response back is "No".

S.



 
Posts: 1012 | Location: At the Mast | Registered: May 17, 2007Report This Post
Virtuoso
posted Hide Post
Since I had a unit checked out of CM to test this I entered the appropriate SYS_MGR.FOCSET commands to see if that would respond correctly and it did.

J.



 
Posts: 1012 | Location: At the Mast | Registered: May 17, 2007Report This Post
Virtuoso
posted Hide Post
John

The setting is from compile time as Mark said.

However, what dates are you trying to convert?

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, 2007Report This Post
Virtuoso
posted Hide Post
quote:
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:

  
  SYS_MGR.FOCSET("DEFCENT", "19");
  SYS_MGR.FOCSET("YRTHRESH", "22");


I just wish I didn't have to change it in 30+ units in order to correct the problem.

J.



 
Posts: 1012 | Location: At the Mast | Registered: May 17, 2007Report This Post
Virtuoso
posted Hide Post
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:

function FocusEnvironVar() {
this.calendarIconSwitch = 0; 
this.thousandsep = ",";
this.decimalsep = ".";
this.nodata = "";
this.defcent = "19";
this.yrthresh = "22";
}


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, 2007Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] YRTHRESH and DEFCENT in Maintain -- How do I set globally?

Copyright © 1996-2020 Information Builders