Re: [U2] AUTOLOGOUT and ON.ABORT

2009-02-27 Thread Jacques G.
On unix it's an empty file (size zero) we create:
EI:

touch errlog

On a windows the equivalent would probably be (from dos prompt when in the uv 
account):
copy con errlog
^Z

  1 file(s) copied.

(After typing CTRL-Z you press[RETURN])  I haven't used the errlog in Universe 
for Windows though.



- Original Message 
From: Mike Roosa 
To: u2-users@listserver.u2ug.org
Sent: Friday, February 27, 2009 3:55:22 PM
Subject: Re: [U2] AUTOLOGOUT and ON.ABORT

Ok, so I just create a type 18 file called ERRLOG in the UV account and
restart universe?

On Fri, Feb 27, 2009 at 11:59 AM, Martin Phillips <
martinphill...@ladybridge.com> wrote:

> Hi Mike,
>
>  I was under the impression that the errlog only existed on
>> unix systems. Maybe I'm wrong on this but I can't find it
>> anywhere on our system.
>>
>
> The errlog file is on Windows too but, just as on Unix, you need to create
> an empty errlog file in the UV account directory to enable the system. UV
> looks for this on entry and enables logging.
>
>
> Martin Phillips
> Ladybridge Systems Ltd
> 17b Coldstream Lane, Hardingstone, Northampton, NN4 6DB
> +44-(0)1604-709200 ---
>
> 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] AUTOLOGOUT and ON.ABORT

2009-02-27 Thread Perry Taylor
#touch $(cat /.uvhome)/errlog


- Original Message -
From: owner-u2-us...@listserver.u2ug.org 
To: u2-users@listserver.u2ug.org 
Sent: Fri Feb 27 15:55:22 2009
Subject: Re: [U2] AUTOLOGOUT and ON.ABORT

Ok, so I just create a type 18 file called ERRLOG in the UV account and
restart universe?

On Fri, Feb 27, 2009 at 11:59 AM, Martin Phillips <
martinphill...@ladybridge.com> wrote:

> Hi Mike,
>
>  I was under the impression that the errlog only existed on
>> unix systems. Maybe I'm wrong on this but I can't find it
>> anywhere on our system.
>>
>
> The errlog file is on Windows too but, just as on Unix, you need to create
> an empty errlog file in the UV account directory to enable the system. UV
> looks for this on entry and enables logging.
>
>
> Martin Phillips
> Ladybridge Systems Ltd
> 17b Coldstream Lane, Hardingstone, Northampton, NN4 6DB
> +44-(0)1604-709200 ---
>
> 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/

CONFIDENTIALITY NOTICE: This e-mail message, including any attachments, is for
the sole use of the intended recipient(s) and may contain confidential and
privileged information.  Any unauthorized review, use, disclosure or
distribution is prohibited. ZirMed, Inc. has strict policies regarding the
content of e-mail communications, specifically Protected Health Information,
any communications containing such material will be returned to the
originating party with such advisement noted. If you are not the intended
recipient, please contact the sender by reply e-mail and destroy all copies of
the original message.
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] Upgrades

2009-02-27 Thread Adrian Merrall
On Sat, Feb 28, 2009 at 2:13 AM, Israel, John R. <
johnisr...@daytonsuperior.com> wrote:

> We are looking to do a big upgrade on our hardware and software, and I was
> hoping to get any positive or negative feedback folks might have had.


UD 6 to UD7.1 was painless.
Props to IBM, it has been a long time since Unidata upgrades have given me
any grief.  I would echo Jeff's comment of moving to the latest you can.

Regards,
Adrian,
Auckland NZ
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] AUTOLOGOUT and ON.ABORT

2009-02-27 Thread Mike Roosa
Ok, so I just create a type 18 file called ERRLOG in the UV account and
restart universe?

On Fri, Feb 27, 2009 at 11:59 AM, Martin Phillips <
martinphill...@ladybridge.com> wrote:

> Hi Mike,
>
>  I was under the impression that the errlog only existed on
>> unix systems. Maybe I'm wrong on this but I can't find it
>> anywhere on our system.
>>
>
> The errlog file is on Windows too but, just as on Unix, you need to create
> an empty errlog file in the UV account directory to enable the system. UV
> looks for this on entry and enables logging.
>
>
> Martin Phillips
> Ladybridge Systems Ltd
> 17b Coldstream Lane, Hardingstone, Northampton, NN4 6DB
> +44-(0)1604-709200 ---
>
> 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] unsubscribe * {sajaw...@vercom.com}

2009-02-27 Thread Jaweed
-Original Message-
From: owner-u2-us...@listserver.u2ug.org
[mailto:owner-u2-us...@listserver.u2ug.org] On Behalf Of Peter Veenhof
Sent: Friday, February 27, 2009 1:36 PM
To: u2-users@listserver.u2ug.org
Subject: [U2] [UV] Deciphering Pick

Hi all,

Does anyone have anything like described below that will read
Universe PICK code and then proceed to aid in flowchart creation whether
it creates some kind of map file or a Visio even better?

Thanks,
Peter

-Original Message-
From: owner-u2-us...@listserver.u2ug.org
[mailto:owner-u2-us...@listserver.u2ug.org] On Behalf Of Peter Gonzalez
Sent: Thursday, December 08, 2005 3:38 PM
To: 'u2-users@listserver.u2ug.org'
Subject: RE: [U2] Deciphering Pick UniBasic statement

Several years go I wrote a utility to clean source code for Unidata, for
this very same reason. The utility added END statements when need. It
also accounted for all Unidata functions, Verbs. An added feature that I
was not able to complete, due to time, was a flowchart. A second program
would take the cleaned source and build a Visio flowchart. Maybe I'll
finish it one of these days.

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

No virus found in this incoming message.
Checked by AVG - www.avg.com 
Version: 8.0.237 / Virus Database: 270.10.23/1951 - Release Date: 02/27/09
07:05:00
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] DO/WHILE vs IF THEN

2009-02-27 Thread Israel, John R.
In all your examples, you support my position.  1 way in, 1 way out.  Though to 
your point, you have clean, concise clean code.

John Israel

-Original Message-
From: owner-u2-us...@listserver.u2ug.org 
[mailto:owner-u2-us...@listserver.u2ug.org] On Behalf Of MAJ Programming
Sent: Friday, February 27, 2009 3:23 PM
To: u2-users@listserver.u2ug.org
Subject: Re: [U2] DO/WHILE vs IF THEN

I should offer a contrary opinion.

I support many sets of differently developed code with all my clients. When
properly indented, the EXIT is a logical way to conclude the visit in the
loop without labeling the REPEAT or introducing other DONE 'style'
variables. The code actually shrinks by a few lines. Example:


GOOD.ANS=FALSE
LOOP UNTIL GOOD.ANS DO
   PRINT "ENTER 'Y' OR 'N' ":;INPUT ANS
   IF ANS="Y" OR ANS="N" THEN GOOD.ANS=TRUE
REPEAT


LOOP WHILE TRUE DO
   PRINT "ENTER 'Y' OR 'N' ":;INPUT ANS
   IF ANS="Y" OR ANS="N" THEN EXIT
REPEAT

Or my favorite code shrinking syntax:


EOF=0
LOOP
   READNEXT ID ELSE EOF=0
UNTIL EOF DO
{process}
REPEAT


LOOP WHILE READNEXT ID DO
  {process}
REPEAT

When I see code that has been heavily flagged I have to scratch my head.
EXIT and CONTINUE have been around at least as long as U2 has. I know that
they weren't there during the Jurrasic Pick era.

My 1 cent,
Mark Johnson

Maybe I follow poor programmers who got flag-crazy.
- Original Message -
From: "David A. Green" 
To: 
Sent: Friday, February 27, 2009 1:25 PM
Subject: RE: [U2] DO/WHILE vs IF THEN


> George,
>
> In my opinion you lose the elegance and readability of the LOOP construct
> when you use EXIT.  Code is easier to debug and enhance when Loops and
> Subroutines have one entry and one exit.
>
> Thanks,
> David A. Green
> www.dagconsulting.com
> (480) 813-1725
>
>
> -Original Message-
> From: owner-u2-us...@listserver.u2ug.org
> [mailto:owner-u2-us...@listserver.u2ug.org] On Behalf Of George Gallen
> Sent: Friday, February 27, 2009 9:20 AM
> To: Ardent
> Subject: [U2] DO/WHILE vs IF THEN
>
> OK Aside from programming styles
>
> Is there any "functional" difference between
>
> WHILE expression DOand IF NOT(expression) THEN EXIT
> and
> UNTIL expression DOand IF expression THEN EXIT
>
>
> First I thought that the DO/WHILE would activate as soon as
> the condition occurred and drop out of a loop, but that is not
> the case, the condition has to be active AND control has to be
> back at the WHILE statement.
>
>
> Example:
>
> 0001: CTR=0
> 0002: LOOP
> 0003:   CTR=CTR+1
> 0004:   WHILE CTR<4 DO
> 0005:   PRINT CTR
> 0006:   CTR=CTR+1
> 0007:   PRINT CTR
> 0008:   CTR=CTR+1
> 0009:   PRINT CTR
> 0010:   CTR=CTR+1
> 0011:   PRINT CTR
> 0012:   CTR=CTR+1
> 0013:   PRINT CTR
> 0014:   CTR=CTR+1
> 0015:   PRINT CTR
> 0016:   CTR=CTR+1
> 0017:   PRINT CTR
> 0018: REPEAT
> 0019: STOP
> 0020: END
>
> My first thought was that once CTR = 5, the loop would end (at LINE 12)
but
> it
> didn't
> until control was passed back to LINE 4, then it ended.
> ---
> 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/
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] DO/WHILE vs IF THEN

2009-02-27 Thread Jeff Schasny
I use exit as my single point out by not including a WHILE or UNTIL.

SELECT YADAYADA

LOOP
  READNEXT KEY ELSE EXIT
  Do Stuff
  Do Stuff
REPEAT


