dbTalk Databases Forums  

Help me with redback and unibasic

comp.databases.pick comp.databases.pick


Discuss Help me with redback and unibasic in the comp.databases.pick forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
liahus@gmail.com
 
Posts: n/a

Default Help me with redback and unibasic - 03-14-2006 , 07:16 AM






Hello all,
Iam new to this group and i have a doubt regarding RedBack.I am
working on ASP application with redback and UniBasic. Its basically
conversion or web enabling of the unibasic application. however i am
stuck up at a point where in i have to use redback method which is
making calls to some subroutines which are written in redback and i
need to abort from one of those subroutines and get back to ASP. if it
were to be unibasic i could have used STOP or ABORT but looks like
RedBack doesnt support either of them. could some one please suggest me
an alternate methodology to overcome this problem.


Reply With Quote
  #2  
Old   
dawn
 
Posts: n/a

Default Re: Help me with redback and unibasic - 03-14-2006 , 07:59 AM







liahus (AT) gmail (DOT) com wrote:
Quote:
Hello all,
Iam new to this group and i have a doubt regarding RedBack.I am
working on ASP application with redback and UniBasic. Its basically
conversion or web enabling of the unibasic application. however i am
stuck up at a point where in i have to use redback method which is
making calls to some subroutines which are written in redback and i
need to abort from one of those subroutines and get back to ASP. if it
were to be unibasic i could have used STOP or ABORT but looks like
RedBack doesnt support either of them. could some one please suggest me
an alternate methodology to overcome this problem.
If you have any trouble getting responses here, you might want to
subscribe to the u2-users list with instructions found on the u2ug.org
web site. There are a LOT more RedBack users there, I suspect.
Cheers! --dawn



Reply With Quote
  #3  
Old   
daverch@gmail.com
 
Posts: n/a

Default Re: Help me with redback and unibasic - 03-14-2006 , 01:41 PM



To get back to your ASP program you need to just do a return.

Doug
www.u2logic.com
XLr8 the tool for RedBack

liahus (AT) gmail (DOT) com wrote:
Quote:
Hello all,
Iam new to this group and i have a doubt regarding RedBack.I am
working on ASP application with redback and UniBasic. Its basically
conversion or web enabling of the unibasic application. however i am
stuck up at a point where in i have to use redback method which is
making calls to some subroutines which are written in redback and i
need to abort from one of those subroutines and get back to ASP. if it
were to be unibasic i could have used STOP or ABORT but looks like
RedBack doesnt support either of them. could some one please suggest me
an alternate methodology to overcome this problem.


Reply With Quote
  #4  
Old   
liahus@gmail.com
 
Posts: n/a

Default Re: Help me with redback and unibasic - 03-16-2006 , 01:14 AM



well in my case i have various GOSUB and CALL statements and hence if
iam gonna just use RETURN then the control would just transfer to the
next statement after the GOSUB or in some cases to the stmt after CALL.
but i need to completely come out of all the subroutines and get back
to ASP. anyways i have decided to put flags, check them after each
gosub and each call and use return statements. this ofcourse is a long
tideous process and i fear i might miss out something somewhere and it
would be a great difficulty in identifying any problem if it
arises.anyways thanks alot.

daverch (AT) gmail (DOT) com wrote:
Quote:
To get back to your ASP program you need to just do a return.

Doug
www.u2logic.com
XLr8 the tool for RedBack

liahus (AT) gmail (DOT) com wrote:
Hello all,
Iam new to this group and i have a doubt regarding RedBack.I am
working on ASP application with redback and UniBasic. Its basically
conversion or web enabling of the unibasic application. however i am
stuck up at a point where in i have to use redback method which is
making calls to some subroutines which are written in redback and i
need to abort from one of those subroutines and get back to ASP. if it
were to be unibasic i could have used STOP or ABORT but looks like
RedBack doesnt support either of them. could some one please suggest me
an alternate methodology to overcome this problem.


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

Default Re: Help me with redback and unibasic - 03-16-2006 , 01:46 AM



That problem is as old as subroutines. You need to keep track of the stack
depth and then if an abort is needed you can pop the stack the number of
times necessary so that the next RETURN is the last in the stack. I sent an
ancient subroutine to Robert C. to try on Maverick and heard some real noise
from him about "that stack popping Return To". Even with an OOP language
you need a class that cleans up when certain types of exceptions occur.
Depending on your flavor of MV there is probably a System(n) that will tell
you the depth of the stack. But if you use it then you might encounter a
problem if you want to port to a different flavor. Flags work - but can be
very difficult to debug because they are the very definition of "spaghetti
code".
BobJ

<liahus (AT) gmail (DOT) com> wrote

Quote:
well in my case i have various GOSUB and CALL statements and hence if
iam gonna just use RETURN then the control would just transfer to the
next statement after the GOSUB or in some cases to the stmt after CALL.
but i need to completely come out of all the subroutines and get back
to ASP. anyways i have decided to put flags, check them after each
gosub and each call and use return statements. this ofcourse is a long
tideous process and i fear i might miss out something somewhere and it
would be a great difficulty in identifying any problem if it
arises.anyways thanks alot.

daverch (AT) gmail (DOT) com wrote:
To get back to your ASP program you need to just do a return.

Doug
www.u2logic.com
XLr8 the tool for RedBack

liahus (AT) gmail (DOT) com wrote:
Hello all,
Iam new to this group and i have a doubt regarding RedBack.I am
working on ASP application with redback and UniBasic. Its basically
conversion or web enabling of the unibasic application. however i am
stuck up at a point where in i have to use redback method which is
making calls to some subroutines which are written in redback and i
need to abort from one of those subroutines and get back to ASP. if it
were to be unibasic i could have used STOP or ABORT but looks like
RedBack doesnt support either of them. could some one please suggest me
an alternate methodology to overcome this problem.




Reply With Quote
  #6  
Old   
don
 
Posts: n/a

Default Re: Help me with redback and unibasic - 03-16-2006 , 07:17 AM




<liahus (AT) gmail (DOT) com> wrote

Quote:
Hello all,
Iam new to this group and i have a doubt regarding RedBack.I am
working on ASP application with redback and UniBasic. Its basically
conversion or web enabling of the unibasic application. however i am
stuck up at a point where in i have to use redback method which is
making calls to some subroutines which are written in redback and i
need to abort from one of those subroutines and get back to ASP. if it
were to be unibasic i could have used STOP or ABORT but looks like
RedBack doesnt support either of them. could some one please suggest me
an alternate methodology to overcome this problem.

Make your subroutine less dependent on the UI, ie you're assumming your
program is being executed in a Unibasic session using telnet. It's not just
good advice for Redback users.

Example:

SUBROUNTINE B.GET.MYDATA(S.STATUS)
*
S.STATUS = 0
*
FILE.ERROR = ''
OPEN '','MY.DATA.FILE' TO F.MY.DATA.FILE ELSE FILE.ERROR<-1> =
'MY.DATA.FILE'
IF LEN(FILE.ERROR) > 0 THEN
S.STATUS<1> = 1
S.STATUS<2> = 'Cannot open Required Files: ':CHANGE(FILE.ERROR,@AM,",
"):"."
RETURN
END
*
(the above is a *sample* for demostration, but flame if you must)


Then your Redback method (or any other program for that matter) can call
this program, check the value of S.STATUS<1> when it returns and set the
appropriate Object(s) value with the status code and message.

Hope that gives you an idea.

Don Verhagen
Tandem Staffing Solutions, Inc.






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.