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.
Hi, So i have been searching for a thread to help me out but i believe the code i'm finding works in Dialogue Manager but not in focus code when creating a variable via a procedure?
What i'm trying to do is get the max date of a column from a table and substract 1 month. i have it corrected pulling the latest date however i can't seem to get it to substract 1 month?
Here is my code so far:
-SET &DDDATE=;
DEFINE FILE DAD WRKD/A8YYMD=Discharge_Date; WRKDA/A10=EDIT(WRKD,'9999/99/99'); -*WRKDAY=DATEADD(WRKDA,'M', -7); <- I believe this is the correct place to take the date which i have captured and just go back 1 month? END
TABLE FILE DAD SUM MAX.WRKDA ON TABLE HOLD AS WD FORMAT ALPHA END -RUN
DATEADD requires a date to be in date format. Since Dialogue Manager interprets a date as alphanumeric or numeric, and DATEADD requires a standard date stored as an offset from the base date, do not use DATEADD with Dialogue Manager unless you first convert the variable used as the input date to an offset from the base date.
So, as per the example:
TABLE FILE EMPLOYEE
PRINT FIRST_NAME HIRE_DATE
COMPUTE NEW_DATE/YYMD = HIRE_DATE;
COMPUTE HIRE_DATE_PLUS_THREE/YYMD = DATEADD(NEW_DATE, 'WD', 3);
BY LAST_NAME
END
Your "in" date needs to be e.g. YYMD format. And the "out" date (WRKDAY) needs a format.
So, if Discharge_Date is already a YYMD format, you probably need something like this:
WRKDAY/YYMD=DATEADD(Discharge_Date,'M', -7);
WebFOCUS 8.2.06 mostly Windows Server
Posts: 195 | Location: Johannesburg, South Africa | Registered: September 13, 2008
thank you guys the only thing is Dialogue manager (in webfocus) is not the same as a procedure (in data migrator? uses focus langauge?) i'm trying to do this for a flow so i set a global variable so it can be used later on in the flow