Israel, John R. wrote:
> I agree completely with David.  I make it a habit to have one way in and one 
> way out for my loops and subroutines.  It makes it much easier to 
> enhance/debug in the future (which is what most of us spend most of our time 
> doing).  I will not say I NEVER break this rule, but it is rare.
>
> John Israel
>
> -Original Message-
> From: owner-u2-us...@listserver.u2ug.org 
> [mailto:owner-u2-us...@listserver.u2ug.org] On Behalf Of David A. Green
> Sent: Friday, February 27, 2009 1:25 PM
> To: u2-users@listserver.u2ug.org
> Subject: RE: [U2] DO/WHILE vs IF THEN
>
> George,
>
> In my opinion you lose the elegance and readability of the LOOP construct
> when you use EXIT.  Code is easier to debug and enhance when Loops and
> Subroutines have one entry and one exit.
>
> Thanks,
> David A. Green
> www.dagconsulting.com
> (480) 813-1725
>
>
> -Original Message-
> From: owner-u2-us...@listserver.u2ug.org
> [mailto:owner-u2-us...@listserver.u2ug.org] On Behalf Of George Gallen
> Sent: Friday, February 27, 2009 9:20 AM
> To: Ardent
> Subject: [U2] DO/WHILE vs IF THEN
>
> OK Aside from programming styles
>
> Is there any "functional" difference between
>
> WHILE expression DOand IF NOT(expression) THEN EXIT
> and
> UNTIL expression DOand IF expression THEN EXIT
>
>
> First I thought that the DO/WHILE would activate as soon as
> the condition occurred and drop out of a loop, but that is not
> the case, the condition has to be active AND control has to be
> back at the WHILE statement.
>
>
> Example:
>
> 0001: CTR=0
> 0002: LOOP
> 0003:   CTR=CTR+1
> 0004:   WHILE CTR<4 DO
> 0005:   PRINT CTR
> 0006:   CTR=CTR+1
> 0007:   PRINT CTR
> 0008:   CTR=CTR+1
> 0009:   PRINT CTR
> 0010:   CTR=CTR+1
> 0011:   PRINT CTR
> 0012:   CTR=CTR+1
> 0013:   PRINT CTR
> 0014:   CTR=CTR+1
> 0015:   PRINT CTR
> 0016:   CTR=CTR+1
> 0017:   PRINT CTR
> 0018: REPEAT
> 0019: STOP
> 0020: END
>
> My first thought was that once CTR = 5, the loop would end (at LINE 12) but
> it
> didn't
> until control was passed back to LINE 4, then it ended.
> ---
> 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/
>
>   

-- 

Jeff Schasny - Denver, Co, USA
jschasny at gmail dot com
/"Come To The Dark Side, We Have Cookies."/

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


RE: [U2] DO/WHILE vs IF THEN

2009-02-27 Thread George Gallen
What my test program was to show, is that the WHILE/DO will
only end the loop if the condition is not met when execution
is on the WHILE/DO line (line 4).

In other words, the loop will not be ended when CTR>3, but
rather when CTR>3 AND it is being checked by the WHILE/DO Line.
I was testing that the loop would not just end on line 10 during
the FIRST pass thru (when the condition became false CTR=4).

Since the problem I was having was a loop that was justing ending
between two statements, with neither statement being a conditional
check, nor contained an EXIT, so the test program was just to prove
to myself that WHILE/DO isn't some sort of overlord that monitors
for the condition at all points within the loop and will end the loop
immediately upon that condition not being met.

So, the question still remains...wha happened? any why when I removed
the WHILE/DO line did it stop happening?

If I can gain any more meaningful information using RAID I will repost
otherwise, it's just going to be one of those things

But thank you for the responses of things to check into.

George

> -Original Message-
> From: owner-u2-us...@listserver.u2ug.org [mailto:owner-u2-
> us...@listserver.u2ug.org] On Behalf Of Nick Gettino
> Sent: Friday, February 27, 2009 2:34 PM
> To: u2-users@listserver.u2ug.org
> Subject: RE: [U2] DO/WHILE vs IF THEN
>
> See below.
>
> Nicholas M Gettino | Director of Development | EnRoute Emergency
> Systems, an Infor company | office: 813-207-6998 | fax: 678-393-5389
> nick.gett...@infor.com | www.enroute911.com
>   First time through...
> Example:
>
> 0001: CTR=0
> 0002: LOOP  First pass thruSecond pass thru
> 0003:   CTR=CTR+1 CTR is 1 adds 1 to
> CTR making it 8
> 0004:   WHILE CTR<4 DO since CTR is NOW more
> than 4 it stops
>Read below.
> 0005:   PRINT CTR   prints a 1
> 0006:   CTR=CTR+1   adds 1 to CTR
> 0007:   PRINT CTR   prints a 2
> 0008:   CTR=CTR+1   adds 1 to CTR
> 0009:   PRINT CTR   prints a 3
> 0010:   CTR=CTR+1   adds 1 to CTR
> 0011:   PRINT CTR   prints a 4
> 0012:   CTR=CTR+1   adds 1 to CTR
> 0013:   PRINT CTR   prints a 5
> 0014:   CTR=CTR+1   adds 1 to CTR
> 0015:   PRINT CTR   prints a 6
> 0016:   CTR=CTR+1   adds 1 to CTR
> 0017:   PRINT CTR prints a 7
> 0018: REPEATgoes back to LOOP
> 0019: STOP
> 0020: END
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] DO/WHILE vs IF THEN

2009-02-27 Thread MAJ Programming
I should offer a contrary opinion.

I support many sets of differently developed code with all my clients. When
properly indented, the EXIT is a logical way to conclude the visit in the
loop without labeling the REPEAT or introducing other DONE 'style'
variables. The code actually shrinks by a few lines. Example:


GOOD.ANS=FALSE
LOOP UNTIL GOOD.ANS DO
   PRINT "ENTER 'Y' OR 'N' ":;INPUT ANS
   IF ANS="Y" OR ANS="N" THEN GOOD.ANS=TRUE
REPEAT


LOOP WHILE TRUE DO
   PRINT "ENTER 'Y' OR 'N' ":;INPUT ANS
   IF ANS="Y" OR ANS="N" THEN EXIT
REPEAT

Or my favorite code shrinking syntax:


EOF=0
LOOP
   READNEXT ID ELSE EOF=0
UNTIL EOF DO
{process}
REPEAT


LOOP WHILE READNEXT ID DO
  {process}
REPEAT

When I see code that has been heavily flagged I have to scratch my head.
EXIT and CONTINUE have been around at least as long as U2 has. I know that
they weren't there during the Jurrasic Pick era.

My 1 cent,
Mark Johnson

Maybe I follow poor programmers who got flag-crazy.
- Original Message -
From: "David A. Green" 
To: 
Sent: Friday, February 27, 2009 1:25 PM
Subject: RE: [U2] DO/WHILE vs IF THEN


> George,
>
> In my opinion you lose the elegance and readability of the LOOP construct
> when you use EXIT.  Code is easier to debug and enhance when Loops and
> Subroutines have one entry and one exit.
>
> Thanks,
> David A. Green
> www.dagconsulting.com
> (480) 813-1725
>
>
> -Original Message-
> From: owner-u2-us...@listserver.u2ug.org
> [mailto:owner-u2-us...@listserver.u2ug.org] On Behalf Of George Gallen
> Sent: Friday, February 27, 2009 9:20 AM
> To: Ardent
> Subject: [U2] DO/WHILE vs IF THEN
>
> OK Aside from programming styles
>
> Is there any "functional" difference between
>
> WHILE expression DOand IF NOT(expression) THEN EXIT
> and
> UNTIL expression DOand IF expression THEN EXIT
>
>
> First I thought that the DO/WHILE would activate as soon as
> the condition occurred and drop out of a loop, but that is not
> the case, the condition has to be active AND control has to be
> back at the WHILE statement.
>
>
> Example:
>
> 0001: CTR=0
> 0002: LOOP
> 0003:   CTR=CTR+1
> 0004:   WHILE CTR<4 DO
> 0005:   PRINT CTR
> 0006:   CTR=CTR+1
> 0007:   PRINT CTR
> 0008:   CTR=CTR+1
> 0009:   PRINT CTR
> 0010:   CTR=CTR+1
> 0011:   PRINT CTR
> 0012:   CTR=CTR+1
> 0013:   PRINT CTR
> 0014:   CTR=CTR+1
> 0015:   PRINT CTR
> 0016:   CTR=CTR+1
> 0017:   PRINT CTR
> 0018: REPEAT
> 0019: STOP
> 0020: END
>
> My first thought was that once CTR = 5, the loop would end (at LINE 12)
but
> it
> didn't
> until control was passed back to LINE 4, then it ended.
> ---
> 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] DO/WHILE vs IF THEN

2009-02-27 Thread Dianne Ackerman
I actually think, from the distant reaches of my memory, that this might 
behave differently depending on the uv flavor...

-Dianne

Nick Gettino wrote:

See below.

Nicholas M Gettino | Director of Development | EnRoute Emergency
Systems, an Infor company | office: 813-207-6998 | fax: 678-393-5389
nick.gett...@infor.com | www.enroute911.com
  First time through...
Example:

0001: CTR=0
0002: LOOP  First pass thruSecond pass thru
0003:   CTR=CTR+1   CTR is 1 adds 1 to
CTR making it 8
0004:   WHILE CTR<4 DO since CTR is NOW more
than 4 			 it stops 
			 Read below.

0005:   PRINT CTR   prints a 1
0006:   CTR=CTR+1   adds 1 to CTR
0007:   PRINT CTR   prints a 2
0008:   CTR=CTR+1   adds 1 to CTR
0009:   PRINT CTR   prints a 3
0010:   CTR=CTR+1   adds 1 to CTR
0011:   PRINT CTR   prints a 4
0012:   CTR=CTR+1   adds 1 to CTR
0013:   PRINT CTR   prints a 5
0014:   CTR=CTR+1   adds 1 to CTR
0015:   PRINT CTR   prints a 6
0016:   CTR=CTR+1   adds 1 to CTR
0017:   PRINT CTR   prints a 7
0018: REPEAT  goes back to LOOP
0019: STOP
0020: END

My first thought was that once CTR = 5, the loop would end (at LINE 12)
but
it
didn't
until control was passed back to LINE 4, then it ended.
[Nick] Should have been written.
CTR=0
LOOP WHILE CTR < 4 DO 
   CTR = CTR + 1

REPEAT

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


[U2] [UV] Deciphering Pick

2009-02-27 Thread Peter Veenhof
Hi all,

Does anyone have anything like described below that will read
Universe PICK code and then proceed to aid in flowchart creation whether
it creates some kind of map file or a Visio even better?

Thanks,
Peter

-Original Message-
From: owner-u2-us...@listserver.u2ug.org
[mailto:owner-u2-us...@listserver.u2ug.org] On Behalf Of Peter Gonzalez
Sent: Thursday, December 08, 2005 3:38 PM
To: 'u2-users@listserver.u2ug.org'
Subject: RE: [U2] Deciphering Pick UniBasic statement

Several years go I wrote a utility to clean source code for Unidata, for
this very same reason. The utility added END statements when need. It
also accounted for all Unidata functions, Verbs. An added feature that I
was not able to complete, due to time, was a flowchart. A second program
would take the cleaned source and build a Visio flowchart. Maybe I'll
finish it one of these days.

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


