RE: [U2] [UV] HP, Cron, Como, Execute, Capturing . Not (Solved!)

2009-02-25 Thread Tony G
Ken wins!
Running cron as a non-root user (probably a good idea anyway)
causes this environment to work properly.

Your prize is a free permanent end-user license for NebulaXLite
for any supported platform.  Developer licenses are free anyway
so for anyone else who contributed to this thread to this point,
I'll offer one permanent license at 50% off.  Given the economy,
maybe that's a new way for us to show our gratitude in these
forums?  :)

Thanks to all.
Tony Gravagno
Nebula Research and Development
TG@ remove.pleaseNebula-RnD.com


From: Ken Hall
 Tony -
 It just occurred to me that cron is running uv as root and that
when 
 root starts uv, the LOGIN proc does not run except in the uv
account. 
 Try changing the user in cron to a normal uv user and I bet
your 
 problem will go away.
...
 So it's a prog wrapped in COMO, in a paragraph, with 
 stdout redirected, executed from uv, within a script, 
 called from cron. (Sometimes I'm amazed any of this 
 works.)
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] [UV] HP, Cron, Como, Execute, Capturing . Not

2009-02-25 Thread Anthony W. Youngman
In message 
619f7eea7a19a945876205ff14ee8de10116e...@win2003.office.stamina.com.au,

 Ross Ferris ro...@stamina.com.au writes

Have you changed the code yet to avoid problem? You haven't mentioned
version of UV -- if not current, check later GTARs to see if issue
identified/resolved.

Get the customer going with a redirection/read ... obviously (?) new
code, but an

ls -l  /tmp/unique_filename


if you want the COMO to get it as well, try

ls -l | tee /tmp/unique_filename


will work across ANY *nix platform -- assume cron is running as same
user/permissions as when you fire from TCL


I'm not sure whether tee is available across all nix platforms, though.

Cheers,
Wol
--
Anthony W. Youngman pi...@thewolery.demon.co.uk
'Yings, yow graley yin! Suz ae rikt dheu,' said the blue man, taking the
thimble. 'What *is* he?' said Magrat. 'They're gnomes,' said Nanny. The man
lowered the thimble. 'Pictsies!' Carpe Jugulum, Terry Pratchett 1998
Visit the MaVerick web-site - http://www.maverick-dbms.org Open Source Pick
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] [UV] HP, Cron, Como, Execute, Capturing . Not

2009-02-25 Thread Ken Wallis
tee is a pretty standard UNIX tool.  I cannot think of a variant which
doesn't support it as standard.  At worst you'd have to find an open source
version and compile it, but it is one of the simplest programs - I doubt it
calls anything remotely non-standard.

-Original Message-
Anthony W. Youngman wrote:

I'm not sure whether tee is available across all nix platforms, though.
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] [UV] HP, Cron, Como, Execute, Capturing . Not

2009-02-24 Thread Ross Ferris
Have you changed the code yet to avoid problem? You haven't mentioned
version of UV -- if not current, check later GTARs to see if issue
identified/resolved.

Get the customer going with a redirection/read ... obviously (?) new
code, but an 

ls -l  /tmp/unique_filename

will work across ANY *nix platform -- assume cron is running as same
user/permissions as when you fire from TCL

Ross Ferris
Stamina Software
Visage  Better by Design!

-Original Message-
From: owner-u2-us...@listserver.u2ug.org [mailto:owner-u2-
us...@listserver.u2ug.org] On Behalf Of Tony G
Sent: Tuesday, 24 February 2009 8:45 AM
To: u2-users@listserver.u2ug.org
Subject: RE: [U2] [UV] HP, Cron, Como, Execute, Capturing . Not

Thanks for responses so far.

Scott -  this code is also doing 'ls', and the output gets
captured in COMO as you have seen, but it doesn't continue into
the Capturing var.  At least we can confirm COMO is supposed to
see the output (for better or worse) but not at the expense of
BASIC not seeing it.

