dbTalk Databases Forums  

PROC exit

comp.databases.pick comp.databases.pick


Discuss PROC exit in the comp.databases.pick forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Scott Ballinger
 
Posts: n/a

Default PROC exit - 04-25-2007 , 11:16 AM






Does anyone have a suggestion on how to abort a proc (or D3 macro)
from a basic program? Here is an example:

1 pq
2 o this is part one
3 h run bp myprog
4 p
5 o this is part two

When I run this proc, I want myprog to prevent (under some
circumstances) the calling proc from continuing, i.e. so that I don't
see the "part two" message. For example: myprog could procwrite
something and the calling proc could test for it and then exit; but I
am hoping for something that won't mess with the proc buffers, like a
user exit or some other command. (D3/linux 7.5)

Thanks,
/Scott Ballinger
Pareto Corporation
Edmonds WA USA
206 713 6006


Reply With Quote
  #2  
Old   
chandru murthi
 
Posts: n/a

Default Re: PROC exit - 04-25-2007 , 02:51 PM






iirc, on Forge, which did run on D3, I had:

CHAIN 'PX'

where in MD
PX
001 PQ
002 RO
003 P

at this moment, memory fails as to why this worked, but it did (and does on
uv).

Chandru Murthi

"Scott Ballinger" <scott.ballinger (AT) gmail (DOT) com> wrote

Quote:
Does anyone have a suggestion on how to abort a proc (or D3 macro)
from a basic program? Here is an example:

1 pq
2 o this is part one
3 h run bp myprog
4 p
5 o this is part two

When I run this proc, I want myprog to prevent (under some
circumstances) the calling proc from continuing, i.e. so that I don't
see the "part two" message. For example: myprog could procwrite
something and the calling proc could test for it and then exit; but I
am hoping for something that won't mess with the proc buffers, like a
user exit or some other command. (D3/linux 7.5)

Thanks,
/Scott Ballinger
Pareto Corporation
Edmonds WA USA
206 713 6006



Reply With Quote
  #3  
Old   
Mark Brown
 
Posts: n/a

Default Re: PROC exit - 04-25-2007 , 04:40 PM



I would think it's because your killing the original process with the CHAIN
and moving on. The PX prod doesn't do anything and so the process dies.

I would also think, for Scott, you could make it CHAIN to the next higher
level of menu, some recovery point, something like that.


Mark


"chandru murthi" <cmurthixyz (AT) xyzseeinggreen (DOT) net> wrote

Quote:
iirc, on Forge, which did run on D3, I had:

CHAIN 'PX'

where in MD
PX
001 PQ
002 RO
003 P

at this moment, memory fails as to why this worked, but it did (and does
on uv).

Chandru Murthi

"Scott Ballinger" <scott.ballinger (AT) gmail (DOT) com> wrote in message
news:1177517772.458418.69070 (AT) o40g2000prh (DOT) googlegroups.com...
Does anyone have a suggestion on how to abort a proc (or D3 macro)
from a basic program? Here is an example:




Reply With Quote
  #4  
Old   
Ross Ferris
 
Posts: n/a

Default Re: PROC exit - 04-26-2007 , 02:45 AM



On Apr 26, 2:16 am, Scott Ballinger <scott.ballin... (AT) gmail (DOT) com> wrote:
Quote:
Does anyone have a suggestion on how to abort a proc (or D3 macro)
from a basic program? Here is an example:

1 pq
2 o this is part one
3 h run bp myprog
4 p
5 o this is part two

When I run this proc, I want myprog to prevent (under some
circumstances) the calling proc from continuing, i.e. so that I don't
see the "part two" message. For example: myprog could procwrite
something and the calling proc could test for it and then exit; but I
am hoping for something that won't mess with the proc buffers, like a
user exit or some other command. (D3/linux 7.5)

Thanks,
/Scott Ballinger
Pareto Corporation
Edmonds WA USA
206 713 6006
DEATH TO PROCs!!

Why not just re-write & have MYPROG go & run/write the rest of the
PROC if it needs to --> sounds like it is a control point anyway!




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

Default Re: PROC exit - 04-26-2007 , 12:44 PM



Scott Ballinger <scott.ballinger (AT) gmail (DOT) com> wrote in
news:1177517772.458418.69070 (AT) o40g2000prh (DOT) googlegroups.com:

Quote:
Does anyone have a suggestion on how to abort a proc (or D3 macro)
from a basic program? Here is an example:

1 pq
2 o this is part one
3 h run bp myprog
4 p
5 o this is part two

When I run this proc, I want myprog to prevent (under some
circumstances) the calling proc from continuing, i.e. so that I don't
see the "part two" message. For example: myprog could procwrite
something and the calling proc could test for it and then exit; but I
am hoping for something that won't mess with the proc buffers, like a
user exit or some other command. (D3/linux 7.5)

Thanks,
/Scott Ballinger
Pareto Corporation
Edmonds WA USA
206 713 6006
Don't know if you want to alter both the proc and the program, but if D3
supports it (I honestly don't know), you could do a PROCWRITE based on
your "circumstances". The proc would check the value of what the
program passed back and either continue or stop.

Regards,
Joe


Reply With Quote
  #6  
Old   
Tom Phillips
 
Posts: n/a

Default Re: PROC exit - 04-26-2007 , 07:58 PM



Scott - I use the proc buffer and procwrite.
I put an exit flag in a proc attribute and then test it:
IF A5 = STOP X
or something similar.
Hope this helps (your only other option is the "chain" one).
Tom...

"Scott Ballinger" <scott.ballinger (AT) gmail (DOT) com> wrote

Quote:
Does anyone have a suggestion on how to abort a proc (or D3 macro)
from a basic program? Here is an example:

1 pq
2 o this is part one
3 h run bp myprog
4 p
5 o this is part two

When I run this proc, I want myprog to prevent (under some
circumstances) the calling proc from continuing, i.e. so that I don't
see the "part two" message. For example: myprog could procwrite
something and the calling proc could test for it and then exit; but I
am hoping for something that won't mess with the proc buffers, like a
user exit or some other command. (D3/linux 7.5)

Thanks,
/Scott Ballinger
Pareto Corporation
Edmonds WA USA
206 713 6006




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.