RE: [U2] DO/WHILE vs IF THEN

2009-02-27 Thread Nick Gettino
See below.

Nicholas M Gettino | Director of Development | EnRoute Emergency
Systems, an Infor company | office: 813-207-6998 | fax: 678-393-5389
nick.gett...@infor.com | www.enroute911.com
  First time through...
Example:

0001: CTR=0
0002: LOOP  First pass thruSecond pass thru
0003:   CTR=CTR+1   CTR is 1 adds 1 to
CTR making it 8
0004:   WHILE CTR<4 DO since CTR is NOW more
than 4   it stops 
 Read below.
0005:   PRINT CTR   prints a 1
0006:   CTR=CTR+1   adds 1 to CTR
0007:   PRINT CTR   prints a 2
0008:   CTR=CTR+1   adds 1 to CTR
0009:   PRINT CTR   prints a 3
0010:   CTR=CTR+1   adds 1 to CTR
0011:   PRINT CTR   prints a 4
0012:   CTR=CTR+1   adds 1 to CTR
0013:   PRINT CTR   prints a 5
0014:   CTR=CTR+1   adds 1 to CTR
0015:   PRINT CTR   prints a 6
0016:   CTR=CTR+1   adds 1 to CTR
0017:   PRINT CTR   prints a 7
0018: REPEAT  goes back to LOOP
0019: STOP
0020: END

My first thought was that once CTR = 5, the loop would end (at LINE 12)
but
it
didn't
until control was passed back to LINE 4, then it ended.
[Nick] Should have been written.
CTR=0
LOOP WHILE CTR < 4 DO 
   CTR = CTR + 1
REPEAT

---
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/
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] Strange happening...

2009-02-27 Thread Lettau, Jeff
Can You
SELECT File TO 1
To assign the selection to a list number, as the default list number is 0 it 
would cut down on the chances of the list being used by something else?
Just make sure at the end you PERFORM "DELETE.LIST 1" so it's not  hanging 
around.

Jeffrey Lettau
ERP Systems Manager
polkaudio 


-Original Message-
From: owner-u2-us...@listserver.u2ug.org 
[mailto:owner-u2-us...@listserver.u2ug.org] On Behalf Of Jacques G.
Sent: Friday, February 27, 2009 12:27 PM
To: u2-users@listserver.u2ug.org
Subject: Re: [U2] Strange happening...

In the example of code you have, the loop will exit if your key (variable ID) 
is equal to an empty string or a string that can be evaluated to zero for 
example values like these:
0E1,0E10, 0E100  (on Universe)
"" (empty string)


Will make the loop end:

> SELECT FILENAME
> LOOP
>READNEXT ID ELSE EXIT
> WHILE ID DO
>CODE
>CODE with GOSUB
>CODE
>CODE
> REPEAT

Try:

SELECT FILENAME
LOOP WHILE READNEXT ID
  CODE...
REPEAT




- Original Message 
From: George Gallen 
To: "u2-users@listserver.u2ug.org" 
Sent: Friday, February 27, 2009 10:21:19 AM
Subject: RE: [U2] Strange happening...

that wasn't the case. The id was combination of 13 letters and numbers.
The strange part was where the while/do seemed to kick in.
   The item was read from the file without a problem
   3-4 lines of code execute as expected
   it then executed a gosub, but when it returned, it dropped out of the loop
  the id variable was never modified.

Strange.

George

> -Original Message-
> From: owner-u2-us...@listserver.u2ug.org [mailto:owner-u2-
> us...@listserver.u2ug.org] On Behalf Of Edward Brown
> Sent: Friday, February 27, 2009 9:39 AM
> To: u2-users@listserver.u2ug.org
> Subject: RE: [U2] Strange happening...
>
> If the ID equates to false it will exit - i.e. a record with ID 00
>
> Edward
>
> -Original Message-
> From: owner-u2-us...@listserver.u2ug.org
> [mailto:owner-u2-us...@listserver.u2ug.org] On Behalf Of George Gallen
> Sent: 27 February 2009 14:26
> To: Ardent
> Subject: [U2] Strange happening...
>
> ok...I found this code snipit (REALITY FLAVOR)
>
> SELECT FILENAME
> LOOP
>READNEXT ID ELSE EXIT
> WHILE ID DO
>CODE
>CODE with GOSUB
>CODE
>CODE
> REPEAT
>
>
> What was happening was the loop was exiting early,  but it was exiting
> after
> the
> CODE with GOSUB line was executed.
>
> What struck me was why there was a While DO as well as an EXIT in the
> loop?
> while nothing in the CODE or GOSUBs modified the ID, would having both
> the
> WHILE/DO and EXIT cause some kind of problem?
>
> After I removed (commented out) the WHILE/DO line, the program ran as
> expected
> and processed the 100,000 records, (whereas before it stopped after 6).
>
> George
> ---
> u2-users mailing list
> u2-users@listserver.u2ug.org
> To unsubscribe please visit http://listserver.u2ug.org/
>
> ---
> 
> Please remember to recycle wherever possible.
> Reduce, reuse, recycle, think do you need to print this e-mail?
> ---
> 
> This e-mail and any attachment(s), is confidential and may be legally
> privileged. It is intended solely for the addressee. If you are not the
> addressee, dissemination, copying or use of this e-mail or any of its
> content is prohibited and may be unlawful. If you are not the intended
> recipient please inform the sender immediately and destroy the e-mail,
> any attachment(s) and any copies. All liability for viruses is excluded
> to the fullest extent permitted by law. It is your responsibility to
> scan or otherwise check this email and any attachment(s). Unless
> otherwise stated (i) views expressed in this message are those of the
> individual sender (ii) no contract may be construed by this e-mail.
> Emails may be monitored and you are taken to consent to this
> monitoring.
>
> Civica Services Limited, Company No. 02374268; Civica UK Limited,
> Company No. 01628868
> Both companies are registered in England and Wales and each has its
> registered office at 2 Burston Road, Putney, London, SW15 6AR.
> ---
> 
> ---
> 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/

Disclaimer: This email may contain confidential and/or privileged information. 
It is intended only for the person or persons to whom it is addressed. Any 
unauthorized review, use, or distribution is prohibited. If you are not the 
intended recipient, please contact the sender by r

RE: [U2] DO/WHILE vs IF THEN

2009-02-27 Thread Israel, John R.
I agree completely with David.  I make it a habit to have one way in and one 
way out for my loops and subroutines.  It makes it much easier to enhance/debug 
in the future (which is what most of us spend most of our time doing).  I will 
not say I NEVER break this rule, but it is rare.

John Israel

-Original Message-
From: owner-u2-us...@listserver.u2ug.org 
[mailto:owner-u2-us...@listserver.u2ug.org] On Behalf Of David A. Green
Sent: Friday, February 27, 2009 1:25 PM
To: u2-users@listserver.u2ug.org
Subject: RE: [U2] DO/WHILE vs IF THEN

George,

In my opinion you lose the elegance and readability of the LOOP construct
when you use EXIT.  Code is easier to debug and enhance when Loops and
Subroutines have one entry and one exit.

Thanks,
David A. Green
www.dagconsulting.com
(480) 813-1725


-Original Message-
From: owner-u2-us...@listserver.u2ug.org
[mailto:owner-u2-us...@listserver.u2ug.org] On Behalf Of George Gallen
Sent: Friday, February 27, 2009 9:20 AM
To: Ardent
Subject: [U2] DO/WHILE vs IF THEN

OK Aside from programming styles

Is there any "functional" difference between

WHILE expression DOand IF NOT(expression) THEN EXIT
and
UNTIL expression DOand IF expression THEN EXIT


First I thought that the DO/WHILE would activate as soon as
the condition occurred and drop out of a loop, but that is not
the case, the condition has to be active AND control has to be
back at the WHILE statement.


Example:

0001: CTR=0
0002: LOOP
0003:   CTR=CTR+1
0004:   WHILE CTR<4 DO
0005:   PRINT CTR
0006:   CTR=CTR+1
0007:   PRINT CTR
0008:   CTR=CTR+1
0009:   PRINT CTR
0010:   CTR=CTR+1
0011:   PRINT CTR
0012:   CTR=CTR+1
0013:   PRINT CTR
0014:   CTR=CTR+1
0015:   PRINT CTR
0016:   CTR=CTR+1
0017:   PRINT CTR
0018: REPEAT
0019: STOP
0020: END

My first thought was that once CTR = 5, the loop would end (at LINE 12) but
it
didn't
until control was passed back to LINE 4, then it ended.
---
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] DO/WHILE vs IF THEN

2009-02-27 Thread David A. Green
George,

In my opinion you lose the elegance and readability of the LOOP construct
when you use EXIT.  Code is easier to debug and enhance when Loops and
Subroutines have one entry and one exit.

Thanks,
David A. Green
www.dagconsulting.com
(480) 813-1725


-Original Message-
From: owner-u2-us...@listserver.u2ug.org
[mailto:owner-u2-us...@listserver.u2ug.org] On Behalf Of George Gallen
Sent: Friday, February 27, 2009 9:20 AM
To: Ardent
Subject: [U2] DO/WHILE vs IF THEN

OK Aside from programming styles

Is there any "functional" difference between

WHILE expression DOand IF NOT(expression) THEN EXIT
and
UNTIL expression DOand IF expression THEN EXIT


First I thought that the DO/WHILE would activate as soon as
the condition occurred and drop out of a loop, but that is not
the case, the condition has to be active AND control has to be
back at the WHILE statement.


Example:

0001: CTR=0
0002: LOOP
0003:   CTR=CTR+1
0004:   WHILE CTR<4 DO
0005:   PRINT CTR
0006:   CTR=CTR+1
0007:   PRINT CTR
0008:   CTR=CTR+1
0009:   PRINT CTR
0010:   CTR=CTR+1
0011:   PRINT CTR
0012:   CTR=CTR+1
0013:   PRINT CTR
0014:   CTR=CTR+1
0015:   PRINT CTR
0016:   CTR=CTR+1
0017:   PRINT CTR
0018: REPEAT
0019: STOP
0020: END

My first thought was that once CTR = 5, the loop would end (at LINE 12) but
it
didn't
until control was passed back to LINE 4, then it ended.
---
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] DO/WHILE vs IF THEN

2009-02-27 Thread George Gallen
actually, my test did work. I was testing to see if the loop would end
when the condition was met and it wasn't being tested directly.

It was only a test, and not meant to be a counter loop, just that is was
in a loop, and each increment after 3 was printed to show it was still
inside the loop (which I expected, since it would only drop out of the
loop when it hits the WHILE expression DO statement).

