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     Monthly Processing dates

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Monthly Processing dates
 Login/Join
 
Member
posted
I have a file that automatically runs on a monthly basis. Each month I have to ensure that the dates are updated. I believe there is a date function in FOCUS such as &&YYMD that can be used so that one would not need to go into the file each month and update it.

I do not know much about &&YYMD, so I do not know how I can manipulate it to meet my needs.

For example, I have one program that tracks the movement of inventory like so:

00022 -SET &STARTUSAGE = '200701';
00023 -SET &ENDUSAGE = '200712';
00024 -SET &SFORECAST = '200712';
00025 -SET &EFORECAST = '200811';

**** The STARTUSAGE and ENDUSAGE set the time period that we include the actual inventory transactions in the calculation. This should be the past 12 month time period. (December 1st report should have had 200701 and 200712)
**** The SFORECAST and EFORCAST set the time period that we include the future forecast in the calculation. This should be current month plus next 11 months. (December 1st report should have had 200712 and 200811)

I am not sure how I can get the &&YYMD feature to meet my needs in my programs. Can someone help me with understanding it and how to do a revolving 12 months with it or point me to some documentation/code samples?

I greatly thank you for your time and help.

Thank you.


FOCUS 7.0.8R for AS400 systems
Windows XP SP2
Output: Microsoft Excel 2003
 
Posts: 2 | Registered: December 14, 2007Report This Post
Virtuoso
posted Hide Post
You could play with something like this -

-SET &BEG = DATEMOV(&YYMD, 'BOM', 'A8YYMD');
-SET &END = DATEMOV(&YYMD, 'EOM', 'A8YYMD');


In Focus since 1993. WebFOCUS 7.7.03 Win 2003
 
Posts: 1903 | Location: San Antonio | Registered: February 28, 2005Report This Post
Expert
posted Hide Post
Try this:

-SET &ENDUSAGE = EDIT(&YYMD,'999999');;
-SET &STARTUSAGE = AYM(&ENDUSAGE,-11,'I6'); 
 
-SET &SFORECAST = &ENDUSAGE; 
-SET &EFORECAST = AYM(&ENDUSAGE,11,'I6'); 
-TYPE &ENDUSAGE &STARTUSAGE &SFORECAST &EFORECAST 


&YYMD is the system date in your computer.


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
 
Posts: 2723 | Location: Ann Arbor, MI | Registered: April 05, 2006Report This Post
Member
posted Hide Post
Thanks Ginny. I have just a couple of questions; I'm new to FOCUS. I don't understand what AYM is or I6? Can you help me with what those mean? Also, what does the last line of code do: print out the contents of the variables to the screen?

Sorry, but I am new to FOCUS. I believe this is the approach I would like, but I just want to understand it more. Thank you for your time and help!

Thank you,

John


FOCUS 7.0.8R for AS400 systems
Windows XP SP2
Output: Microsoft Excel 2003
 
Posts: 2 | Registered: December 14, 2007Report This Post
Expert
posted Hide Post
If you're "new to FOCUS" and you "just want to understand it more", then I would suggest looking at the documentation.

AYM is a WebFOCUS Date function. I6 is an integer of 6 digits. This is very basic stuff, so I'd really read the documentation.


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
Expert
posted Hide Post
Thanks, Francis.

John, there is a functions manual that you can download from this website. It has lots of functions documented in chapters by type. There are lots on dates. The function that I used, AYM is a 'legacy' date function. There are also smart date functions which I won't get into today.

I6, as Francis mentioned, is a field format. The doc for AYM indicates that I needed to specify a legacy date format.

And yes, -TYPE prints the contents of the variables so that I could see that I had done it correctly. That is a Dialogue Manager command. That will be in the Developing Report Applications manual.

You really need to do some reading. And a little reading points to more reading...

You can also search for topics in the techsupport site, Advanced Search link, and it will point you to things to read.

RIF (Reading is Fun!)


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
 
Posts: 2723 | Location: Ann Arbor, MI | Registered: April 05, 2006Report This Post
Virtuoso
posted Hide Post
John

there is also a great book that is called 'almost 1001 Ways to Work with Dates in WebFOCUS' it will cost you 25$ but it's worth all the money.
And maybe ask your company to send you to some basic training. It's a bit more than these 25 but you will get a good startup and it will help you better understand all the stuff here.
I started years ago with 1-2-3 (that was something like excel....) And I remember that someone tried to explain me to type "slash" to start the program. I did but nothing happened. A course will be helpful.




Frank

prod: WF 7.6.10 platform Windows,
databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7
test: WF 7.6.10 on the same platform and databases,IE7

 
Posts: 2387 | Location: Amsterdam, the Netherlands | Registered: December 03, 2006Report This Post
Master
posted Hide Post
Another thing to remember is that & dates (&YYMD, &MDYY, etc.) are not really dates, they are alphanumeric character strings. As such, you can do all sorts of things. For example, with &YYMD equal to 20071217:
-SET &YR_MTH = &YYMD/100; (yields 200712)
-SET &ADD_5YRS1 = &YYMD+50000; (yields 20121217)
-SET &SUB_5YRS1 = &YYMD-50000; (yields 20021217)
-SET &ADD_5YRS2 = &YR_MTH+500; (yields 201212)
-SET &SUB_5YRS2 = &YR_MTH-500; (yields 200212)

Also, in addition to AYM (which adds and subtracts months) there is AYMD which adds and substracts days.


In FOCUS since 1985. Prod WF 8.0.08 (z90/Suse Linux) DB (Oracle 11g), Self Serv, Report Caster, WebServer Intel/Linux.
 
Posts: 975 | Location: Oklahoma City | Registered: October 27, 2006Report 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     Monthly Processing dates

Copyright © 1996-2020 Information Builders