[Download-List] Date Stamping HOLD File Name?

Kreutzer, Bruce bkreutzer at hccfl.edu
Wed Sep 5 16:06:35 EDT 2007


I created a program and a method to use in paragraphs in general.
I don't remember if I invented it or borrowed from something else....

I have a VOC item called TODAY.  It looks like this:
Top of "TODAY" in "VOC", 5 lines, 39 characters.

*--: P

001: 14493

002: 20070905

003: 09/05/2007

004: Wednesday 
005: TODAY

I have a simple program that updates it the first time it's called each
day.
I call the program WRITE.TODAY (code below).

Just put WRITE.TODAY in the paragraph before using the <<F...>> command.
Then in the paragraph, use it like this:

SETPTR 0,200,0,0,0,3,BANNER \
  WUFA_RPT.UAT.<<F(VOC,TODAY,2)>>.TXT,NHEAD,NFMT,BRIEF

This will create a hold entry called WUFA_RPT.UAT. 20070905.TXT when
used.

The other fields in the TODAY item are used for other similar purposes.
<1> is the internal date.
<5> has the word TODAY in it to confirm that the item is the right one
(just in case). 

The program needs to be run only once in each account, but is smart
enough not to update anything if it has already been run today.

Here's the program:

001: * WRITE TODAY'S DATE IN THE VOC FOR USE IN PARAGRAPHS
002: * BCK 2003-09-02
003: *
004: * TODAY ITEM WILL CONTAIN:
005: * <1> INTERNAL DATE
006: * <2> CCYYMMDD
007: * <3> MM/DD/CCYY
008: * <4> TEXT DAY OF THE WEEK
009: * <5> 'TODAY' SAFETY MARKER
010: *
011: TID='TODAY'; * id of item in the file
012: FILENAME='VOC'
013: *
014: OPEN FILENAME TO F.FILE ELSE PRINT "CAN'T OPEN ":FILENAME; STOP
015: *
016: READU TODAY.ITEM FROM F.FILE,TID ELSE
017:   PRINT "CAN'T READU ":TID:" FROM ":FILENAME
018:   STOP
019: END
020: *
021: IF TODAY.ITEM<5>[1,5] # "TODAY" THEN
022:    RELEASE F.FILE,TID
*--: P
023:    PRINT "ERROR! - INVALID FORMAT FOR ":TID:" IN ":FILENAME
024:    STOP
025: END
026: TODAY=DATE()
027: IF TODAY.ITEM<1> = TODAY THEN
028:    RELEASE F.FILE,TID
029:    STOP
030:    * already was done today
031: END
032: TODAY.ITEM=''
033: TODAY.ITEM=TODAY
034: TODAY.ITEM<3>=OCONV(TODAY.ITEM<1>,'D4/')
035:
TODAY.ITEM<2>=FIELD(TODAY.ITEM<3>,'/',3):FIELD(TODAY.ITEM<3>,'/',1):FIEL
D(T
ODAY.ITEM<3>,'/',2)
036: TODAY.ITEM<4>=OCONV(TODAY.ITEM<1>,'DWA')
037: TODAY.ITEM<5>="TODAY"
038: WRITE TODAY.ITEM ON F.FILE,TID


Bruce Kreutzer
Systems Administrator
Hillsborough Community College
bkreutzer at hccfl.edu
813.253.7692
Helpdesk: 813.253.7000xHELP
 

-----Original Message-----
From: download-list-bounces at cedarville.edu
[mailto:download-list-bounces at cedarville.edu] On Behalf Of Scott Howder
Sent: Wednesday, September 05, 2007 1:02 PM
To: Cedarville DOWNLOAD Users; Jeffery G. Summers
Subject: RE: [Download-List] Date Stamping HOLD File Name?

I can think of several ways to do this:

1.  Use the @ variables.  Something like this aught to work:

DOWNLOAD filename field1 field2 FORMAT format FILE directory
@DATE_filename.csv
DOWNLOAD filename field1 field2 FORMAT format FILE directory
@YEAR at MONTH@DAY_filename.csv 

The first example will create a file in "directory" called
14493_filename.csv...it would use the internal date.  The second example
will create a file called 070905_filename.csv.

2.  Create a paragraph that prompts for the date.  Something like
this:

DOWNLOAD filename field1 field2 FORMAT format FILE directory <<PROMPT
TEXT>>_filename.csv

3.  Create a program that builds the DOWNLOAD command and executes it..
 It would build the necessary file name using the current date.

There may by other options but these immediately came to mind.

Scott

Scott Howder
Associate Director of Computer Services
Cedarville University
howders at cedarville.edu


>>> "Minatra, Pat H." <pminatra at hsutx.edu> 9/5/2007 11:46 AM >>>
So far, I have not been able to determine how to do this and we have
been wanting to do this for years.

Maybe someone has learned a way to do this and will share it?

-------------------------
"Life is but a twinkle in the eye of eternity"
"The shortest distance between a problem and a solution is the distance
between your knees and the floor"
"sorrow looks back - worry looks around - faith looks up"
Regards,
Pat H. Minatra - N5GJR
(325) 670-5804 voice
(325) 670-1570 fax
Hardin-Simmons University 
www.hsutx.edu 
PO BOX 16040
Abilene, TX  79698
-------------------------
The mission of Hardin-Simmons University is to be a community dedicated
to providing excellence in education enlightened by Christian faith and
values.
-------------------------
PRIVILEGED AND CONFIDENTIAL NOTICE: The information contained in this
e-mail may be confidential and/or privileged. This e-mail is intended to
be reviewed initially by only the individual named above. If the reader
of this e-mail is not the intended recipient or a representative of the
intended recipient, you are hereby notified that any review,
dissemination or copying of this e-mail, or the information contained
herein, is prohibited. If you have received this e-mail in error, notify
the above sender, send the message back and then delete it.
-------------------------
Thank you for your assistance. Hardin-Simmons University; 2200
Hickory/HSU Box 16040; Abilene, TX  79698; 325.670.1000
------------------------- 


-----Original Message-----
From: download-list-bounces at cedarville.edu
[mailto:download-list-bounces at cedarville.edu] On Behalf Of Jeffery G.
Summers
Sent: Wednesday, September 05, 2007 10:28 AM
To: 'Cedarville DOWNLOAD Users'
Subject: [Download-List] Date Stamping HOLD File Name?

This is a question I've had for a long time and never have figured out
how
to do it.  Is date-stamping the output file name possible with
DOWNLOAD?

Essentially I want to have TODAYSDATE.MYFILENAME.EXT (or
20070905.STUDENTS.CSV).  Any suggestions?  Is this something simple
I've
missed?

Thanks!

Jeffery G. Summers
System Admin
Transylvania University
300 N. Broadway
Lexington, KY 40508
jsummers at transy.edu 




Successfully scanned by McAfee SIG 3200 Appliance.
_______________________________________________
download-list mailing list
download-list at cedarville.edu 
http://mail.cedarville.edu/mailman/listinfo/download-list 

_______________________________________________
download-list mailing list
download-list at cedarville.edu 
http://mail.cedarville.edu/mailman/listinfo/download-list
_______________________________________________
download-list mailing list
download-list at cedarville.edu
http://mail.cedarville.edu/mailman/listinfo/download-list




More information about the download-list mailing list