George

> -Original Message-
> From: owner-u2-us...@listserver.u2ug.org [mailto:owner-u2-
> us...@listserver.u2ug.org] On Behalf Of Jacques G.
> Sent: Friday, February 27, 2009 12:16 PM
> To: u2-users@listserver.u2ug.org
> Subject: Re: [U2] DO/WHILE vs IF THEN
>
> CTR =0
> LOOP WHILE CTR < 4
>   CTR+=1
>   PRINT CTR
> REPEAT
>
> FOR CTR = 0 TO 4
>PRINT CTR
> NEXT CTR
>
> CTR = 0
> LOOP
>   CTR += 1
>   PRINT CTR
>   IF CTR > 4 THEN EXIT
> REPEAT
>
>
> If you're going to use a counter, might as well use a for loop.  Your
> test didn't work because you didn't test the limit after each
> increment.  Repeating the increment and print statement like your
> example does defeats the purpose of the loop.
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] ODBC setup error

2009-02-27 Thread u2ug
For anyone that is interested,

from the wiki 

   The following program should be substituted for HS.UPDATE.FILEINFO 
   0001:   CALL *HS.FILEINFO( RESULT, "REFRESH", 1)
   0002:   PRINT RESULT
   0003:END

This gives you a verbose step by step of what is happening.
It turns out that the files are processed in alphabetical order but only
those with defined associations were being reported to the screen.
This also pinpointed the problem which turned out to be a 'bad' Q
pointer in the VOC.
I occasionally do the following to quickly have a Q pointer point to a
test file.

0001:   Q
0002:   ACCOUNT
0003:   TESTFILE
...
000x:   ORIGINALFILE

When I'm done I restore the original filename.

In many years at this game I have never seen this cause any problems but
it looks like the extra lines/data cause the routine to barf for
whatever reason - I haven't found any documentation saying that anything
beyond the 1st 3 lines is significant for Q pointers.

Removing the extra lines cleared things up and we are all happy again.






> -Original Message-
> From: owner-u2-us...@listserver.u2ug.org [mailto:owner-u2-
> us...@listserver.u2ug.org] On Behalf Of Anthony W. Youngman
> Sent: February 27, 2009 12:07 PM
> To: u2-users@listserver.u2ug.org
> Subject: Re: [U2] ODBC setup error
> 
> In message <47c1b98393896f41a7bfe435442394e510f...@gmsdc.gerzio.ca>,
> u2ug  writes
> >We have an account setup to allow odbc access to specific files.
> >We added access to a new file and ran HS.UPDATE.FILEINFO which
> processed
> >a few files but then aborted the session with that old standard :
> >
> >   Abnormal termination of UniVerse
> >   Fault type is 11.  Layer type is Unknown.
> >
> >The files that were processed are accessible via odbc but no others.
> >
> >I tried removing all data files references from the VOC , so there
> >shouldn't be any files to update and it still gave me this error.
> >I also tried disabling and re-enabling file access via HS.ADMIN but
> the
> >same result - we get the same error when the enable tries to run the
> >HS.UPDATE.FILEINFO command.
> 
> Quite likely. What version of UV are you on?
> 
> >I am assuming that it is hitting a bad file and blowing up, but I
> don't
> >know what that file might be as the order that files are processed
> seems
> >to be pretty random.
> 
> Try SELECT VOC WITH TYPE EQ "F" and see if that's the order it's
> processing them in (I think it probably is).
> >
> >This is a major issue.
> >Can anybody shed some light on this ?
> >
> Look on the UniVerse page on PickWiki. There's a page about setting up
> ODBC - it's pretty out-of-date because it's based on 9.6, but it may
> well give you some clues - especially about how to get
> HS.UPDATE.FILEINFO into verbose mode, which stands a good chance of
> telling you which file is blowing up.
> 
> Cheers,
> Wol
> --
> Anthony W. Youngman 
> '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 -  Open
> Source Pick
> ---
> 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] ODBC setup error

2009-02-27 Thread u2ug
Thanks for the response :

Versions : uv 10.2.11 on hpux B.11.31

I tried :
LISTF
SELECT VOC WITH TYPE = "F" "Q"
SORT VOC WITH TYPE = "F" "Q"
SORT VOC WITH TYPE = "F" "Q" BY F2

Even ignoring system files ( those automatically added to HS_FILE_ACCESS
) nothing matches the order that HS.UPDATE.FILEINFO is using.

I will have to check out the wiki article as I couldn't find any info on
HS.UPDATE.FILEINFO.

Gerry


> -Original Message-
> From: owner-u2-us...@listserver.u2ug.org [mailto:owner-u2-
> us...@listserver.u2ug.org] On Behalf Of Anthony W. Youngman
> Sent: February 27, 2009 12:07 PM
> To: u2-users@listserver.u2ug.org
> Subject: Re: [U2] ODBC setup error
> 
> In message <47c1b98393896f41a7bfe435442394e510f...@gmsdc.gerzio.ca>,
> u2ug  writes
> >We have an account setup to allow odbc access to specific files.
> >We added access to a new file and ran HS.UPDATE.FILEINFO which
> processed
> >a few files but then aborted the session with that old standard :
> >
> >   Abnormal termination of UniVerse
> >   Fault type is 11.  Layer type is Unknown.
> >
> >The files that were processed are accessible via odbc but no others.
> >
> >I tried removing all data files references from the VOC , so there
> >shouldn't be any files to update and it still gave me this error.
> >I also tried disabling and re-enabling file access via HS.ADMIN but
> the
> >same result - we get the same error when the enable tries to run the
> >HS.UPDATE.FILEINFO command.
> 
> Quite likely. What version of UV are you on?
> 
> >I am assuming that it is hitting a bad file and blowing up, but I
> don't
> >know what that file might be as the order that files are processed
> seems
> >to be pretty random.
> 
> Try SELECT VOC WITH TYPE EQ "F" and see if that's the order it's
> processing them in (I think it probably is).
> >
> >This is a major issue.
> >Can anybody shed some light on this ?
> >
> Look on the UniVerse page on PickWiki. There's a page about setting up
> ODBC - it's pretty out-of-date because it's based on 9.6, but it may
> well give you some clues - especially about how to get
> HS.UPDATE.FILEINFO into verbose mode, which stands a good chance of
> telling you which file is blowing up.
> 
> Cheers,
> Wol
> --
> Anthony W. Youngman 
> '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 -  Open
> Source Pick
> ---
> 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] Strange happening...

2009-02-27 Thread Jacques G.
In the example of code you have, the loop will exit if your key (variable ID) 
is equal to an empty string or a string that can be evaluated to zero for 
example values like these:
0E1,0E10, 0E100  (on Universe)
"" (empty string)


Will make the loop end:

> SELECT FILENAME
> LOOP
>READNEXT ID ELSE EXIT
> WHILE ID DO   
>CODE
>CODE with GOSUB
>CODE
>CODE
> REPEAT

Try:

SELECT FILENAME
LOOP WHILE READNEXT ID
  CODE...
REPEAT




- Original Message 
From: George Gallen 
To: "u2-users@listserver.u2ug.org" 
Sent: Friday, February 27, 2009 10:21:19 AM
Subject: RE: [U2] Strange happening...

that wasn't the case. The id was combination of 13 letters and numbers.
The strange part was where the while/do seemed to kick in.
   The item was read from the file without a problem
   3-4 lines of code execute as expected
   it then executed a gosub, but when it returned, it dropped out of the loop
  the id variable was never modified.

Strange.

George

> -Original Message-
> From: owner-u2-us...@listserver.u2ug.org [mailto:owner-u2-
> us...@listserver.u2ug.org] On Behalf Of Edward Brown
> Sent: Friday, February 27, 2009 9:39 AM
> To: u2-users@listserver.u2ug.org
> Subject: RE: [U2] Strange happening...
>
> If the ID equates to false it will exit - i.e. a record with ID 00
>
> Edward
>
> -Original Message-
> From: owner-u2-us...@listserver.u2ug.org
> [mailto:owner-u2-us...@listserver.u2ug.org] On Behalf Of George Gallen
> Sent: 27 February 2009 14:26
> To: Ardent
> Subject: [U2] Strange happening...
>
> ok...I found this code snipit (REALITY FLAVOR)
>
> SELECT FILENAME
> LOOP
>READNEXT ID ELSE EXIT
> WHILE ID DO
>CODE
>CODE with GOSUB
>CODE
>CODE
> REPEAT
>
>
> What was happening was the loop was exiting early,  but it was exiting
> after
> the
> CODE with GOSUB line was executed.
>
> What struck me was why there was a While DO as well as an EXIT in the
> loop?
> while nothing in the CODE or GOSUBs modified the ID, would having both
> the
> WHILE/DO and EXIT cause some kind of problem?
>
> After I removed (commented out) the WHILE/DO line, the program ran as
> expected
> and processed the 100,000 records, (whereas before it stopped after 6).
>
> George
> ---
> u2-users mailing list
> u2-users@listserver.u2ug.org
> To unsubscribe please visit http://listserver.u2ug.org/
>
> ---
> 
> Please remember to recycle wherever possible.
> Reduce, reuse, recycle, think do you need to print this e-mail?
> ---
> 
> This e-mail and any attachment(s), is confidential and may be legally
> privileged. It is intended solely for the addressee. If you are not the
> addressee, dissemination, copying or use of this e-mail or any of its
> content is prohibited and may be unlawful. If you are not the intended
> recipient please inform the sender immediately and destroy the e-mail,
> any attachment(s) and any copies. All liability for viruses is excluded
> to the fullest extent permitted by law. It is your responsibility to
> scan or otherwise check this email and any attachment(s). Unless
> otherwise stated (i) views expressed in this message are those of the
> individual sender (ii) no contract may be construed by this e-mail.
> Emails may be monitored and you are taken to consent to this
> monitoring.
>
> Civica Services Limited, Company No. 02374268; Civica UK Limited,
> Company No. 01628868
> Both companies are registered in England and Wales and each has its
> registered office at 2 Burston Road, Putney, London, SW15 6AR.
> ---
> 
> ---
> 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] Strange happening...

2009-02-27 Thread George Gallen
> -Original Message-
> From: owner-u2-us...@listserver.u2ug.org [mailto:owner-u2-
> us...@listserver.u2ug.org] On Behalf Of Allen Egerton
> Sent: Friday, February 27, 2009 11:37 AM
> To: u2-users@listserver.u2ug.org
> Subject: Re: [U2] Strange happening...
>
> While the code itself is less than elegant, I strongly suspect that the
> exiting lies in what's being done in the GOSUB.  Perhaps it's doing a
> SELECT or a CLEARSELECT, or something else that corrupts the active
> select list.