I'm wondering if this is an OS-specific issue where UV/HP is
capturing in COMO but not in Capturing, or maybe this is only
occurring when run through Cron.  They could be doing something
like this too:
  echo PHANTOM RUNREPORT | uv
...with the phantom being the platform-specific culprit.

I'll get the details and report back, then maybe someone with the
same platform here can check this before we file a bug report.

Tony Gravagno
Nebula Research and Development
TG@ remove.pleaseNebula-RnD.com
Email now working properly

Don't forget Pickwiki.com!

 From: Scott Ballinger
  I do this all the time on UV 10.1.4 on RH AS 3. I have
  not seen a conflict with COMO and EXECUTE CAPTURING,
  except that the COMO records the results of the
  execute as well as the CAPTURING variable. E.g.
  EXECUTE SH -c 'ls' CAPTURING DIR.LIST
 
  Not only does DIR.LIST contain all the files in the
  directory, but the COMO records them as well, making
  for very verbose COMO files!
 
  Note that I have not tried the combination of cron +
  COMO + EXECUTE CAPTURING {+ PHANTOM?} so perhaps there
  is something going on there, but I do use cron +
  EXECUTE CAPTURING in many places without problems.
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] [UV] HP, Cron, Como, Execute, Capturing . Not

2009-02-24 Thread Jacques G.
If it's just to get the file names and not the other information like the group 
owners, permission bits why not simply do a pointer to the directory then 
select the directory ?
EI:

IF @USERNO  0 THEN 
TMP.NAME = (65536 + @USERNO):.TMPTR 
END ELSE TMP.NAME = @USERNO:.TMPTR

OPEN , VOC TO VOC ELSE STOP 201, VOC

TMPTR = F]/tmp/]D_PH
CONVERT ] TO @AM IN TMPTR
WRITE TMPTR ON VOC, TMPNAME

OPEN , TMPNAME TO F.TMPTR ELSE STOP 201, TMPNAME
FILELIST = '
SELECT F.TMPTR
LOOP WHILE READNEXT FILENAME
FILELIST-1 = FILENAME
REPEAT

You can get a lot of the other information on a file with the STAT command and 
the FILEINFO function.




- Original Message 
From: Ross Ferris ro...@stamina.com.au
To: u2-users@listserver.u2ug.org
Sent: Tuesday, February 24, 2009 7:04:16 AM
Subject: RE: [U2] [UV] HP, Cron, Como, Execute, Capturing . Not

Have you changed the code yet to avoid problem? You haven't mentioned
version of UV -- if not current, check later GTARs to see if issue
identified/resolved.

Get the customer going with a redirection/read ... obviously (?) new
code, but an 

ls -l  /tmp/unique_filename

will work across ANY *nix platform -- assume cron is running as same
user/permissions as when you fire from TCL

Ross Ferris
Stamina Software
Visage  Better by Design!

-Original Message-
From: owner-u2-us...@listserver.u2ug.org [mailto:owner-u2-
us...@listserver.u2ug.org] On Behalf Of Tony G
Sent: Tuesday, 24 February 2009 8:45 AM
To: u2-users@listserver.u2ug.org
Subject: RE: [U2] [UV] HP, Cron, Como, Execute, Capturing . Not

Thanks for responses so far.

Scott -  this code is also doing 'ls', and the output gets
captured in COMO as you have seen, but it doesn't continue into
the Capturing var.  At least we can confirm COMO is supposed to
see the output (for better or worse) but not at the expense of
BASIC not seeing it.

I'm wondering if this is an OS-specific issue where UV/HP is
capturing in COMO but not in Capturing, or maybe this is only
occurring when run through Cron.  They could be doing something
like this too:
  echo PHANTOM RUNREPORT | uv
...with the phantom being the platform-specific culprit.

I'll get the details and report back, then maybe someone with the
same platform here can check this before we file a bug report.

Tony Gravagno
Nebula Research and Development
TG@ remove.pleaseNebula-RnD.com
Email now working properly

