Create a file with current and previous year values.
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.
November 09, 2004, 08:30 PM
TexasStingray
you might try using dialog manager; looping and -write to create a simple file.
November 09, 2004, 08:37 PM
susannah
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 ;
November 10, 2004, 02:56 PM
webfocuspgm
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.
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
November 12, 2004, 01:03 PM
webfocuspgm
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.