The subroutine uses a bunch of IF-THENS, but nothing that would effect
the selectlist nor does any file IO.

Even if something in the subroutine trashed the selected list or corrupted
the variable in the Do/While expression, it shouldn't drop out of the loop
until it comes back around to the Do/While check? Or is that incorrect?

As for the LOOP WHILE READNEXT ID, I've used this, and have not had issues.

Thanks
George

>
> I recently saw a piece of code where the active select list was trashed
> because the code opened a file, then executed a create-file on the
> opened file...  Took us a while to figure that one out.
>
> As for the loop structure, I tend to like this:
> SELECT FILENAME
> LOOP WHILE READNEXT ID
>   CODE
>   CODE
>   CODE with GOSUB
>   CODE
>   CODE
> REPEAT
>
> It's clean, it's concise, it's easy to read...  And I wish I could
> remember who taught me that you could combine the LOOP and READNEXT in
> that manner...
>
> --
> Allen Egerton
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] DO/WHILE vs IF THEN

2009-02-27 Thread Jacques G.
CTR =0
LOOP WHILE CTR < 4
  CTR+=1
  PRINT CTR
REPEAT

FOR CTR = 0 TO 4
   PRINT CTR
NEXT CTR

CTR = 0
LOOP
  CTR += 1
  PRINT CTR
  IF CTR > 4 THEN EXIT
REPEAT


If you're going to use a counter, might as well use a for loop.  Your test 
didn't work because you didn't test the limit after each increment.  Repeating 
the increment and print statement like your example does defeats the purpose of 
the loop.

- Original Message 
From: George Gallen 
To: Ardent 
Sent: Friday, February 27, 2009 11:20:15 AM
Subject: [U2] DO/WHILE vs IF THEN

OK Aside from programming styles

Is there any "functional" difference between

WHILE expression DOand IF NOT(expression) THEN EXIT
and
UNTIL expression DOand IF expression THEN EXIT


First I thought that the DO/WHILE would activate as soon as
the condition occurred and drop out of a loop, but that is not
the case, the condition has to be active AND control has to be
back at the WHILE statement.


Example:

0001: CTR=0
0002: LOOP
0003:   CTR=CTR+1
0004:   WHILE CTR<4 DO
0005:   PRINT CTR
0006:   CTR=CTR+1
0007:   PRINT CTR
0008:   CTR=CTR+1
0009:   PRINT CTR
0010:   CTR=CTR+1
0011:   PRINT CTR
0012:   CTR=CTR+1
0013:   PRINT CTR
0014:   CTR=CTR+1
0015:   PRINT CTR
0016:   CTR=CTR+1
0017:   PRINT CTR
0018: REPEAT
0019: STOP
0020: END

My first thought was that once CTR = 5, the loop would end (at LINE 12) but it
didn't
until control was passed back to LINE 4, then it ended.
---
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] Common UNIX Printing System

2009-02-27 Thread Dave Taylor

Yes, we're using CUPS on Universe on RHEL 5.x.

Dave Taylor
Sysmark Information Systems, Inc.
Authorized IBM Business Partner
49 Aspen Way
Rolling Hills Estates, CA 90274
(O) 800-SYSMARK (800-797-6275)
(F) 310-377-3550
(C) 310-561-5200
www.sysmarkinfo.com
- Original Message - 
From: "Bertrand, Ron" 

To: 
Sent: Thursday, February 26, 2009 3:12 PM
Subject: [U2] Common UNIX Printing System



Hey all - is anybody using CUPS with universe?

Ron Bertrand
Analyst,AP SYS 3
ISD/LIS/AMS
Group Health Coop
206-901-4519
---
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] Strange happening...

2009-02-27 Thread Dave Taylor

George, Edward,

Just a shot in the dark - prompted by Edwards comment "something else that 
destroys the list".


We found on UniData that, when a SELECT statement creates a list outside of 
the program issuing the SELECT, any other SELECT statement issued by the 
same user in the same or any other program destroys the previously active 
list.


The solution was to EXECUTE the SELECT statement with a RTNLIST to an 
internal list var and then READNEXT the items FROM the list var within the 
program.


This way you can have as many lists as you wish without stepping on any 
other list as long as the list var names are unique.


hth,

Dave

Dave Taylor
Sysmark Information Systems, Inc.
Authorized IBM Business Partner
49 Aspen Way
Rolling Hills Estates, CA 90274
(O) 800-SYSMARK (800-797-6275)
(F) 310-377-3550
(C) 310-561-5200
www.sysmarkinfo.com
- Original Message - 
From: "Edward Brown" 

To: 
Sent: Friday, February 27, 2009 7:52 AM
Subject: RE: [U2] Strange happening...



It looks like it's already been followed within the debugger to get the
information given by George below.

One possibility is that the gosub'd code is doing a CLEARSELECT under
some circumstances, or something else that destroys the list? Possibly
also the gosub'd code has a GO that's destroying the call stack? Of
course these assume that the removal of the UNTIL ID DO line is a red
herring and the cause is elsewhere...

I'd try reducing the code around the loop - see if a minimal test case
gives the same result? If so then it looks like a bug in the compiler.

Edward

-Original Message-
From: owner-u2-us...@listserver.u2ug.org
[mailto:owner-u2-us...@listserver.u2ug.org] On Behalf Of David A. Green
Sent: 27 February 2009 15:33
To: u2-users@listserver.u2ug.org
Subject: RE: [U2] Strange happening...

I would follow it line-by-line with the debugger.

Thanks,
David A. Green
www.dagconsulting.com
(480) 813-1725


-Original Message-
From: owner-u2-us...@listserver.u2ug.org
[mailto:owner-u2-us...@listserver.u2ug.org] On Behalf Of George Gallen
Sent: Friday, February 27, 2009 8:21 AM
To: u2-users@listserver.u2ug.org
Subject: RE: [U2] Strange happening...

that wasn't the case. The id was combination of 13 letters and numbers.
The strange part was where the while/do seemed to kick in.
  The item was read from the file without a problem
  3-4 lines of code execute as expected
  it then executed a gosub, but when it returned, it dropped out of the
loop
 the id variable was never modified.

Strange.

George


-Original Message-
From: owner-u2-us...@listserver.u2ug.org [mailto:owner-u2-
us...@listserver.u2ug.org] On Behalf Of Edward Brown
Sent: Friday, February 27, 2009 9:39 AM
To: u2-users@listserver.u2ug.org
Subject: RE: [U2] Strange happening...

If the ID equates to false it will exit - i.e. a record with ID 00

Edward

-Original Message-
From: owner-u2-us...@listserver.u2ug.org
[mailto:owner-u2-us...@listserver.u2ug.org] On Behalf Of George Gallen
Sent: 27 February 2009 14:26
To: Ardent
Subject: [U2] Strange happening...

ok...I found this code snipit (REALITY FLAVOR)

SELECT FILENAME
LOOP
   READNEXT ID ELSE EXIT
WHILE ID DO
   CODE
   CODE with GOSUB
   CODE
   CODE
REPEAT


What was happening was the loop was exiting early,  but it was exiting
after
the
CODE with GOSUB line was executed.

What struck me was why there was a While DO as well as an EXIT in the
loop?
while nothing in the CODE or GOSUBs modified the ID, would having both
the
WHILE/DO and EXIT cause some kind of problem?

After I removed (commented out) the WHILE/DO line, the program ran as
expected
and processed the 100,000 records, (whereas before it stopped after

6).


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



---


Please remember to recycle wherever possible.
Reduce, reuse, recycle, think do you need to print this e-mail?


---


This e-mail and any attachment(s), is confidential and may be legally
privileged. It is intended solely for the addressee. If you are not

the

addressee, dissemination, copying or use of this e-mail or any of its
content is prohibited and may be unlawful. If you are not the intended
recipient please inform the sender immediately and destroy the e-mail,
any attachment(s) and any copies. All liability for viruses is

excluded

to the fullest extent permitted by law. It is your responsibility to
scan or otherwise check this email and any attachment(s). Unless
otherwise stated (i) views expressed in this message are those of the
individual sender (ii) no contract may be construed by this e-mail.
Emails may be monitored and you are taken to consent to this
monitoring.

Civica Services Limited, Company No. 02374268; Civica UK Limited,
Company No. 01628

[U2] RE: DO/WHILE vs IF THEN

2009-02-27 Thread George Gallen
I hadn't really played much with RAID/VLIST, so I guess this is my springboard..

VLISTING the WHILE/DO vs IF THEN yielded some interesting results

WHILE/DO
3 6 : 1C2 vec_addCTR 1  => CTR
5 E : 10C nop
5 00010 : 0DC lt CTR 4  => $R0
5 00018 : 2DE testfw $R0 00084:
6 00020 : 130 printcrlf  CTR
7 00026 : 1C2 vec_addCTR 1  => CTR
8 0002E : 130 printcrlf  CTR
9 00034 : 1C2 vec_addCTR 1  => CTR

IF/THEN EXIT
3 6 : 1C2 vec_addCTR 1  => CTR
4 E : 0DC lt CTR 4  => $R0
4 00016 : 10E not$R0  => $R1
4 0001C : 2DE testfw $R1 0002C:
4 00024 : 0C2 jump   00090:
6 0002C : 130 printcrlf  CTR
7 00032 : 1C2 vec_addCTR 1  => CTR
8 0003A : 130 printcrlf  CTR

Seems the IF/THEN EXIT adds a few extra opcodes in, but in general it's
pretty much the same effect. So with large loops (many records) it might
slow the process down a couple seconds.

George

> -Original Message-
> From: owner-u2-us...@listserver.u2ug.org [mailto:owner-u2-
> us...@listserver.u2ug.org] On Behalf Of George Gallen
> Sent: Friday, February 27, 2009 11:20 AM
> To: Ardent
> Subject: [U2] DO/WHILE vs IF THEN
>
> OK Aside from programming styles
>
> Is there any "functional" difference between
>
> WHILE expression DOand IF NOT(expression) THEN EXIT
> and
> UNTIL expression DOand IF expression THEN EXIT
>
>
> First I thought that the DO/WHILE would activate as soon as
> the condition occurred and drop out of a loop, but that is not
> the case, the condition has to be active AND control has to be
> back at the WHILE statement.
>
>
> Example:
>
> 0001: CTR=0
> 0002: LOOP
> 0003:   CTR=CTR+1
> 0004:   WHILE CTR<4 DO
> 0005:   PRINT CTR
> 0006:   CTR=CTR+1
> 0007:   PRINT CTR
> 0008:   CTR=CTR+1
> 0009:   PRINT CTR
> 0010:   CTR=CTR+1
> 0011:   PRINT CTR
> 0012:   CTR=CTR+1
> 0013:   PRINT CTR
> 0014:   CTR=CTR+1
> 0015:   PRINT CTR
> 0016:   CTR=CTR+1
> 0017:   PRINT CTR
> 0018: REPEAT
> 0019: STOP
> 0020: END
>
> My first thought was that once CTR = 5, the loop would end (at LINE 12)
> but it
> didn't
> until control was passed back to LINE 4, then it ended.
> ---
> 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] ODBC setup error

