Re: [U2] Is there any way to tell if I am in an EXECUTE level andCAPTURING is turned on?

2012-06-26 Thread Ed Clark
That's only partially correct.

The capture log file is put into _PH_ in the account that you originally logged 
in to. If you change accounts with LOGTO you will need to use the @ACCOUNT 
variable to find the original account path.

The capture file name (on my windows system) is Z_nnn where  is your 
pid (@userno). The pid does not appear to be padded, so can be any length. nnn 
appears to be the @LEVEL of the program that does the execute with capturing. 
So if you have program1 execute program2 which executes program3 with 
capturing, you will have a file Z_001 open during program3. If program1 
executes program2 with capturing, which executes program3, you will have 
Z_000 open during program2 and program3. If you nest more levels and have 
more than 1 program execute with capture, then you have 2 capture files. 
unidata doesn't allow more than 2 captures at a time.

So to find out if you were capturing, you would have to look in the original 
account's _PH_, and either select ids like Z_3npid, or loop and read for n=0 to 
@level-1. That could potentially be a lot of overhead on a live system where 
there are lots of captures going on. Or maybe not since most programs don't 
nest too deeply, and you only need to check for the file when you need to know.

Are you on windows or on something else? If you aren't on windows, you could 
maybe open the tty device directly and write to it rather than using crt. I 
think that would go to the screen.


On Jun 26, 2012, at 1:23 PM, Symeon Breen wrote:

