I have a program that assembles data for a report and then prints it through
Acrobat Distiller. It creates a file called mo_revu.pdf. My intention is
to rename this file to a unique file name with a date stamp embedded in it.
The code works fine for setting the variables. However, I am getting
different behavior when I run the code inside the program versus entering
the same code at the R>.
Here's the code:
===================
SET VAR vfile = ('revu' + (LJS(CTXT(FORMAT(IMON(.vmaxdate),'00')),2)) +
(LJS(CTXT(FORMAT(IDAY(.vmaxdate),'00')),2)) + .pdf)
--
SET VAR vfile_comm = ('RENAME MO_REVU.PDF' & .VFILE)
--
&vfile_comm
===================
The value of vmaxdate will be 02/22/2002 for a report generated on
02/23/2002. The result of vfile will be revu0222.pdf. The vfile_comm line
creates a variable with the following command in it:
RENAME MO_REVU.PDF REVU0222.PDF
The contents of this variable will change for each day of the week. When
the &vfile_comm variable is inside the program I get errors saying the file
cannot be found. If I then issue the command &vfile_comm manually at the R>
it runs fine! I don't understand. Why won't it execute correctly inside
the program but it will work correctly from the R>. I have had a couple of
instances lately where this happens and I just can't figure out why. The
program does not contain any while loops or anything else exotic. I am only
having trouble with this particular part of the program. The problem is not
with with Distiller software. It is working correctly and I have had
similar problems that predate the installation of the Acrobat software.
I ran the same code on my WinNT 4.0 system and it ran correctly. I can't
figure out if there's something screwy about my setup with Windows 2000 or
just what's going on.
Stats:
Windows 2000 SP2
R:Base 6.5++ 1.851xRT03
HP Kayak
Any help is immensely appreciated!
Thanks -- Mike Ramsour
================================================
TO SEE MESSAGE POSTING GUIDELINES:
Send a plain text email to [EMAIL PROTECTED]
In the message body, put just two words: INTRO rbase-l
================================================
TO UNSUBSCRIBE: send a plain text email to [EMAIL PROTECTED]
In the message body, put just two words: UNSUBSCRIBE rbase-l
================================================
TO SEARCH ARCHIVES:
http://www.mail-archive.com/rbase-l%40sonetmail.com/