I am wondering. If I am running rbase for dos v6.5+ under windows 95 with scripting componets available is is possible to use vbscripts. If so, what rbase commands shoud I use.
TIA -- Jim Bentley American Celiac Society [EMAIL PROTECTED] - email (973) 776-3900 x5029 - voicemail/fax ---- "A. Razzak Memon" <[EMAIL PROTECTED]> wrote: > > > And then, you could use the new LAUNCH command in The Glorious > > R:BASE 2000 (ver 6.5++) for Windows for seamless integration > > of those VBScript(s) in you commands ... icing on the cake! > > The cool collection of VBScripts is included with the CD > > and new installation of R:BASE 2000 (ver 6.5++) for Windows. > > > Very Best Regards, > > Razzak. > > At 09:36 AM 11/21/01 -0500, Mike Byerley wrote: > > >I couldn't agree more with this underutilized ability > in RBase. Let Razaak > >devote precious resources to the big picture and let the > niggling small > >things go for a while and anything you can't dream up > in a stored procedure, > >you can get from a VBScript (no kidding). > > > > > >----- Original Message ----- > >From: "A. Razzak Memon" <[EMAIL PROTECTED]> > >To: <[EMAIL PROTECTED]> > >Sent: Wednesday, November 21, 2001 9:06 AM > >Subject: From The Edge: Add Your Own Functions to R:BASE > > > > > >> > >> November 21, 2001 > >> > >> ==================================================================== > >> From the Edge: Add Your Own Functions to R:BASE > >> Section: Stored Procedures and Triggers > >> Chapter: Running R:BASE Your Way! > >> Platform: R:BASE 2000 (ver 6.5++) for DOS/Windows > >> Build: 1.842xRT03 and Higher > >> ==================================================================== > >> > >> With the enhancements and major bug-fixes in the recent > versions > >> of R:BASE 2000 (version 6.5) and higher, sometimes you > wonder > >> what you could do to take advantage of powerful features, > such as > >> creating your own functions using Stored Procedures > and Triggers. > >> > >> Well, here is just a simple example to show you how > you can use > >> the POWER of R:BASE Features to create your own function. > >> > >> Instead of bugging R:Team to include small functions > like how to > >> find the Integer Week from any given date, you could > create your > >> own function. > >> > >> The following example shows how to create a Stored Procedure > to > >> make this work, and how you can effectively "Add Your > Own Functions" > >> to R:BASE. > >> > >> Put the following in a file called IWK.PRO > >> > >> *(IWK.PRO - Stored Procedure to find Integer Week) > >> -- Date in question is in the parameter p1 > >> > >> -- Extract the Current Year > >> SET VAR vYear INTEGER = (IYR4(.p1)) > >> > >> -- Create the date of January 1 for this year > >> SET VAR vJan01 DATE = (RDATE(1,1,.vYear)) > >> > >> -- Get the day of the week for January 1 > >> SET VAR vDwk INTEGER = (IDWK(.vJan01)) > >> > >> -- Compute the number of days between January 1 and > our date > >> SET VAR vDiff INTEGER = (.p1 - .vJan01) > >> > >> -- Adjust this difference to compensate for the day > of the > >> -- week for January 1 > >> SET VAR vDiff = (.vDiff - .vDwk + 1) > >> > >> -- Now compute the week for our date > >> SET VAR vIWK INTEGER = ((.vdiff/7) + 1) > >> CLEAR VAR vYear, vJan01, vDwk, vDiff > >> RETURN .vIWK > >> > >> At the R> prompt enter the following command to store > this > >> procedure in the database: > >> > >> PUT IWK.PRO AS IWK p1 DATE RETURN INTEGER > >> > >> To use this procedure you can do things like this: > >> > >> Example 01: > >> > >> SET VAR vWeek = (CALL IWK(.#DATE)) > >> vWeek will return the value of 47 (based on 11/21/2001) > >> STP_RETURN will also return the value of 47. > >> > >> Example 02: > >> > >> SET VAR vMyDate DATE = 04/19/2002 > >> SET VAR vWeek = (CALL IWK(.vMyDate)) > >> vWeek will return the value of 16 > >> STP_RETURN will also return the value of 16 > >> > >> Additional Notes: > >> > >> The STP_RETURN is a system variable that contain the > value > >> returned by a Stored Procedure. This return value is > set by > >> using the RETURN command. The STP_RETURN variable will > be > >> whatever type is needed by the RETURN statement within > the > >> Stored Procedure. > >> > >> Enjoy the Power and Flexibility of R:BASE 2000 (ver > 6.5)! > >> > >> --- > >> > >> Download PDF version of this article at: > >> > >> http://www.rbase.com/FromTheEdge/AddYourOwnFunctions.pdf > >> > >> Send your constructive comments to: mailto:[EMAIL PROTECTED] > >> > >> Very Best Regards, > >> > >> Razzak. > >> > >> ===================================-============================ > >> Official R:BASE List Server: mailto:[EMAIL PROTECTED] > >> RBTI Events/Training: http://www.rbase2000.com/events > >> R:DCC Members: http://www.rbase2000.com/rdcc > >> ================================================================ > >> R:BASE, Oterro & R:Tango are registered trademarks of > RBTI. > >> ==================================-============================= > >> > >> > > > > > > > > __________________________________________________ FREE voicemail, email, and fax...all in one place. Sign Up Now! http://www.onebox.com
