dbTalk Databases Forums  

Compiling outside of UV

comp.databases.pick comp.databases.pick


Discuss Compiling outside of UV in the comp.databases.pick forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Rick Weiser
 
Posts: n/a

Default Compiling outside of UV - 05-19-2006 , 12:59 PM






Hi all,

Is there an easy way to create a windows script to compile and catalog
a UV program from outside of the UV enviornment? I use a freeware
editor called Crimson on XP. I have been using it for jBASE and built
a script to compile and catalog a jBASE program. I want to do the same
with UV.

Does anyone know if this is possible?

Thanks,

Rick


Reply With Quote
  #2  
Old   
Rick Weiser
 
Posts: n/a

Default Re: Compiling outside of UV - 05-19-2006 , 03:18 PM






Glen,

Thanks, I have used this before. The problem is that is takes a
license when using it and I would like to use the same tools from
platform to platform. With my jbase compile script it only takes a
license when the script is runs and releases the license when it
completes.

Rick


Reply With Quote
  #3  
Old   
BobJ
 
Posts: n/a

Default Re: Compiling outside of UV - 05-19-2006 , 06:55 PM



I go the other way - that is, I execute a script from within UV that opens
the editor in .CMD window. Not sure if this use any licenses but I don't
see why it would.
BobJ
"Rick Weiser" <rickw (AT) designbais (DOT) com> wrote

Quote:
Hi all,

Is there an easy way to create a windows script to compile and catalog
a UV program from outside of the UV enviornment? I use a freeware
editor called Crimson on XP. I have been using it for jBASE and built
a script to compile and catalog a jBASE program. I want to do the same
with UV.

Does anyone know if this is possible?

Thanks,

Rick




Reply With Quote
  #4  
Old   
Tony Gravagno
 
Posts: n/a

Default Re: Compiling outside of UV - 05-19-2006 , 08:19 PM



Shouldn't be tough to write a script that passes the current document
to an executable. That executable makes a connection to UV, passes
the doc in, compiles, captures results, then opens a window with
results. You can use VB6 with UO, or VS.NET with UO.NET or mv.NET.
I've done stuff like this before, doesn't take long.

Any help?
T

"Rick Weiser" wrote:

Quote:
Hi all,

Is there an easy way to create a windows script to compile and catalog
a UV program from outside of the UV enviornment? I use a freeware
editor called Crimson on XP. I have been using it for jBASE and built
a script to compile and catalog a jBASE program. I want to do the same
with UV.

Does anyone know if this is possible?

Thanks,

Rick


Reply With Quote
  #5  
Old   
Bruce Nichol
 
Posts: n/a

Default Re: Compiling outside of UV - 05-19-2006 , 09:29 PM



Goo'day,

On 19 May 2006 10:59:00 -0700, "Rick Weiser" <rickw (AT) designbais (DOT) com>
wrote:

Quote:
Hi all,

Is there an easy way to create a windows script to compile and catalog
a UV program from outside of the UV enviornment? I use a freeware
editor called Crimson on XP. I have been using it for jBASE and built
a script to compile and catalog a jBASE program. I want to do the same
with UV.

Does anyone know if this is possible?
UV still comes with UniDebugger doesn't it? On the client CD??
It seems to use the same editing "engine" as WED, UniEditor, et al....
It burns a licence, but don't they all at some stage or another?

Quote:
Thanks,

Rick
Regards,

Bruce Nichol
Talon Computer Services
ALBURY NSW Australia

http://www.taloncs.com.au

If it ain't broke, fix it until it is....


Reply With Quote
  #6  
Old   
Bruce Nichol
 
Posts: n/a

Default Re: Compiling outside of UV - 05-19-2006 , 09:32 PM



On Sat, 20 May 2006 12:29:15 +1000, Bruce Nichol
<reverse_ecurb (AT) taloncs (DOT) com.au> wrote:

Adding to my own post...
Quote:
Goo'day,

On 19 May 2006 10:59:00 -0700, "Rick Weiser" <rickw (AT) designbais (DOT) com
wrote:

Hi all,

