[Robelle-l] variable substitution

Catherine Litten catherine.litten@valleypres.org
Fri, 4 Apr 2003 14:50:26 -0800


It looks like you are selecting on a 6 digit year using a 8 digit year.  You
need to convert either STLASTRUN to 6 digits or convert BD-TURNOVER-DT to 8
digits:

Here is a conversion routine I use on this field: (then do the selection in
the next pass


set date cutoff 25
item BD-TURNOVER-DT,date,YYMMDD
define TURNOVER-DATE,1,4,double
item TURNOVER-DATE,date,CCYYMMDD
ext PAT-ACCT-NBR
ext TURNOVER-DATE = $stddate(BD-TURNOVER-DT)


Hope this helps
Catherine Litten,
Senior Programmer Analyst
Valley Presbyterian Hospital
www.valleypres.org
*********************************
The thoughts, comments, and opinions expressed herein are mine.  They do not
reflect those of my employer, nor anyone else.
***This E-mail is covered by the Electronic Communications Privacy Act, 18
U.S.C. §§ 2510-2521 and is legally privileged. This information is
confidential information and is intended only for the use of the individual
or entity named above. If the reader of this message is not the intended
recipient, you are hereby notified that any dissemination, distribution or
copying of this communication is strictly prohibited.  If you have received
this transmission in error, please notify the sender immediately by return
electronic transmission and then immediately delete this transmission.***

-----Original Message-----
From: robelle-l-admin@robelle.com [mailto:robelle-l-admin@robelle.com]On
Behalf Of Gates, Scott
Sent: Friday, April 04, 2003 12:59 PM
To: 'robelle-l@robelle.com'
Subject: [Robelle-l] variable substitution


I have a variable !STLASTRUN which = 1999/09/01 that I wish to use as a
$DATE in a job so I can pull data from certain dates forward.
Eventually I will be updating the file that I read to get STLASTRUN.

Anyway, I do this:
SET VARSUB ON

BA DBBB1,5;

GET BD-ACCT-SUMMARY

USE BDSUM.SUPRDEF
ITEM BD-TURNOVER-DT,DATE,YYMMDD
IF $STDDATE(BD-TURNOVER-DT) >= $DATE(!STLASTRUN)
                                    ^
Error:  Invalid year for $date

It worked when I had 1999/09/01 hardcoded.  I've tried it with and without
the quotes and gotten the same result.

I'm storing the last rundate in a file, so I won't keep resending the old
data.

Can I make it accept the date in this way, or is there another work around?




Scott Gates
Programmer/Analyst
Information Services
Our Lady of Bellefonte Hospital
P.O. Box 789
Ashland, Kentucky 41105-0789
-----------------------------------
Phone: (606)833-3773
  Fax: (606)833-3342
-----------------------------------
Quote: ...Computers are...stupid. Unlike human beings, computers possess the
truly
profound stupidity of the inanimate. - Bruce Sterling - THE HACKER CRACKDOWN
-----------------------------------
Intranet: http://Olbh01iis/intranet/index.html
Primary e-mail  : [mailto:sgates@olbh.com]
Alternate e-mail : [mailto:msgates@pobox.com]
-----------------------------------
Our Lady of Bellefonte : http://www.olbh.com
-----------------------------------
Confidentiality Notice: This e-mail message, including any attachments, is
for the sole use of the intended recipient(s) and may contain confidential
and privileged information.  Any unauthorized review, use, disclosure or
distribution is prohibited.  If you are not the intended recipient, please
contact the sender by reply e-mail, fax, or phone and destroy all copies of
the original message.


_______________________________________________
Robelle-l mailing list
Robelle-l@robelle.com
http://two.pairlist.net/mailman/listinfo/robelle-l