>> From experimentation on unidata on linux, if you execute something with
> capturing it creates an entry in _PH_ of Z_{pid}  the pid is zero filled to
> 8 digits e.g. _PH_/Z_00022141
> 
> 
> 
> 
> -Original Message-
> From: u2-users-boun...@listserver.u2ug.org
> [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of David A. Green
> Sent: 26 June 2012 15:01
> To: 'U2 Users List'
> Subject: Re: [U2] Is there any way to tell if I am in an EXECUTE level
> andCAPTURING is turned on?
> 
> How about creating a COMMON variable that the program can set before
> executing the command with a CAPTURING clause?
> 
> David A. Green
> (480) 813-1725
> DAG Consulting
> 
> -Original Message-
> From: u2-users-boun...@listserver.u2ug.org
> [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Doug Farmer
> Sent: Friday, June 22, 2012 6:49 AM
> To: U2 Users List
> Subject: Re: [U2] Is there any way to tell if I am in an EXECUTE level
> andCAPTURING is turned on?
> 
> UniData 
> 
> Looks like there is no easy solution. Messages are shown in a generic
> subroutine and I do not want to do a lot of IO or CPU time to determine if
> CAPTURING is on. The subroutine is called thousands of times a day for a
> user. For the few times this has happened over the years, I guess I will
> just fix the problems when they come up.
> 
> Thanks everyone for their input.
> 
> Doug
> 
> 
> -Original Message-
> From: u2-users-boun...@listserver.u2ug.org
> [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Ed Clark
> Sent: Thursday, June 21, 2012 5:22 PM
> To: U2 Users List
> Subject: Re: [U2] Is there any way to tell if I am in an EXECUTE level
> andCAPTURING is turned on?
> 
> universe or unidata? I don't have a full answer either way, but I seem to
> recall that unidata holds CAPTURING output in a temporary file. Maybe that
> file can be checked for.
> 
> On Jun 21, 2012, at 10:08 AM, Doug Farmer wrote:
> 
>> I just had a situation where a program was printing an error message 
>> and waiting for the user to respond by pressing Enter. But, the 
>> program was being executed by another program using the CAPTURING
> option.
>> 
>> Is there any way someone knows of to tell if the CAPTURING option is
> on?
>> If so, I can write the error message to a log file instead of 
>> displaying it and waiting for a response.
>> 
>> I looked at all the SYSTEM(xx) options and do not see anything there.
>> 
>> Thanks in Advance
>> 
>> Doug
>> 
>> 
>> This e-mail is for the use of the intended recipient(s) only. If you
> have received this e-mail in error, please notify the sender immediately and
> then delete it. If you are not the intended recipient, you must not use,
> disclose or distribute this e-mail without the author's prior permission. We
> have taken precautions to minimize the risk of transmitting software
> viruses, but we advise you to carry out your own virus checks on any
> attachment to this message. We cannot accept liability for any loss or
> damage caused by software viruses. Any view

Re: [U2] Is there any way to tell if I am in an EXECUTE level andCAPTURING is turned on?

2012-06-26 Thread Symeon Breen
>From experimentation on unidata on linux, if you execute something with
capturing it creates an entry in _PH_ of Z_{pid}  the pid is zero filled to
8 digits e.g. _PH_/Z_00022141




-Original Message-
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of David A. Green
Sent: 26 June 2012 15:01
To: 'U2 Users List'
Subject: Re: [U2] Is there any way to tell if I am in an EXECUTE level
andCAPTURING is turned on?

How about creating a COMMON variable that the program can set before
executing the command with a CAPTURING clause?

David A. Green
(480) 813-1725
DAG Consulting

-Original Message-
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Doug Farmer
Sent: Friday, June 22, 2012 6:49 AM
To: U2 Users List
Subject: Re: [U2] Is there any way to tell if I am in an EXECUTE level
andCAPTURING is turned on?

UniData 

Looks like there is no easy solution. Messages are shown in a generic
subroutine and I do not want to do a lot of IO or CPU time to determine if
CAPTURING is on. The subroutine is called thousands of times a day for a
user. For the few times this has happened over the years, I guess I will
just fix the problems when they come up.

Thanks everyone for their input.

Doug


-Original Message-
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Ed Clark
Sent: Thursday, June 21, 2012 5:22 PM
To: U2 Users List
Subject: Re: [U2] Is there any way to tell if I am in an EXECUTE level
andCAPTURING is turned on?

universe or unidata? I don't have a full answer either way, but I seem to
recall that unidata holds CAPTURING output in a temporary file. Maybe that
file can be checked for.

On Jun 21, 2012, at 10:08 AM, Doug Farmer wrote:

> I just had a situation where a program was printing an error message 
> and waiting for the user to respond by pressing Enter. But, the 
> program was being executed by another program using the CAPTURING
option.
> 
> Is there any way someone knows of to tell if the CAPTURING option is
on?
> If so, I can write the error message to a log file instead of 
> displaying it and waiting for a response.
> 
> I looked at all the SYSTEM(xx) options and do not see anything there.
> 
> Thanks in Advance
> 
> Doug
> 
> 
> This e-mail is for the use of the intended recipient(s) only. If you
have received this e-mail in error, please notify the sender immediately and
then delete it. If you are not the intended recipient, you must not use,
disclose or distribute this e-mail without the author's prior permission. We
have taken precautions to minimize the risk of transmitting software
viruses, but we advise you to carry out your own virus checks on any
attachment to this message. We cannot accept liability for any loss or
damage caused by software viruses. Any views and/or opinions expressed in
this e-mail are of the author only and do not represent the views of Epicor
Software Corporation or any other company within its group.
> 
> 
> This message has been scanned for malware by Websense. 
> www.websense.com ___
> U2-Users mailing list
> U2-Users@listserver.u2ug.org
> http://listserver.u2ug.org/mailman/listinfo/u2-users

___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


Click
https://www.mailcontrol.com/sr/ZHJSQLX+SpPTndxI!oX7Us7Qlo!t9IHt4WE2DA5Hj
!kWNSr8qrt6LXg6vr6+3RaGatMIqsrnApW1yubdBaCdqw==  to report this email as
spam.


This e-mail is for the use of the intended recipient(s) only. If you have
received this e-mail in error, please notify the sender immediately and then
delete it. If you are not the intended recipient, you must not use, disclose
or distribute this e-mail without the author's prior permission. We have
taken precautions to minimize the risk of transmitting software viruses, but
we advise you to carry out your own virus checks on any attachment to this
message. We cannot accept liability for any loss or damage caused by
software viruses. Any views and/or opinions expressed in this e-mail are of
the author only and do not represent the views of Epicor Software
Corporation or any other company within its group.
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users

___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users
-
No virus found in this message.
Checked by AVG - www.avg.com
Version: 2012.0.2180 / Virus Database: 2437/5093 - Release Date: 06/25/12

__

Re: [U2] Is there any way to tell if I am in an EXECUTE level andCAPTURING is turned on?

2012-06-26 Thread David A. Green
How about creating a COMMON variable that the program can set before
executing the command with a CAPTURING clause?

David A. Green
(480) 813-1725
DAG Consulting

-Original Message-
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Doug Farmer
Sent: Friday, June 22, 2012 6:49 AM
To: U2 Users List
Subject: Re: [U2] Is there any way to tell if I am in an EXECUTE level
andCAPTURING is turned on?

UniData 

Looks like there is no easy solution. Messages are shown in a generic
subroutine and I do not want to do a lot of IO or CPU time to determine if
CAPTURING is on. The subroutine is called thousands of times a day for a
user. For the few times this has happened over the years, I guess I will
just fix the problems when they come up.

Thanks everyone for their input.

Doug


-Original Message-
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Ed Clark
Sent: Thursday, June 21, 2012 5:22 PM
To: U2 Users List
Subject: Re: [U2] Is there any way to tell if I am in an EXECUTE level
andCAPTURING is turned on?

universe or unidata? I don't have a full answer either way, but I seem to
recall that unidata holds CAPTURING output in a temporary file. Maybe that
file can be checked for.

On Jun 21, 2012, at 10:08 AM, Doug Farmer wrote:

> I just had a situation where a program was printing an error message 
> and waiting for the user to respond by pressing Enter. But, the 
> program was being executed by another program using the CAPTURING
option.
> 
> Is there any way someone knows of to tell if the CAPTURING option is
on?
> If so, I can write the error message to a log file instead of 
> displaying it and waiting for a response.
> 
> I looked at all the SYSTEM(xx) options and do not see anything there.
> 
> Thanks in Advance
> 
> Doug
> 
> 
> This e-mail is for the use of the intended recipient(s) only. If you
have received this e-mail in error, please notify the sender immediately and
then delete it. If you are not the intended recipient, you must not use,
disclose or distribute this e-mail without the author's prior permission. We
have taken precautions to minimize the risk of transmitting software
viruses, but we advise you to carry out your own virus checks on any
attachment to this message. We cannot accept liability for any loss or
damage caused by software viruses. Any views and/or opinions expressed in
this e-mail are of the author only and do not represent the views of Epicor
Software Corporation or any other company within its group.
> 
> 
> This message has been scanned for malware by Websense. 
> www.websense.com ___
> U2-Users mailing list
> U2-Users@listserver.u2ug.org
> http://listserver.u2ug.org/mailman/listinfo/u2-users

___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


Click
https://www.mailcontrol.com/sr/ZHJSQLX+SpPTndxI!oX7Us7Qlo!t9IHt4WE2DA5Hj
!kWNSr8qrt6LXg6vr6+3RaGatMIqsrnApW1yubdBaCdqw==  to report this email as
spam.


This e-mail is for the use of the intended recipient(s) only. If you have
received this e-mail in error, please notify the sender immediately and then
delete it. If you are not the intended recipient, you must not use, disclose
or distribute this e-mail without the author's prior permission. We have
taken precautions to minimize the risk of transmitting software viruses, but
we advise you to carry out your own virus checks on any attachment to this
message. We cannot accept liability for any loss or damage caused by
software viruses. Any views and/or opinions expressed in this e-mail are of
the author only and do not represent the views of Epicor Software
Corporation or any other company within its group.
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users

___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


Re: [U2] Is there any way to tell if I am in an EXECUTE level andCAPTURING is turned on?

2012-06-22 Thread Wjhonson

You can fillet the fish in another manner.
If this is a *subroutine* being *called* then why do you also have an Execute 
going on?
If the Execute...Capturing is the only Execute, then just use @LEVEL and for 
the level in question (say 3) you do this and if it's less than that, you do 
that.  That would solve the problem without worrying about Capturing at all.



-Original Message-
From: Doug Farmer 
To: U2 Users List 
Sent: Fri, Jun 22, 2012 7:16 am
Subject: Re: [U2] Is there any way to tell if I am in an EXECUTE level 
andCAPTURING is turned on?


UniData 
Looks like there is no easy solution. Messages are shown in a generic
ubroutine and I do not want to do a lot of IO or CPU time to determine
f CAPTURING is on. The subroutine is called thousands of times a day
or a user. For the few times this has happened over the years, I guess
 will just fix the problems when they come up.
Thanks everyone for their input.
Doug

Original Message-
rom: u2-users-boun...@listserver.u2ug.org
mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Ed Clark
ent: Thursday, June 21, 2012 5:22 PM
o: U2 Users List
ubject: Re: [U2] Is there any way to tell if I am in an EXECUTE level
ndCAPTURING is turned on?
universe or unidata? I don't have a full answer either way, but I seem
o recall that unidata holds CAPTURING output in a temporary file. Maybe
hat file can be checked for.
On Jun 21, 2012, at 10:08 AM, Doug Farmer wrote:
> I just had a situation where a program was printing an error message 
 and waiting for the user to respond by pressing Enter. But, the 
 program was being executed by another program using the CAPTURING
ption.
 
 Is there any way someone knows of to tell if the CAPTURING option is
n?
 If so, I can write the error message to a log file instead of 
 displaying it and waiting for a response.
 
 I looked at all the SYSTEM(xx) options and do not see anything there.
 
 Thanks in Advance
 
 Doug
 
 
 This e-mail is for the use of the intended recipient(s) only. If you
ave received this e-mail in error, please notify the sender immediately
nd then delete it. If you are not the intended recipient, you must not
se, disclose or distribute this e-mail without the author's prior
ermission. We have taken precautions to minimize the risk of
ransmitting software viruses, but we advise you to carry out your own
irus checks on any attachment to this message. We cannot accept
iability for any loss or damage caused by software viruses. Any views
nd/or opinions expressed in this e-mail are of the author only and do
ot represent the views of Epicor Software Corporation or any other
ompany within its group.
 
 
 This message has been scanned for malware by Websense. 
 www.websense.com ___
 U2-Users mailing list
 U2-Users@listserver.u2ug.org
 http://listserver.u2ug.org/mailman/listinfo/u2-users
___
2-Users mailing list
2-us...@listserver.u2ug.org
ttp://listserver.u2ug.org/mailman/listinfo/u2-users

lick
ttps://www.mailcontrol.com/sr/ZHJSQLX+SpPTndxI!oX7Us7Qlo!t9IHt4WE2DA5Hj
kWNSr8qrt6LXg6vr6+3RaGatMIqsrnApW1yubdBaCdqw==  to report this email as
pam.
---
This e-mail is for the use of the intended recipient(s) only. If you have 
eceived this e-mail in error, please notify the sender immediately and then 
elete it. If you are not the intended recipient, you must not use, disclose or 
istribute this e-mail without the author's prior permission. We have taken 
recautions to minimize the risk of transmitting software viruses, but we advise 
ou to carry out your own virus checks on any attachment to this message. We 
annot accept liability for any loss or damage caused by software viruses. Any 
iews and/or opinions expressed in this e-mail are of the author only and do not 
epresent the views of Epicor Software Corporation or any other company within 
ts group.
__
2-Users mailing list
2-us...@listserver.u2ug.org
ttp://listserver.u2ug.org/mailman/listinfo/u2-users

___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


Re: [U2] Is there any way to tell if I am in an EXECUTE level andCAPTURING is turned on?

2012-06-22 Thread Doug Farmer
UniData 

Looks like there is no easy solution. Messages are shown in a generic
subroutine and I do not want to do a lot of IO or CPU time to determine
if CAPTURING is on. The subroutine is called thousands of times a day
for a user. For the few times this has happened over the years, I guess
I will just fix the problems when they come up.

Thanks everyone for their input.

Doug


-Original Message-
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Ed Clark
Sent: Thursday, June 21, 2012 5:22 PM
To: U2 Users List
Subject: Re: [U2] Is there any way to tell if I am in an EXECUTE level
andCAPTURING is turned on?

universe or unidata? I don't have a full answer either way, but I seem
to recall that unidata holds CAPTURING output in a temporary file. Maybe
that file can be checked for.

On Jun 21, 2012, at 10:08 AM, Doug Farmer wrote:

> I just had a situation where a program was printing an error message 
> and waiting for the user to respond by pressing Enter. But, the 
> program was being executed by another program using the CAPTURING
option.
> 
> Is there any way someone knows of to tell if the CAPTURING option is
on?
> If so, I can write the error message to a log file instead of 
> displaying it and waiting for a response.
> 
> I looked at all the SYSTEM(xx) options and do not see anything there.
> 
> Thanks in Advance
> 
> Doug
> 
> 
> This e-mail is for the use of the intended recipient(s) only. If you
have received this e-mail in error, please notify the sender immediately
and then delete it. If you are not the intended recipient, you must not
use, disclose or distribute this e-mail without the author's prior
permission. We have taken precautions to minimize the risk of
transmitting software viruses, but we advise you to carry out your own
virus checks on any attachment to this message. We cannot accept
liability for any loss or damage caused by software viruses. Any views
and/or opinions expressed in this e-mail are of the author only and do
not represent the views of Epicor Software Corporation or any other
company within its group.
> 
> 
> This message has been scanned for malware by Websense. 
> www.websense.com ___
> U2-Users mailing list
> U2-Users@listserver.u2ug.org
> http://listserver.u2ug.org/mailman/listinfo/u2-users

___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


Click
https://www.mailcontrol.com/sr/ZHJSQLX+SpPTndxI!oX7Us7Qlo!t9IHt4WE2DA5Hj
!kWNSr8qrt6LXg6vr6+3RaGatMIqsrnApW1yubdBaCdqw==  to report this email as
spam.


This e-mail is for the use of the intended recipient(s) only. If you have 
received this e-mail in error, please notify the sender immediately and then 
delete it. If you are not the intended recipient, you must not use, disclose or 
distribute this e-mail without the author's prior permission. We have taken 
precautions to minimize the risk of transmitting software viruses, but we 
advise you to carry out your own virus checks on any attachment to this 
message. We cannot accept liability for any loss or damage caused by software 
viruses. Any views and/or opinions expressed in this e-mail are of the author 
only and do not represent the views of Epicor Software Corporation or any other 
company within its group.
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users