2009-02-27 Thread Anthony W. Youngman
In message <47c1b98393896f41a7bfe435442394e510f...@gmsdc.gerzio.ca>, 
u2ug  writes

We have an account setup to allow odbc access to specific files.
We added access to a new file and ran HS.UPDATE.FILEINFO which processed
a few files but then aborted the session with that old standard :

  Abnormal termination of UniVerse
  Fault type is 11.  Layer type is Unknown.

The files that were processed are accessible via odbc but no others.

I tried removing all data files references from the VOC , so there
shouldn't be any files to update and it still gave me this error.
I also tried disabling and re-enabling file access via HS.ADMIN but the
same result - we get the same error when the enable tries to run the
HS.UPDATE.FILEINFO command.


Quite likely. What version of UV are you on?


I am assuming that it is hitting a bad file and blowing up, but I don't
know what that file might be as the order that files are processed seems
to be pretty random.


Try SELECT VOC WITH TYPE EQ "F" and see if that's the order it's 
processing them in (I think it probably is).


This is a major issue.
Can anybody shed some light on this ?

Look on the UniVerse page on PickWiki. There's a page about setting up 
ODBC - it's pretty out-of-date because it's based on 9.6, but it may 
well give you some clues - especially about how to get 
HS.UPDATE.FILEINFO into verbose mode, which stands a good chance of 
telling you which file is blowing up.


Cheers,
Wol
--
Anthony W. Youngman 
'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 -  Open Source Pick
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] AUTOLOGOUT and ON.ABORT

2009-02-27 Thread Martin Phillips

Hi Mike,


I was under the impression that the errlog only existed on
unix systems. Maybe I'm wrong on this but I can't find it
anywhere on our system.


The errlog file is on Windows too but, just as on Unix, you need to create 
an empty errlog file in the UV account directory to enable the system. UV 
looks for this on entry and enables logging.



Martin Phillips
Ladybridge Systems Ltd
17b Coldstream Lane, Hardingstone, Northampton, NN4 6DB
+44-(0)1604-709200 
---

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


Re: [U2] DO/WHILE vs IF THEN

2009-02-27 Thread Martin Phillips

Hi George,


Is there any "functional" difference between

WHILE expression DOand IF NOT(expression) THEN EXIT
and
UNTIL expression DOand IF expression THEN EXIT


None at all.

Use of WHILE/UNTIL is sometimes easier to read. Conversely, some exit 
conditions can only be done using EXIT if they are, for example, in some 
deeper conditional construct.



First I thought that the DO/WHILE would activate as soon as
the condition occurred and drop out of a loop, but that is not
the case, the condition has to be active AND control has to be
back at the WHILE statement.


Correct. The test is carried out at the point where you write it. A single 
loop can contain many WHILE/UNIT conditions scattered through it but 
uncontrolled use of this can make programs difficult to read.



Martin Phillips
Ladybridge Systems Ltd
17b Coldstream Lane, Hardingstone, Northampton, NN4 6DB
+44-(0)1604-709200 
---

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


[U2] RE: DO/WHILE vs IF THEN

2009-02-27 Thread Israel, John R.
If you might also want to play with putting the "WHILE..." line just before the 
REPEAT.  This would be dependent upon your actual program (might need to 
consider if the loop starts with a failed condition).  Your mileage may vary.

John Israel


-Original Message-
From: owner-u2-us...@listserver.u2ug.org 
[mailto:owner-u2-us...@listserver.u2ug.org] On Behalf Of George Gallen
Sent: Friday, February 27, 2009 11:20 AM
To: Ardent
Subject: [U2] DO/WHILE vs IF THEN

OK Aside from programming styles

Is there any "functional" difference between

WHILE expression DOand IF NOT(expression) THEN EXIT
and
UNTIL expression DOand IF expression THEN EXIT


First I thought that the DO/WHILE would activate as soon as
the condition occurred and drop out of a loop, but that is not
the case, the condition has to be active AND control has to be
back at the WHILE statement.


Example:

0001: CTR=0
0002: LOOP
0003:   CTR=CTR+1
0004:   WHILE CTR<4 DO
0005:   PRINT CTR
0006:   CTR=CTR+1
0007:   PRINT CTR
0008:   CTR=CTR+1
0009:   PRINT CTR
0010:   CTR=CTR+1
0011:   PRINT CTR
0012:   CTR=CTR+1
0013:   PRINT CTR
0014:   CTR=CTR+1
0015:   PRINT CTR
0016:   CTR=CTR+1
0017:   PRINT CTR
0018: REPEAT
0019: STOP
0020: END

My first thought was that once CTR = 5, the loop would end (at LINE 12) but it
didn't
until control was passed back to LINE 4, then it ended.
---
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] AUTOLOGOUT and ON.ABORT

2009-02-27 Thread Mike Roosa
I was under the impression that the errlog only existed on unix systems.
 Maybe I'm wrong on this but I can't find it anywhere on our system.

On Fri, Feb 27, 2009 at 1:17 AM, Jacques G.  wrote:

> If you turn on the errlog file in /u1/uv you may get a message in there for
> an AUTOLOGOUT.  I'm pretty sure I've seen such messages in the past.  You
> will have the user name, the PID and some text describing the error.
>
> The errlog file only keeps the last 1001 error messages so you might want
> to have a cron job back them up with a date time stamp periodically during
> the day.
>
>
>
> - Original Message 
> > Our users have their AUTOLOGOUT set to 30 minutes and it looks like the
> > AUTOLOGOUT process causes the ON.ABORT clause to execute.  Is there an
> > easy  way using a SYSTEM() or @variable to determine that this ON.ABORT
> is the
> > result of an AUTOLOGOUT?
> ---
> 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] Strange happening...

2009-02-27 Thread Allen Egerton
George Gallen wrote:
> ok...I found this code snipit (REALITY FLAVOR)
> 
> SELECT FILENAME
> LOOP
>READNEXT ID ELSE EXIT
> WHILE ID DO
>CODE
>CODE with GOSUB
>CODE
>CODE
> REPEAT
> 
> 
> What was happening was the loop was exiting early,  but it was exiting after
> the
> CODE with GOSUB line was executed.
> 
> What struck me was why there was a While DO as well as an EXIT in the loop?
> while nothing in the CODE or GOSUBs modified the ID, would having both the
> WHILE/DO and EXIT cause some kind of problem?
> 
> After I removed (commented out) the WHILE/DO line, the program ran as
> expected
> and processed the 100,000 records, (whereas before it stopped after 6).

While the code itself is less than elegant, I strongly suspect that the
exiting lies in what's being done in the GOSUB.  Perhaps it's doing a
SELECT or a CLEARSELECT, or something else that corrupts the active
select list.

I recently saw a piece of code where the active select list was trashed
because the code opened a file, then executed a create-file on the
opened file...  Took us a while to figure that one out.

As for the loop structure, I tend to like this:
SELECT FILENAME
LOOP WHILE READNEXT ID
  CODE
  CODE
  CODE with GOSUB
  CODE
  CODE
REPEAT

It's clean, it's concise, it's easy to read...  And I wish I could
remember who taught me that you could combine the LOOP and READNEXT in
that manner...

-- 
Allen Egerton
aegerton at pobox dot com
PGP Key ID 0x8EA57261
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] Strange happening...

2009-02-27 Thread Edward Brown
It looks like it's already been followed within the debugger to get the
information given by George below.

One possibility is that the gosub'd code is doing a CLEARSELECT under
some circumstances, or something else that destroys the list? Possibly
also the gosub'd code has a GO that's destroying the call stack? Of
course these assume that the removal of the UNTIL ID DO line is a red
herring and the cause is elsewhere...

I'd try reducing the code around the loop - see if a minimal test case
gives the same result? If so then it looks like a bug in the compiler.

Edward

-Original Message-
From: owner-u2-us...@listserver.u2ug.org
[mailto:owner-u2-us...@listserver.u2ug.org] On Behalf Of David A. Green
Sent: 27 February 2009 15:33
To: u2-users@listserver.u2ug.org
Subject: RE: [U2] Strange happening...

I would follow it line-by-line with the debugger.

Thanks,
David A. Green
www.dagconsulting.com
(480) 813-1725


-Original Message-
From: owner-u2-us...@listserver.u2ug.org
[mailto:owner-u2-us...@listserver.u2ug.org] On Behalf Of George Gallen
Sent: Friday, February 27, 2009 8:21 AM
To: u2-users@listserver.u2ug.org
Subject: RE: [U2] Strange happening...

that wasn't the case. The id was combination of 13 letters and numbers.
The strange part was where the while/do seemed to kick in.
   The item was read from the file without a problem
   3-4 lines of code execute as expected
   it then executed a gosub, but when it returned, it dropped out of the
loop
  the id variable was never modified.

Strange.

George