Don't forget Pickwiki.com!

 From: Scott Ballinger
  I do this all the time on UV 10.1.4 on RH AS 3. I have
  not seen a conflict with COMO and EXECUTE CAPTURING,
  except that the COMO records the results of the
  execute as well as the CAPTURING variable. E.g.
  EXECUTE SH -c 'ls' CAPTURING DIR.LIST
 
  Not only does DIR.LIST contain all the files in the
  directory, but the COMO records them as well, making
  for very verbose COMO files!
 
  Note that I have not tried the combination of cron +
  COMO + EXECUTE CAPTURING {+ PHANTOM?} so perhaps there
  is something going on there, but I do use cron +
  EXECUTE CAPTURING in many places without problems.
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] [UV] HP, Cron, Como, Execute, Capturing . Not

2009-02-24 Thread Tony G
Jacques - that's great info but the situation is more involved.
Thanks anyway.

Ross - I'm fairly confident this is one of those issues that
never comes up in QA, only in the field.  The cron line executes
a script, the script executes:
   uv PNAME  /outfile
That's a Paragraph that looks like this:
001 PA
002 COMO ON FOO
003 RUN BP PROG
004 COMO OFF

So it's a prog wrapped in COMO, in a paragraph, with stdout
redirected, executed from uv, within a script, called from cron.
(Sometimes I'm amazed any of this works.)

I've asked the client to remove COMO for now, then if the problem
persists to avoid redirection from the uv command.  When the
exact behaviour is determined, I've recommended that an issue
report be filed with IBM through the client's DBMS provider.

I've already suggested that if required, we can redirect the
PROG OS queries back into OS files and then read from there,
rather than attempting to Capture the output directly.  However,
the code doing this is our product activation subroutine
(documented in my blog, search for activate key protect).  For
many reasons that code should not be writing anything to the host
OS.

I'll post a follow-up when we get something solid.

Thanks again!
T


 From: Ross Ferris
 Have you changed the code yet to avoid problem? You 
 haven't mentioned version of UV -- if not current, 
 check later GTARs to see if issue identified/resolved.
 
 Get the customer going with a redirection/read ... 
 obviously (?) new code, but an
 
 ls -l  /tmp/unique_filename
 
 will work across ANY *nix platform -- assume cron is 
 running as same user/permissions as when you fire from 
 TCL
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] [UV] HP, Cron, Como, Execute, Capturing . Not

2009-02-24 Thread Ken Hall

Tony -
It just occurred to me that cron is running uv as root and that when 
root starts uv, the LOGIN proc does not run except in the uv account. 
Try changing the user in cron to a normal uv user and I bet your 
problem will go away.


Ken

At 09:54 AM 2/24/2009, you wrote:

Jacques - that's great info but the situation is more involved.
Thanks anyway.

Ross - I'm fairly confident this is one of those issues that
never comes up in QA, only in the field.  The cron line executes
a script, the script executes:
   uv PNAME  /outfile
That's a Paragraph that looks like this:
001 PA
002 COMO ON FOO
003 RUN BP PROG
004 COMO OFF

