Stu:
Here are a couple examples from the wicki program:
For when I want to test a subroutine with common:
BPTEST $INCLUDE DTABP,INCLUDES SET.NAMED.COMMON ; $INCLUDE DTABP,INCLUDES
SET.INITIALIZATION ; A = NULL$ ; B = NULL$ ; C = NULL$ ; CALL
MY.SPECIAL.SUBROUTINE (A, B, C) ; CRT "A-: " : A ; CRT "B-: " : B ; CRT "C-:
" C ; END
For when I want to know the results of a BASIC statement:
BPTEST CRT TRIM('Now is the time', ' ', 'A')
For when I want to do something from a proc (like update something):
PQ
C-->
C--> Create the new file
C-->
RI
RO
C-->
HBPTEST $OPTIONS EXT ;
H PORT.ACCT = FIELD(OCONV('', 'U50BB'), ' ', 3) ;
H TclCmd = \LOGTO MyAccount, MyPasswd\ ;
H TclCmd<-1> = \CREATE-FILE SERVICES 1 7\ ;
H EXECUTE TclCmd CAPTURING OUTPUT ;
H PORT.USER = PORT.USER<1,1>
H PORT.ACCT = FIELD(PORT.WHO, ' ', A.POS)
H PORT.ACCT = PORT.ACCT<1,1>
P
C-->
C--> End of job
Hope this is of some use. Someone asked me: "why use anything else?". So I
don't. :-)
Bill
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Behalf Of Stu Glancy
> Sent: Wednesday, October 20, 2004 9:49 AM
> To: [EMAIL PROTECTED]
> Subject: Re: [U2] [UD] running a subroutine
>
>
> Criticisms for Mark:
>
> Your concept won't work if there are commons that need to be set in the
> calling program. However, with the use of named commons they can be set
> in a test program and then use your print which includes the "$INCLUDE
> file named.commons" in the command line. (For those who don't know,
> named commons remain in memory between programs and can be used again
> until you logout.)
>
>
>
> Bill H. wrote:
>
> >Mark:
> >
> >The program at http://www.pickwiki.com/cgi-bin/wiki.pl?BPTest
> doesn't even
> >have these limitations.
> >
> >This wiki has some pretty nice free programs. I like to take
> the non-mvDbms
> >attitude: it's free so use it. :-) We should all post our free programs
> >there.
> >
> >Bill
> >
> >
> >
> >>-----Original Message-----
> >>From: [EMAIL PROTECTED]
> >>[mailto:[EMAIL PROTECTED] Behalf Of Mark Johnson
> >>Sent: Wednesday, October 20, 2004 5:54 AM
> >>To: [EMAIL PROTECTED]
> >>Subject: Re: [U2] [UD] running a subroutine
> >>
> >>
> >
> >[snipped]
> >
> >
> >
> >>In fact, I welcome any criticisms or limitations anyone would
> have against
> >>establishing this PRINT command to handle everything. I know of 2
> >>limits: 1)
> >>No hanging ELSE or THENs. 2) Cannot use READNEXT. Other than
> that I'm all
> >>ears.
> >>
> >>My 3 cents.
> >>
> >>----- Original Message -----
> >>From: "Peter Olson" <[EMAIL PROTECTED]>
> >>To: <[EMAIL PROTECTED]>
> >>Sent: Tuesday, October 19, 2004 8:43 AM
> >>Subject: RE: [U2] [UD] running a subroutine
> >>
> >>
> >>
> >>
> >>>"but i want more!"
> >>>
> >>>found it!
> >>>
> >>>0001: PQ
> >>>0002: HSELECT
> >>>0003: H EVAL "SUBR('
> >>>0004: A\2
> >>>0005: H',
> >>>0006: A3
> >>>0007: H )" FROM VOC FIRST 1;
> >>>0008: P
> >>>
> >>>now it's
> >>>
> >>>tcl>TS AGE.DATE -2224,42
> >>>
> >>>Cool.... thanks!
> >>>
> >>>
> >-------
> >u2-users mailing list
> >[EMAIL PROTECTED]
> >To unsubscribe please visit http://listserver.u2ug.org/
> -------
> u2-users mailing list
> [EMAIL PROTECTED]
> To unsubscribe please visit http://listserver.u2ug.org/
-------
u2-users mailing list
[EMAIL PROTECTED]
To unsubscribe please visit http://listserver.u2ug.org/