Here it is, pretty quickly.

Create a Databasic Program, I call mine PRINT (losing regard for PRINT being
there). That is a simple program that takes the @COMMAND or PROCREAD or
TCLREAD line you just typed as the first line in a Basic program, throw an
END at the end, compile and run itself.

Thus, you can have this or virtually any single line program run from TCL.
This is the absolutely best and simplest method. I use this 100's of time a
day for testing the OCONV's, simple math, anything. Its only limitation is
multiple line IF statements or anything with an ELSE.

PRINT ; CALL MY.SUB(ARG1, ARG2, WHATEVER) ; PRINT WHATEVER

PRINT 5+5
PRINT OCONV("12345","DMA")
PRINT ; OPEN "MD" THEN READ X FROM "YOUR.ID" THEN WRITEV "A" ON "SOMETHING",
2
PRINT ; FOR I=1 TO 15 STEP 2 ; PRINT I,I*11 ; NEXT I

ED MD PRINT
001 PQN
002 HRUN BP PRINT.PROG
003 P

ED BP PRINT.PROG
001 PROCREAD TEST ELSE STOP
OR
001 TCLREAD TEST
OR
001 [EMAIL PROTECTED]
001+ CONVERT CHAR(254) TO " " IN TEST
002 OPEN "BP" TO F.BP ELSE STOP
003 TEST<2>="END"
004 ID="PRINTTT"
005 WRITE TEST ON F.BP, ID
006 EXECUTE "DECATALOG BP ":ID
007 EXECUTE "BASIC BP ":ID
008 EXECUTE "RUN BP ":ID

That's it. I created this in 1978 and have written 2 articles about it, one
in Datastream and the other for Spectrum. It should be part of the MV OS.

My 3 cents.

----- Original Message -----
From: "Chauhan, Savita" <[EMAIL PROTECTED]>
To: <u2-users@listserver.u2ug.org>
Sent: Tuesday, February 01, 2005 5:48 PM
Subject: [U2] [AD] UniBasic Program with arguments


> Hi,
>
> I am trying to run a unibasic program (external subroutine) that takes
> two arguments.
> I don't know how do I pass it the arguments if I run it directly from
> shel prompt instead of calling it from another program.
> I have gone through the manual, but can't find anything. Pls help.
>
> Thanks
> Savita.
> -------
> u2-users mailing list
> u2-users@listserver.u2ug.org
> To unsubscribe please visit http://listserver.u2ug.org/
-------
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/

Reply via email to