So it's a prog wrapped in COMO, in a paragraph, with stdout
redirected, executed from uv, within a script, called from cron.
(Sometimes I'm amazed any of this works.)

I've asked the client to remove COMO for now, then if the problem
persists to avoid redirection from the uv command.  When the
exact behaviour is determined, I've recommended that an issue
report be filed with IBM through the client's DBMS provider.

I've already suggested that if required, we can redirect the
PROG OS queries back into OS files and then read from there,
rather than attempting to Capture the output directly.  However,
the code doing this is our product activation subroutine
(documented in my blog, search for activate key protect).  For
many reasons that code should not be writing anything to the host
OS.

I'll post a follow-up when we get something solid.

Thanks again!
T


 From: Ross Ferris
 Have you changed the code yet to avoid problem? You
 haven't mentioned version of UV -- if not current,
 check later GTARs to see if issue identified/resolved.

 Get the customer going with a redirection/read ...
 obviously (?) new code, but an

 ls -l  /tmp/unique_filename

 will work across ANY *nix platform -- assume cron is
 running as same user/permissions as when you fire from
 TCL
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/

---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


[U2] [UV] HP, Cron, Como, Execute, Capturing . Not

2009-02-23 Thread Tony G
We have a client on UV/HP-UX running a BASIC routine from a Cron
job.  The BASIC code shells out from EXECUTE and Captures data
from the OS.  The Capture is failing and it looks like COMO gets
the StdOut that should be directed into a variable.

I'm not sure yet if Como plays any part or if all
Execute/Capturing instructions will fail when executed from Cron.
The code works fine from TCL.  I'm also checking to see if there
are any other options or middleware, and exactly what's being
executed in the Cron line.

Until I get more info though, I'd like to know if this is a
recognized issue.  Under what conditions can we expect something
like this to fail?:
  Execute sh -c ...  Capturing result

Thanks.

Tony Gravagno
Nebula Research and Development
Info@ removeNebula-RnD.com
(Various other email addresses are currently down ... it's
Monday...)
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] [UV] HP, Cron, Como, Execute, Capturing . Not

2009-02-23 Thread jpb-u2ug
We do it all of the time with no problem. UV 10.1.12 on RH Linux AS 3.

Jerry Banker


-Original Message-
From: owner-u2-us...@listserver.u2ug.org
[mailto:owner-u2-us...@listserver.u2ug.org] On Behalf Of Tony G
Sent: Monday, February 23, 2009 9:37 AM
To: u2-users@listserver.u2ug.org
Subject: [U2] [UV] HP, Cron, Como, Execute, Capturing . Not

We have a client on UV/HP-UX running a BASIC routine from a Cron
job.  The BASIC code shells out from EXECUTE and Captures data
from the OS.  The Capture is failing and it looks like COMO gets
the StdOut that should be directed into a variable.

I'm not sure yet if Como plays any part or if all
Execute/Capturing instructions will fail when executed from Cron.
The code works fine from TCL.  I'm also checking to see if there
are any other options or middleware, and exactly what's being
executed in the Cron line.

Until I get more info though, I'd like to know if this is a
recognized issue.  Under what conditions can we expect something
like this to fail?:
  Execute sh -c ...  Capturing result

Thanks.

Tony Gravagno
Nebula Research and Development
Info@ removeNebula-RnD.com
(Various other email addresses are currently down ... it's
Monday...)
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] [UV] HP, Cron, Como, Execute, Capturing . Not

2009-02-23 Thread Israel, John R.
We are running UniData on HP-UX and I capture Unix info regularly.

Rather than using a COMO, just do it with the EXECUTE command like so:

STMT = !ls -lia (or whatever you need to capture)
EXECUTE STMT CAPTURING UNIX.TXT

Then loop through UNIX.TXT as needed.  If the results can be big, use 
LOOP/REMOVE rather than FOR/NEXT.

John Israel


-Original Message-
From: owner-u2-us...@listserver.u2ug.org 
[mailto:owner-u2-us...@listserver.u2ug.org] On Behalf Of jpb-u2ug
Sent: Monday, February 23, 2009 12:28 PM
To: u2-users@listserver.u2ug.org
Subject: RE: [U2] [UV] HP, Cron, Como, Execute, Capturing . Not

We do it all of the time with no problem. UV 10.1.12 on RH Linux AS 3.

Jerry Banker


-Original Message-
From: owner-u2-us...@listserver.u2ug.org
[mailto:owner-u2-us...@listserver.u2ug.org] On Behalf Of Tony G
Sent: Monday, February 23, 2009 9:37 AM
To: u2-users@listserver.u2ug.org
Subject: [U2] [UV] HP, Cron, Como, Execute, Capturing . Not

We have a client on UV/HP-UX running a BASIC routine from a Cron
job.  The BASIC code shells out from EXECUTE and Captures data
from the OS.  The Capture is failing and it looks like COMO gets
the StdOut that should be directed into a variable.