Is there an easy way to create a windows script to compile and catalog
a UV program from outside of the UV enviornment? I use a freeware
editor called Crimson on XP. I have been using it for jBASE and built
a script to compile and catalog a jBASE program. I want to do the same
with UV.

Does anyone know if this is possible?

UV still comes with UniDebugger doesn't it? On the client CD??
It seems to use the same editing "engine" as WED, UniEditor, et al....
It burns a licence, but don't they all at some stage or another?

But, with UV "device licencing", perhaps not....

Quote:
Thanks,

Rick
Regards,

Bruce Nichol
Talon Computer Services
ALBURY NSW Australia

http://www.taloncs.com.au

If it ain't broke, fix it until it is....
Regards,

Bruce Nichol
Talon Computer Services
ALBURY NSW Australia

http://www.taloncs.com.au

If it ain't broke, fix it until it is....


Reply With Quote
  #7  
Old   
Ross Ferris
 
Posts: n/a

Default Re: Compiling outside of UV - 05-20-2006 , 02:21 AM



I think what Rick must be doing is using Crimson, editing totally
OUTSIDE of the environment, then he files & runs script, which fires of
a connection (to jBase), does the compile, and then exits.

If this was D3, you would use D3TCL in the script, so if I'm reading
this correctly, Rick wants a command line that will fire off Universe,
do a compile, then exit, so he is only using the UV licence for the
period of time that the compile works.

This is the way that our code editor in Visage works, but somehow I'm
guessing that Rick would have "problems" with this ;-)


Reply With Quote
  #8  
Old   
 
Posts: n/a

Default Re: Compiling outside of UV - 05-20-2006 , 05:05 AM



Hi,

Under Universe "basic" is a external program located into uv/bin.
a the OS shell level you can launch "../uv/bin/basic FILENAME ITEMNAME,
the current path must be the "account path" because basic open the VOC.
and yes, it take a license to perform is basic action.
It work same under windows

exenple :

[root@linuxsrv SB+]#
[root@linuxsrv SB+]# $UV/bin/basic INBASIC.UV UV.MULTI.BACKUP
Compiling: Source = 'INBASIC.UV/UV.MULTI.BACKUP', Object =
'INBASIC.UV.O/UV.MULTI.BACKUP'
****************
Compilation Complete.
[root@linuxsrv SB+]#

alos, you can invoke universe from osshell with parametre like this
cd $youraccount
uv "yourvocverb param1 param2 ..."

universe is launched, it execute yourvocverb and terminate immediately.

I hope this help
manu

"Rick Weiser" <rickw (AT) designbais (DOT) com> a écrit dans le message de news:
1148061540.404633.314260 (AT) 38g200...oglegroups.com...
Quote:
Hi all,

Is there an easy way to create a windows script to compile and catalog
a UV program from outside of the UV enviornment? I use a freeware
editor called Crimson on XP. I have been using it for jBASE and built
a script to compile and catalog a jBASE program. I want to do the same
with UV.

Does anyone know if this is possible?

Thanks,

Rick




Reply With Quote
  #9  
Old   
Tony Gravagno
 
Posts: n/a

Default Re: Compiling outside of UV - 05-20-2006 , 07:10 AM



I wrote the code to satisfy Rick's request and am tentatively calling
it mvExec. I've also written documentation (yes, just wrote the
software _and_ complete docs) which includes the introduction below.
I might offer this code as trialware with some nags and offer a
nag-free registered version. Comments and questions about what it can
and cannot do are welcome.

T
--------------------

When executed on a Windows system, mvExec sends a message and data to
an MV DBMS, and then returns the results. This seems simple enough
but consider the possibilities:
1 Use your favorite Windows editor to edit your code. Let mvExec send
the program to your MV DBMS server where it will save the code,
compile it, and send the results back.
2 Pass command-line queries from the DOS command line on a workstation
to your DBMS on another server and return the results.
3 Script commands to execute from other processes like Word, Excel,
Outlook, or any program that can execute command-line instructions.
4 Generate data from any program and send the results to the DBMS for
storage or processing. This includes logs, transactions, and error
reports.
5 Instruct a DBMS running on localhost to cleanly shutdown first if
you shutdown Windows - or cleanly shutdown by clicking an icon on the
desktop.
6 Execute a remote Web Service and send the data to the DBMS for
processing.
7 Pull data from the DBMS and send it out via a Web Service for
processing by some other system.
.....The applications for this are limitless....

