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 a value, for example 57, which I want to divide by 3. Obviously the answer is 19.
But I want to get a remainder to show me that my loop I would make 6 passes to edit 3 bytes each time to extract 18 bytes from this filed. Once I've extracted the 18 bytes, I will ignore the remaining 1 byte.
I tried the IMOD FUNCTION with smart dates ut I cannot get it with the numeric values.
-* File chk_mods.fex
DEFINE FILE CAR
MYDATE/YYMD WITH COUNTRY = &YYMD;
MYBASEDATE/YYMD = 20130101;
DAYSTHISYR/I5 = MYDATE - MYBASEDATE;
WEEKNUMBER/I4 = DAYSTHISYR/7;
DAYSINTOWK/I4 = IMOD(DAYSTHISYR,7,'I4');
D1/I2=57;
D2/I2=3;
D123/D20.2 = (D1/D2);
DXX3/I4 = IMOD(D1,D2,'I4');
END
TABLE FILE CAR
PRINT
MYDATE
MYBASEDATE
DAYSTHISYR
WEEKNUMBER
DAYSINTOWK
D1
D2
D123
DXX3
BY COUNTRY
END
-RUN
I have printed and read the IMOD, DMOD and FMOD documentation but No result.
I'm optimistic I can do this in dialogue manager and see the decimal places.
Any ideas?
ThanksThis message has been edited. Last edited by: <Kathryn Henning>,
I do not think I understand what you are trying to do with modular division so sorry if you know this.
Modular division only shows the remainder in a whole number instead of a decimal. In your case 57 / 3 has no remainder so you will get 0 as the code you showed suggests.
If you want to get 6 from 19 could do the following but you do not need modular division. There is also the INT function that always rounds down to the lowest whole number.
D4/I4=D123/D2;
If none of that helped could you explain it in a different way and/or show more examples of what you have and what it should look like?