![]() | |
#1
| |||
| |||
|
|
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 |
#2
| |||
| |||
|
|
A few months ago I posted a question on how to compile a UV Basic program from outside of UV. Dave Mitchel was kind enough to supply the following answer: 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 This works fine but only if UV is on the localhost. I now have the need to do this same thing but remotely. I am working on a PC that has access to the UV host (all windows) and I want to compile and catalog programs on the UV host remotely. I have been thinking about creating a VBscript to do this but since I have never worked with UniObjects before I am having difficulty. If anyone has any suggestions that of course won't cost me anything, I would greatly appreciate it. Thanks, Rick |
#3
| |||
| |||
|
|
A few months ago I posted a question on how to compile a UV Basic program from outside of UV. Dave Mitchel was kind enough to supply the following answer: [snip] This works fine but only if UV is on the localhost. I now have the need to do this same thing but remotely. I am working on a PC that has access to the UV host (all windows) and I want to compile and catalog programs on the UV host remotely. I have been thinking about creating a VBscript to do this but since I have never worked with UniObjects before I am having difficulty. If anyone has any suggestions that of course won't cost me anything, I would greatly appreciate it. Thanks, Rick |
![]() |
| Thread Tools | |
| Display Modes | |
| |