> -Original Message-
> From: owner-u2-us...@listserver.u2ug.org [mailto:owner-u2-
> us...@listserver.u2ug.org] On Behalf Of Edward Brown
> Sent: Friday, February 27, 2009 9:39 AM
> To: u2-users@listserver.u2ug.org
> Subject: RE: [U2] Strange happening...
>
> If the ID equates to false it will exit - i.e. a record with ID 00
>
> Edward
>
> -Original Message-
> From: owner-u2-us...@listserver.u2ug.org
> [mailto:owner-u2-us...@listserver.u2ug.org] On Behalf Of George Gallen
> Sent: 27 February 2009 14:26
> To: Ardent
> Subject: [U2] Strange happening...
>
> ok...I found this code snipit (REALITY FLAVOR)
>
> SELECT FILENAME
> LOOP
>READNEXT ID ELSE EXIT
> WHILE ID DO
>CODE
>CODE with GOSUB
>CODE
>CODE
> REPEAT
>
>
> What was happening was the loop was exiting early,  but it was exiting
> after
> the
> CODE with GOSUB line was executed.
>
> What struck me was why there was a While DO as well as an EXIT in the
> loop?
> while nothing in the CODE or GOSUBs modified the ID, would having both
> the
> WHILE/DO and EXIT cause some kind of problem?
>
> After I removed (commented out) the WHILE/DO line, the program ran as
> expected
> and processed the 100,000 records, (whereas before it stopped after
6).
>
> George
> ---
> u2-users mailing list
> u2-users@listserver.u2ug.org
> To unsubscribe please visit http://listserver.u2ug.org/
>
>
---
> 
> Please remember to recycle wherever possible.
> Reduce, reuse, recycle, think do you need to print this e-mail?
>
---
> 
> This e-mail and any attachment(s), is confidential and may be legally
> privileged. It is intended solely for the addressee. If you are not
the
> addressee, dissemination, copying or use of this e-mail or any of its
> content is prohibited and may be unlawful. If you are not the intended
> recipient please inform the sender immediately and destroy the e-mail,
> any attachment(s) and any copies. All liability for viruses is
excluded
> to the fullest extent permitted by law. It is your responsibility to
> scan or otherwise check this email and any attachment(s). Unless
> otherwise stated (i) views expressed in this message are those of the
> individual sender (ii) no contract may be construed by this e-mail.
> Emails may be monitored and you are taken to consent to this
> monitoring.
>
> Civica Services Limited, Company No. 02374268; Civica UK Limited,
> Company No. 01628868
> Both companies are registered in England and Wales and each has its
> registered office at 2 Burston Road, Putney, London, SW15 6AR.
>
---
> 
> ---
> 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/
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] Strange happening...

2009-02-27 Thread George Gallen
What was strange, is the code worked fine during other runs (with different
files being read), but it was consistant that is always stopped with that one
file at the 6th record.

I didn't use the debugger, but when I get a chance, I'll uncomment the line
and retest it, and use the debugger to get more information.

>From what I saw, it shouldn't have dropped out with out an error being 
>displayed

Thanks
George

> -Original Message-
> From: owner-u2-us...@listserver.u2ug.org [mailto:owner-u2-
> us...@listserver.u2ug.org] On Behalf Of Edward Brown
> Sent: Friday, February 27, 2009 10:52 AM
> To: u2-users@listserver.u2ug.org
> Subject: RE: [U2] Strange happening...
>
> It looks like it's already been followed within the debugger to get the
> information given by George below.
>
> One possibility is that the gosub'd code is doing a CLEARSELECT under
> some circumstances, or something else that destroys the list? Possibly
> also the gosub'd code has a GO that's destroying the call stack? Of
> course these assume that the removal of the UNTIL ID DO line is a red
> herring and the cause is elsewhere...
>
> I'd try reducing the code around the loop - see if a minimal test case
> gives the same result? If so then it looks like a bug in the compiler.
>
> Edward
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


[U2] DO/WHILE vs IF THEN

2009-02-27 Thread George Gallen
OK Aside from programming styles

Is there any "functional" difference between

WHILE expression DOand IF NOT(expression) THEN EXIT
and
UNTIL expression DOand IF expression THEN EXIT


First I thought that the DO/WHILE would activate as soon as
the condition occurred and drop out of a loop, but that is not
the case, the condition has to be active AND control has to be
back at the WHILE statement.


Example:

0001: CTR=0
0002: LOOP
0003:   CTR=CTR+1
0004:   WHILE CTR<4 DO
0005:   PRINT CTR
0006:   CTR=CTR+1
0007:   PRINT CTR
0008:   CTR=CTR+1
0009:   PRINT CTR
0010:   CTR=CTR+1
0011:   PRINT CTR
0012:   CTR=CTR+1
0013:   PRINT CTR
0014:   CTR=CTR+1
0015:   PRINT CTR
0016:   CTR=CTR+1
0017:   PRINT CTR
0018: REPEAT
0019: STOP
0020: END

My first thought was that once CTR = 5, the loop would end (at LINE 12) but it
didn't
until control was passed back to LINE 4, then it ended.
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] Strange happening...

2009-02-27 Thread David A. Green
I would follow it line-by-line with the debugger.

Thanks,
David A. Green
www.dagconsulting.com
(480) 813-1725


-Original Message-
From: owner-u2-us...@listserver.u2ug.org
[mailto:owner-u2-us...@listserver.u2ug.org] On Behalf Of George Gallen
Sent: Friday, February 27, 2009 8:21 AM
To: u2-users@listserver.u2ug.org
Subject: RE: [U2] Strange happening...

that wasn't the case. The id was combination of 13 letters and numbers.
The strange part was where the while/do seemed to kick in.
   The item was read from the file without a problem
   3-4 lines of code execute as expected
   it then executed a gosub, but when it returned, it dropped out of the
loop
  the id variable was never modified.

Strange.

George

> -Original Message-
> From: owner-u2-us...@listserver.u2ug.org [mailto:owner-u2-
> us...@listserver.u2ug.org] On Behalf Of Edward Brown
> Sent: Friday, February 27, 2009 9:39 AM
> To: u2-users@listserver.u2ug.org
> Subject: RE: [U2] Strange happening...
>
> If the ID equates to false it will exit - i.e. a record with ID 00
>
> Edward
>
> -Original Message-
> From: owner-u2-us...@listserver.u2ug.org
> [mailto:owner-u2-us...@listserver.u2ug.org] On Behalf Of George Gallen
> Sent: 27 February 2009 14:26
> To: Ardent
> Subject: [U2] Strange happening...
>
> ok...I found this code snipit (REALITY FLAVOR)
>
> SELECT FILENAME
> LOOP
>READNEXT ID ELSE EXIT
> WHILE ID DO
>CODE
>CODE with GOSUB
>CODE
>CODE
> REPEAT
>
>
> What was happening was the loop was exiting early,  but it was exiting
> after
> the
> CODE with GOSUB line was executed.
>
> What struck me was why there was a While DO as well as an EXIT in the
> loop?
> while nothing in the CODE or GOSUBs modified the ID, would having both
> the
> WHILE/DO and EXIT cause some kind of problem?
>
> After I removed (commented out) the WHILE/DO line, the program ran as
> expected
> and processed the 100,000 records, (whereas before it stopped after 6).
>
> George
> ---
> u2-users mailing list
> u2-users@listserver.u2ug.org
> To unsubscribe please visit http://listserver.u2ug.org/
>
> ---
> 
> Please remember to recycle wherever possible.
> Reduce, reuse, recycle, think do you need to print this e-mail?
> ---
> 
> This e-mail and any attachment(s), is confidential and may be legally
> privileged. It is intended solely for the addressee. If you are not the
> addressee, dissemination, copying or use of this e-mail or any of its
> content is prohibited and may be unlawful. If you are not the intended
> recipient please inform the sender immediately and destroy the e-mail,
> any attachment(s) and any copies. All liability for viruses is excluded
> to the fullest extent permitted by law. It is your responsibility to
> scan or otherwise check this email and any attachment(s). Unless
> otherwise stated (i) views expressed in this message are those of the
> individual sender (ii) no contract may be construed by this e-mail.
> Emails may be monitored and you are taken to consent to this
> monitoring.
>
> Civica Services Limited, Company No. 02374268; Civica UK Limited,
> Company No. 01628868
> Both companies are registered in England and Wales and each has its
> registered office at 2 Burston Road, Putney, London, SW15 6AR.
> ---
> 
> ---
> 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] Is there an online link for Wintergate Manual?

2009-02-27 Thread Carl Dula

All documentation is here:

   http://www-01.ibm.com/software/data/u2/pubs/library/


--
Carl Dula   Voice: 973-227-8440 X111
Pulsar Systems, Inc.Fax: 973-227-8440
271 Route 46 West, Suite H209   email:c...@pulsarsystems.com
Fairfield, NJ 07004-2474http://www.pulsarsystems.com
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


[U2] ODBC setup error

2009-02-27 Thread u2ug
We have an account setup to allow odbc access to specific files.
We added access to a new file and ran HS.UPDATE.FILEINFO which processed
a few files but then aborted the session with that old standard :

   Abnormal termination of UniVerse
   Fault type is 11.  Layer type is Unknown.

The files that were processed are accessible via odbc but no others.

I tried removing all data files references from the VOC , so there
shouldn't be any files to update and it still gave me this error.
I also tried disabling and re-enabling file access via HS.ADMIN but the
same result - we get the same error when the enable tries to run the
HS.UPDATE.FILEINFO command.
I am assuming that it is hitting a bad file and blowing up, but I don't
know what that file might be as the order that files are processed seems
to be pretty random.

This is a major issue.
Can anybody shed some light on this ?

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


RE: [U2] Strange happening...

2009-02-27 Thread George Gallen
that wasn't the case. The id was combination of 13 letters and numbers.
The strange part was where the while/do seemed to kick in.
   The item was read from the file without a problem
   3-4 lines of code execute as expected
   it then executed a gosub, but when it returned, it dropped out of the loop
  the id variable was never modified.

Strange.

George

> -Original Message-
> From: owner-u2-us...@listserver.u2ug.org [mailto:owner-u2-
> us...@listserver.u2ug.org] On Behalf Of Edward Brown
> Sent: Friday, February 27, 2009 9:39 AM
> To: u2-users@listserver.u2ug.org
> Subject: RE: [U2] Strange happening...
>
> If the ID equates to false it will exit - i.e. a record with ID 00
>
> Edward
>
> -Original Message-
> From: owner-u2-us...@listserver.u2ug.org
> [mailto:owner-u2-us...@listserver.u2ug.org] On Behalf Of George Gallen
> Sent: 27 February 2009 14:26
> To: Ardent
> Subject: [U2] Strange happening...
>
> ok...I found this code snipit (REALITY FLAVOR)
>
> SELECT FILENAME
> LOOP
>READNEXT ID ELSE EXIT
> WHILE ID DO
>CODE
>CODE with GOSUB
>CODE
>CODE
> REPEAT
>
>
> What was happening was the loop was exiting early,  but it was exiting
> after
> the
> CODE with GOSUB line was executed.
>
> What struck me was why there was a While DO as well as an EXIT in the
> loop?
> while nothing in the CODE or GOSUBs modified the ID, would having both
> the
> WHILE/DO and EXIT cause some kind of problem?
>
> After I removed (commented out) the WHILE/DO line, the program ran as
> expected
> and processed the 100,000 records, (whereas before it stopped after 6).
>
> George
> ---
> u2-users mailing list
> u2-users@listserver.u2ug.org
> To unsubscribe please visit http://listserver.u2ug.org/
>
> ---
> 
> Please remember to recycle wherever possible.
> Reduce, reuse, recycle, think do you need to print this e-mail?
> ---
> 
> This e-mail and any attachment(s), is confidential and may be legally
> privileged. It is intended solely for the addressee. If you are not the
> addressee, dissemination, copying or use of this e-mail or any of its
> content is prohibited and may be unlawful. If you are not the intended
> recipient please inform the sender immediately and destroy the e-mail,
> any attachment(s) and any copies. All liability for viruses is excluded
> to the fullest extent permitted by law. It is your responsibility to
> scan or otherwise check this email and any attachment(s). Unless
> otherwise stated (i) views expressed in this message are those of the
> individual sender (ii) no contract may be construed by this e-mail.
> Emails may be monitored and you are taken to consent to this
> monitoring.
>
> Civica Services Limited, Company No. 02374268; Civica UK Limited,
> Company No. 01628868
> Both companies are registered in England and Wales and each has its
> registered office at 2 Burston Road, Putney, London, SW15 6AR.
> ---
> 
> ---
> 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] Wintergate Manuals