How it works:
mvExec opens a connection through mv.NET to a specified DBMS, does a
login like any user, runs a program, captures the results, then
terminates the connection. (With session pooling mvExec will attach
to existing connections, eliminating the performance penalties of
constant reconnection.)

What's required:

Client
1 Microsoft .NET Framework 2.0
2 mv.NET Client Redistributable Deployment Kit v2.1.4 or above
3 Access to mv.NET configuration profiles

DBMS Server
1 mv.NET installed and licensed
2 User-written programs that are going to be called from mvExec

mvExec includes security features to prevent unauthorized usage.

Usage examples:

mvexec compile
This simple command will compile a program saved to compile.mv1. The
results will be returned from the DBMS, maybe OpenQM, and stored in
file compile.mv1.

mvexec listu o
This executes a listu command and outputs the results locally as
though you were sitting at TCL on the DBMS server itself, which might
be D3.

mvexec daily_sys1 o > results.htm
mvexec daily_sys2 o >> results.htm
This runs daily processing on DBMS sys1, which might be Universe,
saves the results to a local website file. The next statement runs
the same process on another DBMS, maybe Unidata, and appends the
results to the original file.

excelexport today.xls
rename sheet1.csv today.mv1
mvexec today
This uses my ExcelExport freeware to extract Excel data into CSV
format. The resulting file is renamed to prepare it for mvExec. Then
the 'today' function is executed to send the data up to the DBMS,
maybe Reality.

--

Reply With Quote
  #10  
Old   
Dave Mitchell
 
Posts: n/a

Default Re: Compiling outside of UV - 05-22-2006 , 07:53 PM



It seems Rick is asking for a Windows script (or batch file, for us old DOS
fogies) to compile and catalog a basic program in UV. manufv's answer so
far seems the closest, but the UV command invoked directly from a DOS
command line doesn't seem to want to catalog.

So, here's my solution:

1) Write a BASIC program somewhere that accepts command line input using
@SENTENCE, and parse out fields 2 and 3 for filename and program name, then
simply execute two commands to compile and catalog. Compile and catalog
this program somewhere (I called my program DOS.COMP, and compiled and
cataloged it in an account I have called MIS).

2) Use this anytime from a DOS command line to compile and catalog any given
program, using

C:\whatever\uv\bin\UV DOS.COMP filename programname

in your batch file.

My DOS.COMP code:

TCL = @SENTENCE
FILENAME = FIELD(TCL," ",2)
PROGNAME = FIELD(TCL," ",3)
IF FILENAME = "" OR PROGNAME = "" THEN
GOSUB Usage
STOP
END
CMD1 = "BASIC ":FILENAME:" ":PROGNAME
CMD2 = "CATALOG ":FILENAME:" ":PROGNAME
EXECUTE CMD1
EXECUTE CMD2
STOP
*
Usage:
PRINT "USAGE: DOS.COMP Filename ProgramName"
RETURN

I wrote a simple "Hello World" program in the PGM file of the MIS account,
and called it MITCH. I didn't compile or catalog it, though. Then I ran:

C:\IBM\Accounts\MIS>..\..\uv\bin\UV DOS.COMP PGM MITCH

from a DOS command line. The output was:

Compiling: Source = 'PGM/MITCH', Object = 'PGM.O/MITCH'


Compilation Complete.
"MITCH" cataloged.

Going back into UV, into my MIS account, I simply type MITCH, and it says
Hello World, just as if I had comiled and cataloged it within UV.

Hope this helps

Mitch


"Rick Weiser" <rickw (AT) designbais (DOT) com> wrote

Quote:
Hi all,

Is there an easy way to create a windows script to compile and catalog
a UV program from outside of the UV enviornment? I use a freeware
editor called Crimson on XP. I have been using it for jBASE and built
a script to compile and catalog a jBASE program. I want to do the same
with UV.

Does anyone know if this is possible?

Thanks,

Rick




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.