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'm having trouble with the first of these 2 GETTOK's.
I need to extract the month and year from &DATE_FOR_REPORT. &DATE_FOR_REPORT receives its value in the format of MMYYYY where MM can be 1 or 2 digits (it may or may not have a leading zero).
The GETTOK for &YEAR results in the agent crashing. The second GETTOK works fine. Any suggestions on what's causing the problem and how to fix it?
John, I would suggest not using GETTOK, as there is no clear delimiter for the month and year.
The issue with GETTOK is that you are using the number 2 as a delimiter, this will give you problems with February and December.
My suggestion is using EDIT or SUBSTR. The length of the string will indicate whether there is a 1 or 2 digit month.This message has been edited. Last edited by: Waz,
-* -SET the &DATE_FOR_REPORT to '12007' to see it work with 5 digits...
-SET &DATE_FOR_REPORT = '012007';
-SET &YR2 = IF &DATE_FOR_REPORT.LENGTH EQ 6 THEN EDIT(&DATE_FOR_REPORT,'99') ELSE '0' || EDIT(&DATE_FOR_REPORT,'9');
-SET &MN2 = IF &DATE_FOR_REPORT.LENGTH EQ 6 THEN EDIT(&DATE_FOR_REPORT,'$$9999') ELSE EDIT(&DATE_FOR_REPORT,'$9999');
-TYPE &YR2 &MN2
Just some more food for thought... Ain't DM Gr8!
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005
The GETTOK for &YEAR results in the agent crashing. The second GETTOK works fine.
Just wondering - if the first one crashes, then the second one will never run ... (I suppose -* was used).
But the official syntax for dialog manager is not to have the field named as output parameter, but to specify the format. And that is probably the cause of your crash. The suggestions to use substr are also valid, but your code should be ok when you change the format of the output field to be 'A4' and 'A2'. Oh, you do not need the .EVAL's in this case. But you do need to give it the correct length.
And I thought mine was simple... But, Tony, Yours Rocks. The DATECVT is, probably, the "best" solution in that it is as BASE FOCUS as I can see it - IMHO...
In FOCUS Since 1983 ~ from FOCUS to WebFOCUS. Current: WebFOCUS Administrator at FIS Worldpay | 8204, 8206
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005