2009-02-27 Thread George Gallen
Great...this answers my Wintergate question as well.

George

> -Original Message-
> From: owner-u2-us...@listserver.u2ug.org [mailto:owner-u2-
> us...@listserver.u2ug.org] On Behalf Of Dan Fitzgerald
> Sent: Thursday, February 26, 2009 9:10 PM
> To: u2-users@listserver.u2ug.org
> Subject: RE: [U2] Maybe not the list to ask on, but SB+ generated
> documentation.
>
> Download here:
>
> http://www-01.ibm.com/software/data/u2/pubs/library/
>
> -Original Message-
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


[U2] Is there an online link for Wintergate Manual?

2009-02-27 Thread George Gallen
Similar to the online docs for Universe.

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


RE: [U2] Strange happening...

2009-02-27 Thread Edward Brown
If the ID equates to false it will exit - i.e. a record with ID 00

Edward

-Original Message-
From: owner-u2-us...@listserver.u2ug.org
[mailto:owner-u2-us...@listserver.u2ug.org] On Behalf Of George Gallen
Sent: 27 February 2009 14:26
To: Ardent
Subject: [U2] Strange happening...

ok...I found this code snipit (REALITY FLAVOR)

SELECT FILENAME
LOOP
   READNEXT ID ELSE EXIT
WHILE ID DO
   CODE
   CODE with GOSUB
   CODE
   CODE
REPEAT


What was happening was the loop was exiting early,  but it was exiting
after
the
CODE with GOSUB line was executed.

What struck me was why there was a While DO as well as an EXIT in the
loop?
while nothing in the CODE or GOSUBs modified the ID, would having both
the
WHILE/DO and EXIT cause some kind of problem?

After I removed (commented out) the WHILE/DO line, the program ran as
expected
and processed the 100,000 records, (whereas before it stopped after 6).

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

---
Please remember to recycle wherever possible. 
Reduce, reuse, recycle, think do you need to print this e-mail?
---
This e-mail and any attachment(s), is confidential and may be legally 
privileged. It is intended solely for the addressee. If you are not the 
addressee, dissemination, copying or use of this e-mail or any of its content 
is prohibited and may be unlawful. If you are not the intended recipient please 
inform the sender immediately and destroy the e-mail, any attachment(s) and any 
copies. All liability for viruses is excluded to the fullest extent permitted 
by law. It is your responsibility to scan or otherwise check this email and any 
attachment(s). Unless otherwise stated (i) views expressed in this message are 
those of the individual sender (ii) no contract may be construed by this 
e-mail. Emails may be monitored and you are taken to consent to this 
monitoring.  

Civica Services Limited, Company No. 02374268; Civica UK Limited, Company No. 
01628868
Both companies are registered in England and Wales and each has its registered 
office at 2 Burston Road, Putney, London, SW15 6AR.
---
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


[U2] Strange happening...

2009-02-27 Thread George Gallen
ok...I found this code snipit (REALITY FLAVOR)

SELECT FILENAME
LOOP
   READNEXT ID ELSE EXIT
WHILE ID DO
   CODE
   CODE with GOSUB
   CODE
   CODE
REPEAT


What was happening was the loop was exiting early,  but it was exiting after
the
CODE with GOSUB line was executed.

What struck me was why there was a While DO as well as an EXIT in the loop?
while nothing in the CODE or GOSUBs modified the ID, would having both the
WHILE/DO and EXIT cause some kind of problem?

After I removed (commented out) the WHILE/DO line, the program ran as
expected
and processed the 100,000 records, (whereas before it stopped after 6).

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


RE: [U2] Inter-Process Control...

2009-02-27 Thread George Gallen
hmmm. Are you running on a unix system?
Maybe you could do this with a named pipe.

have the waiting program open a named pipe for reading and wait
and have the sending program open the named pipe for writing and send the 
message.

George

> -Original Message-
> From: owner-u2-us...@listserver.u2ug.org [mailto:owner-u2-
> us...@listserver.u2ug.org] On Behalf Of Larry Hiscock
> Sent: Thursday, February 26, 2009 4:47 PM
> To: u2-users@listserver.u2ug.org
> Subject: RE: [U2] Inter-Process Control...
>
> Yep ... sure miss sem$wait & sem$notify.  You could accomplish the same
> thing with a simple socket-based protocol.  The main process could
> listen on
> a socket and wait for any of the sub-processes to connect and send a
> message
> via the socket.
>
> Larry Hiscock
> Western Computer Services
>
>
> -Original Message-
> From: owner-u2-us...@listserver.u2ug.org
> [mailto:owner-u2-us...@listserver.u2ug.org] On Behalf Of Tom Whitmore
> Sent: Thursday, February 26, 2009 12:25 PM
> To: u2-users@listserver.u2ug.org
> Subject: RE: [U2] Inter-Process Control...
>
> I agree.  I wrote two little programs.
>
> LOCK.TEST1
> 0001 LOCK 60 ELSE CRT '60 LOCKED'
> 0002 CRT 'UNLOCKED'
>
>
> LOCK.TEST2
> 0001 UNLOCK 60
> 0002 CRT '60 WAS UNLOCKED'
>
> LOCK.TEST1 locked 60 displayed "unlocked".
> LOCK.TEST2 generated the error ' Program "LOCK.TEST2": Line 1, Lock 60
> not
> owned by calling process' and then displayed "60 WAS UNLOCKED".
>
> As I was playing with the test programs as I type this.  it looks like
> the
> first process needs to perform the first lock.  The second process will
> then
> lock, and wait on the lock until the first process unlocks.  I need to
> be
> able to support many-to-one processes.  The "one" process waits on the
> lock
> and any of the "many" processes need to release the lock... which the
> old
> semaphore process supported... I confess, I'm spoiled.  :)
>
> Thanks
> Tom
> -Original Message-
> From: owner-u2-us...@listserver.u2ug.org
> [mailto:owner-u2-us...@listserver.u2ug.org] On Behalf Of Kevin King
> Sent: Thursday, February 26, 2009 2:01 PM
> To: u2-users@listserver.u2ug.org
> Subject: Re: [U2] Inter-Process Control...
>
> Tom, can you elaborate when you say "the only process that can modify
> the
> lock is the one that set it".  Isn't that exactly how a semaphore is
> supposed to work?  Both processes should be able to set the lock but
> only
> one can have it at any moment in time. Or am I missing the point?
> ---
> 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/
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] Upgrades

2009-02-27 Thread Jeff Butera

> We are looking to do a big upgrade on our hardware and software, and I was
> hoping to get any positive or negative feedback folks might have had.

Based on new features, I'd try to shoot for Unidata 7.2.x 

> CURRENT
> HP Ux 11i v1
> UniData 6.0.4
> SB 5.2
> RedBack 4.2.6
> DataStage 7.5
>
> PROPOSED
> HP Ux 11i v3
> UniData 7.1.17
> SB 5.2.4
> U2 WEB DE 4.4
> DataStage (not sure what version)


-- 
Jeff Butera, Ph.D.
Administrative Systems
Hampshire College
jbut...@hampshire.edu
413-559-5556

"Dad, you're talking in grown-up and need to stop."
 Catherine Butera
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


[U2] Upgrades

2009-02-27 Thread Israel, John R.
We are looking to do a big upgrade on our hardware and software, and I was
hoping to get any positive or negative feedback folks might have had.



CURRENT

HP Ux 11i v1

UniData 6.0.4

SB 5.2

RedBack 4.2.6

DataStage 7.5



PROPOSED

HP Ux 11i v3

UniData 7.1.17

SB 5.2.4

U2 WEB DE 4.4

DataStage (not sure what version)







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


RE: [U2] AUTOLOGOUT and ON.ABORT

2009-02-27 Thread Perry Taylor
Just a side note on the errlog file... You can increase the number of
messages by increasing the MAXERRLOGENT parameter in uvconfig.

Perry 

-Original Message-
From: owner-u2-us...@listserver.u2ug.org
[mailto:owner-u2-us...@listserver.u2ug.org] On Behalf Of Jacques G.
Sent: Thursday, February 26, 2009 11:17 PM
To: u2-users@listserver.u2ug.org
Subject: Re: [U2] AUTOLOGOUT and ON.ABORT

If you turn on the errlog file in /u1/uv you may get a message in there
for an AUTOLOGOUT.  I'm pretty sure I've seen such messages in the past.
You will have the user name, the PID and some text describing the error.

The errlog file only keeps the last 1001 error messages so you might
want to have a cron job back them up with a date time stamp periodically
during the day.



- Original Message 
> Our users have their AUTOLOGOUT set to 30 minutes and it looks like
the
> AUTOLOGOUT process causes the ON.ABORT clause to execute.  Is there an
> easy  way using a SYSTEM() or @variable to determine that this
ON.ABORT is the
> result of an AUTOLOGOUT?
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/

CONFIDENTIALITY NOTICE: This e-mail message, including any attachments, is for 
the sole use of the intended recipient(s) and may contain confidential and 
privileged information.  Any unauthorized review, use, disclosure or 
distribution is prohibited. ZirMed, Inc. has strict policies regarding the 
content of e-mail communications, specifically Protected Health Information, 
any communications containing such material will be returned to the originating 
party with such advisement noted. If you are not the intended recipient, please 
contact the sender by reply e-mail and destroy all copies of the original 
message.
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


[U2] Inter-Process Control...

2009-02-27 Thread George Hammerle
Does Universe support the WAKE / PAUSE commands? We are a Unidata shop
and use these commands to do something very similar to the problem you
are trying tackle.

Syntax

 

WAKE pid

 

Description

 

The UniBasic WAKE command activates a UniData process (pid) that has
been   
paused with either the ECL PAUSE command or the UniBasic PAUSE command.
If  
the specified process has not already been paused, UniData disregards
the   
next PAUSE issued for the process indicated by pid.
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/