I'm not sure yet if Como plays any part or if all
Execute/Capturing instructions will fail when executed from Cron.
The code works fine from TCL.  I'm also checking to see if there
are any other options or middleware, and exactly what's being
executed in the Cron line.

Until I get more info though, I'd like to know if this is a
recognized issue.  Under what conditions can we expect something
like this to fail?:
  Execute sh -c ...  Capturing result

Thanks.

Tony Gravagno
Nebula Research and Development
Info@ removeNebula-RnD.com
(Various other email addresses are currently down ... it's
Monday...)
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] [UV] HP, Cron, Como, Execute, Capturing . Not

2009-02-23 Thread Scott Ballinger
Hi Tony,
I do this all the time on UV 10.1.4 on RH AS 3. I have not seen a conflict
with COMO and EXECUTE CAPTURING, except that the COMO records the results of
the execute as well as the CAPTURING variable.
E.g. EXECUTE SH -c 'ls' CAPTURING DIR.LIST

Not only does DIR.LIST contain all the files in the directory, but the COMO
records them as well, making for very verbose COMO files!

Note that I have not tried the combination of cron + COMO + EXECUTE
CAPTURING {+

On Mon, Feb 23, 2009 at 7:37 AM, Tony G 1tlx6h...@sneakemail.com wrote:

 We have a client on UV/HP-UX running a BASIC routine from a Cron
 job.  The BASIC code shells out from EXECUTE and Captures data
 from the OS.  The Capture is failing and it looks like COMO gets
 the StdOut that should be directed into a variable.

 I'm not sure yet if Como plays any part or if all
 Execute/Capturing instructions will fail when executed from Cron.
 The code works fine from TCL.  I'm also checking to see if there
 are any other options or middleware, and exactly what's being
 executed in the Cron line.

 Until I get more info though, I'd like to know if this is a
 recognized issue.  Under what conditions can we expect something
 like this to fail?:
  Execute sh -c ...  Capturing result

 Thanks.

 Tony Gravagno
 Nebula Research and Development
 Info@ removeNebula-RnD.com
 (Various other email addresses are currently down ... it's
 Monday...)
 ---
 u2-users mailing list
 u2-users@listserver.u2ug.org
 To unsubscribe please visit http://listserver.u2ug.org/
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] [UV] HP, Cron, Como, Execute, Capturing . Not

2009-02-23 Thread Tony G
Thanks for responses so far.

Scott -  this code is also doing 'ls', and the output gets
captured in COMO as you have seen, but it doesn't continue into
the Capturing var.  At least we can confirm COMO is supposed to
see the output (for better or worse) but not at the expense of
BASIC not seeing it.

I'm wondering if this is an OS-specific issue where UV/HP is
capturing in COMO but not in Capturing, or maybe this is only
occurring when run through Cron.  They could be doing something
like this too:
  echo PHANTOM RUNREPORT | uv
...with the phantom being the platform-specific culprit.

I'll get the details and report back, then maybe someone with the
same platform here can check this before we file a bug report.

Tony Gravagno
Nebula Research and Development
TG@ remove.pleaseNebula-RnD.com
Email now working properly

Don't forget Pickwiki.com!

 From: Scott Ballinger
  I do this all the time on UV 10.1.4 on RH AS 3. I have 
  not seen a conflict with COMO and EXECUTE CAPTURING, 
  except that the COMO records the results of the 
  execute as well as the CAPTURING variable. E.g. 
  EXECUTE SH -c 'ls' CAPTURING DIR.LIST
  
  Not only does DIR.LIST contain all the files in the 
  directory, but the COMO records them as well, making 
  for very verbose COMO files!
  
  Note that I have not tried the combination of cron + 
  COMO + EXECUTE CAPTURING {+ PHANTOM?} so perhaps there 
  is something going on there, but I do use cron + 
  EXECUTE CAPTURING in many places without problems.
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/