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     Create a file with current and previous year values.

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Create a file with current and previous year values.
 Login/Join
 
Platinum Member
posted
I interested in ideas for the best way to create a file that would contain current year, and then calculate using current year - 1, current year - 2 and current year - 3. This file would then be used in other programs.

Does anyone currently have a date routine that does this function ... ? or anyone like to share their ideas ...?

I have some ideas but they seem 'clunky'... I'd like to hear what other ideas are out there.
 
Posts: 132 | Location: Kansas | Registered: November 12, 2003Report This Post
Master
posted Hide Post
you might try using dialog manager; looping and -write to create a simple file.
 
Posts: 865 | Registered: May 24, 2004Report This Post
Expert
posted Hide Post
seems to me that years are the simplest 'date-ish' things and that you don't actually need a date format to decrement them, just handle them as integer and decrement.
2004
2004-1
2004-2
etc.
you may not need to use date formats at all.
If you're in dm, then
-SET &THISYEAR = EDIT(&YYMD,'9999');
-SET &LASTYEAR = &THISYEAR - 1 ;
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
Platinum Member
posted Hide Post
I like the dialogue manager idea, much better than mine.... Here is what I have BUT.....

The file contains this......
200420032002200120001999

What I really need is .....
2004
2003
2002
2001
2000
1999

I don't know how to control the DM and the -WRITE commands to create this... I really thought multiple -WRITE commands would do this. I've tried using the APPEND command but that gave me an error.



-TOP
FILEDEF YEARHOLD02 DISK D:\ibi-dev\ibi\apps_srv\baseapp\yearhold02.ftm (RECFM F LRECL 4)
-RUN
-SET &THISYEAR = EDIT(&YYMD,'9999');
-SET &YEARIS = &THISYEAR ;
-WRITE YEARHOLD02 NOCLOSE &YEARIS
-RUN
-SET &YEARIS = &THISYEAR - 1 ;
-WRITE YEARHOLD02 NOCLOSE &YEARIS
-RUN
-SET &YEARIS = &THISYEAR - 2 ;
-WRITE YEARHOLD02 NOCLOSE &YEARIS
-RUN
-SET &YEARIS = &THISYEAR - 3 ;
-WRITE YEARHOLD02 NOCLOSE &YEARIS
-RUN
-SET &YEARIS = &THISYEAR - 4 ;
-WRITE YEARHOLD02 NOCLOSE &YEARIS
-RUN
-SET &YEARIS = &THISYEAR - 5 ;
-WRITE YEARHOLD02 NOCLOSE &YEARIS
-CLOSE
-RUN

This message has been edited. Last edited by: <Mabel>,
 
Posts: 132 | Location: Kansas | Registered: November 12, 2003Report This Post
Expert
posted Hide Post
how about this:
FILEDEF INPUT DISK whereever
FILEDEF OUTPUT DISK whevever
-RUN
-READ INPUT NOCLOSE &YR1.A4 &Y42.A4 &YR3.A4 &YR4.A4 ..etc
-WRITE OUTFILE NOCLOSE &YR1
-WRITE OUTFILE NOCLOSE &YR2
-WRITE OUTFILE NOCLOSE &YR3
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
Platinum Member
posted Hide Post
susannah,
Yes.... taking that I got it to work.

OK now the problem is I can't get it to populate my drop-down correctly. I want 2004 to be first but 1999 shows up first and there are no controls inside Resource Layout to control the sort order.

Just when I thought I got it to work... thanks for all the input.
 
Posts: 132 | Location: Kansas | Registered: November 12, 2003Report 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     Create a file with current and previous year values.

Copyright © 1996-2020 Information Builders