jBase used to support proc user exits, for compatibility with the old assembler
versions.
I suspect the code still works.
We don’t use them but here’s a sample, docs might still be out there somewhere.
The jpq_namedcommon variables allow for query and setting of the buffer
pointers.
SUBROUTINE U088(result, source, code, type, error)
INCLUDE jpq_namedcommon
Ptr = IPBUFFPTR
IF Ptr > 1 THEN Ptr +=1 ; ! skip over the blank
IF PQproc THEN
Delim = " "
END ELSE
Delim = CHAR(254)
END
ucode = code<1,1,1>
! if called as U1088 then the prompt will be :
! if called as U(2-F) then the prompt will be "?"
! can thus be customized for 16 prompt chars
BEGIN CASE
CASE ucode = "1"
PROMPT ":"
CASE 1
PROMPT "?"
END CASE
INPUT Q
CurrData = IPBUFFER[Ptr,9999]
CData = FIELD(CurrData,Delim,1)
IF Q # "" THEN
P1 = IPBUFFER[1,Ptr-1]
P2 = CurrData[COL2(),999]
IPBUFFER = P1:Q:P2
END
RETURN
From: [email protected] <[email protected]> On Behalf Of Joyce White
Sent: Thursday, May 20, 2021 12:03 PM
To: jBASE <[email protected]>
Subject: Re: Call jBASE Function from Within a Proc?
Thanks, I find procs to be challenging because I'm not in them often. In this
case, I think I'm just going to write the check into the PROC. It should be a
pretty simple check. Thanks for the suggestions - I appreciate the advice and
help!
Joyce
On Thursday, May 20, 2021 at 2:52:00 PM UTC-4 edclark wrote:
No, I don’t think you can call it from proc directly. You would have to run it.
You probably need a wrapper program that would call your subroutine—unless
jBase lets you run subroutines now. Last time I used jBase (quite a while ago)
IIRC it didn’t allow you to CALL a program, or to EXECUTE a subroutine.
A wrapper program can use SYSTEM(27) to determine if it is running from a proc
and use PROCREAD to get the parameter from the input buffer, or SENTENCE() to
get it from the command line (proc primary output buffer).
On May 20, 2021, at 13:26, Joyce White <[email protected]
<mailto:[email protected]> > wrote:
So from your answer, it seems like I CAN call a jBASE subroutine from a proc,
just not with parameters? What is the syntax I would use to call a subroutine
with no parameters from a proc?
Joyce
On Thursday, May 20, 2021 at 12:32:25 PM UTC-4 edclark wrote:
Unless there have been some enhancements to icl, I don’t think that you can
call a subroutine with parameters.
Your validation program can either parse the parameter from the command line,
or retrieve it with PROCREAD. It can use PROCWRITE to return its result, or use
STOP, and then the proc can check IF E
On May 20, 2021, at 12:01, Joyce White <[email protected]
<mailto:[email protected]> > wrote:
Hi, I have a proc (jcl program) that needs a "date check". I'd like to write a
jBASE function for the date check, then call it from within the proc, having it
return to the proc after it checks the date. Is this doable? If so, what syntax
would I use to call the jBASE function (LIFE.LEFT.b) from within the proc?
I'm trying the line below and it's not working. My function is LIFE.LEFT, and
it takes a parameter that the user enters in the previous line (%3).
IF [LIFE.LEFT(%3)] = 1 GO 999
Thanks,
Joyce
--
--
IMPORTANT: T24/Globus posts are no longer accepted on this forum.
To post, send email to [email protected] <mailto:[email protected]>
To unsubscribe, send email to [email protected]
<mailto:[email protected]>
For more options, visit this group at http://groups.google.com/group/jBASE?hl=en
---
You received this message because you are subscribed to the Google Groups
"jBASE" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected] <mailto:[email protected]> .
To view this discussion on the web visit
https://groups.google.com/d/msgid/jbase/54d2fd8d-7d18-4e88-804d-a447e01a689dn%40googlegroups.com
<https://groups.google.com/d/msgid/jbase/54d2fd8d-7d18-4e88-804d-a447e01a689dn%40googlegroups.com?utm_medium=email&utm_source=footer>
.
--
--
IMPORTANT: T24/Globus posts are no longer accepted on this forum.
To post, send email to [email protected] <mailto:[email protected]>
To unsubscribe, send email to [email protected]
<mailto:[email protected]>
For more options, visit this group at http://groups.google.com/group/jBASE?hl=en
---
You received this message because you are subscribed to the Google Groups
"jBASE" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected] <mailto:[email protected]> .
To view this discussion on the web visit
https://groups.google.com/d/msgid/jbase/1f0a6ff7-4f75-4f85-ad18-1dc8507fbbf2n%40googlegroups.com
<https://groups.google.com/d/msgid/jbase/1f0a6ff7-4f75-4f85-ad18-1dc8507fbbf2n%40googlegroups.com?utm_medium=email&utm_source=footer>
.
--
--
IMPORTANT: T24/Globus posts are no longer accepted on this forum.
To post, send email to [email protected] <mailto:[email protected]>
To unsubscribe, send email to [email protected]
<mailto:[email protected]>
For more options, visit this group at http://groups.google.com/group/jBASE?hl=en
---
You received this message because you are subscribed to the Google Groups
"jBASE" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected]
<mailto:[email protected]> .
To view this discussion on the web visit
https://groups.google.com/d/msgid/jbase/b10eaa18-98df-4b8e-ac81-b300e528775dn%40googlegroups.com
<https://groups.google.com/d/msgid/jbase/b10eaa18-98df-4b8e-ac81-b300e528775dn%40googlegroups.com?utm_medium=email&utm_source=footer>
.
--
--
IMPORTANT: T24/Globus posts are no longer accepted on this forum.
To post, send email to [email protected]
To unsubscribe, send email to [email protected]
For more options, visit this group at http://groups.google.com/group/jBASE?hl=en
---
You received this message because you are subscribed to the Google Groups
"jBASE" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/jbase/003e01d74dad%24adf42aa0%2409dc7fe0%24%40proman.com.