Re: [U2] Dynamic Concepts Unibasic ... Is this Pick ?

2014-04-24 Thread Charles Stevenson

 there's another outfit called Unidata in Colorado, too.
It's part of a university or an NGO thing, maybe unifying data across 
several NGOs.
Maybe an arm of the Amalgamated Organization of Federated Associations.  
(hat tip to Garrison Keillor.)


On 4/24/2014 9:41 PM, Tom Whitmore wrote:

This appears to be unrelated to Rocket's UniBASIC.   In fact, it appears to run 
at the OS level.

It is odd that their documentation states  UniBasic is a trademark of Dynamic 
Concepts Inc.  Does Rocket have an infringement issue?

Tom Whitmore
RATEX Business Solutions

-Original Message-
From: u2-users-boun...@listserver.u2ug.org 
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Wjhonson
Sent: Thursday, April 24, 2014 2:33 PM
To: u2-users@listserver.u2ug.org
Subject: [U2] Dynamic Concepts Unibasic ... Is this Pick ?


http://www.dynamic.com/software/unibasic/

This company confuses me.  Is this the same UniBASIC ?
They are based in Irvine but their website makes it seem like this UniBasic 
is theirs.
No mention of Rocket.

Or are their actually two completely unrelated companies, hawking products both 
called Uni Basic ?


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



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


Re: [U2] Left Outer Join Question

2014-03-04 Thread Charles Stevenson

Randy,

It sounds like NSELECT is what you need.
But MERGE.LIST is a handy thing to get working.
I use it all the time, especially when researching bugs or bad data.

What happens if you do other commands manipulating active select list 1?

SELECT OLDMAS TO 1
SAVE.LIST X FROM 1 ?   or  LIST OLDMAS FROM 1 ?

You say you're in Pick-flavor.
Look for 1, 2, 3 in the VOC.
There may be A-items defined there.  They may conflict with parsing the 
command.   0 thru 11 actually.
If there are, they should be moved to DICT.DICT which, unlike true Pick, 
is UV's master dictionary of dictionaries.


While you're at it, for any and all of the words used in the command 
line compare your VOC to what is in NEWACC (the file they build VOCs for 
new accounts).  Particularly TO  FROM.


I have seen some commands fail, but others work fine when those are not 
exactly as NEWACC says they should be.


Chuck


On 3/4/2014 3:39 PM, randyleesmith wrote:

I tried the simplest way and still could not get it to work.

SF-MORTSELECT OLDMAS TO 1

5247 record(s) selected to SELECT list #1.
SF-MORTSELECT TRWMONTHEND TO 2

5229 record(s) selected to SELECT list #2.
SF-MORTMERGE.LIST 1 INTERSECT 2 TO 3

SELECT list 1 is not active.
SF-MORTMERGE.LIST 1 INTERSECT 2

SELECT list 1 is not active.

I even tried the lowercase select and got the same result.

Our version is 10.2.7 and we are running in PICK PICK.FORMAT.
We are running a number of older applications and Proc's.
So it may because of the Version I'm using.

:
0001: X
:
0002: 10.2.7
:
0003: PICK
:
0004: PICK.FORMAT
:
0005: 10.2.7



-
I used to be an Optimist until I knocked over the glass.
--
View this message in context: 
http://u2-universe-unidata.1073795.n5.nabble.com/Left-Outer-Join-Question-tp42740p42772.html
Sent from the U2 - Users mailing list archive at Nabble.com.
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users



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


Re: [U2] Recommended 11.1.point release to upgrade to.

2014-03-02 Thread Charles Stevenson

Dan,
Thank-you for responding.  More generally, thank-you for monitoring 
u2-list so closely.  So, under the theory that no good deed should go 
unpunished, I have a couple follow-up questions for you.



1. Your  *planning*  comment confuses me.
It can be taken 2 ways.  Are you saying Rocket is (a) planning NOT to do 
11.1.x bug fix releases;  or (b) not CURRENTLY planning any such bug fix 
releases because none have been identified yet?


For example, John Hester's localtime() / telnet problem surfaced in 
11.1  (telnet handling changed dramatically at 11.1 to accommodate the 
Date Replication changes), I would think you would offer an 11.1.x bug 
fix so a user does not need to do a major jump to 11.2 to get the fix.   
I suppose it depends on whether there is a good workaround,  Mr. Hester 
seems satisfied with his.


Because 11.1 is still in GA status, and because 11.2 is still young,  
I would think bugs that are found to be in 11.1 would still be fixed 
with an 11.1.16, .17, etc..   At this late stage of 11.1 I would think 
the only releases would be unplanned bug fixes.  Yes, unplanned until 
another 11.1 bug is found, but once found, let the planning commence.


If you've followed this thread, you'll recall my organization is 
extraordinarily reluctant to make install major uv releases w/o 
extensive regression testing due to past wounds.  If we encounter a bug 
in 11.1.15 will we be told, sorry, no fix unless you upgrade to 11.2.x?  
That won't sit well.  It even negates my reason for going to the highest 
11.1.x instead of a point release with a plethora of current satisfied 
users.



2. The version numbering scheme itself confuses me.
What sort of thing would call for a jump from 11.x to 12.1?  (Or will it 
be 12.0?) vs.  11.n to 11.[n+1] ?  Why was it called 11.1 instead of 10.4?


The new Metadata Manager (U2 MDM) was introduced in 11.1.11, a minor 
point release.  To my way of thinking, that would have triggered 
11.2.  And the existing new 11.2 would have been called 12.1.


I thought the minor point releases were generally for bug fixess, not 
new functionality.


Maybe you could clarify the naming scheme?

Thanks in advance,
Chuck


On 2/28/2014 8:25 PM, Daniel McGrath wrote:

 Hi Charles,

 It does not affect Windows. At this point, we are not *planning* any 
further 11.1.x releases so we can focus on the 11.2.x and .NEXT releases 
of UniVerse and moving the technology forward.


 I also misspoke on 11.2.4 as it was a mistake in our issue system. It 
is actually 11.2.3.


 Regards,

 Dan

 -Original Message-
 From: Charles Stevenson
 Sent: Friday, February 28, 2014 9:31 AM

 is this unix-, linux-specific  or windows, too?
 Fix in 11.2.4,  but in 11.1.16 too?  That's the usual practice, isn't it?

 On 2/28/2014 6:50 PM, Daniel McGrath wrote:
 As an FYI, I'm sitting in a meeting now were we are pulling a 
check-in to use a re-entrant version of the function for our latest 
build to fix this issue. You should expect a fix in 11.2.4 unless 
something goes wrong.


 Regards,
 Dan

 -Original Message-
 From: John Hester
 Sent: Thursday, February 27, 2014 4:59 PM

 We migrated from UV 10.2.7 on RedHat 5.1 x86 to 11.1.13 on RedHat 
6.4 x64 last November.  I've since run into a bug that can reveal itself 
when tty processes are terminated.  It could be unique to linux, but you 
may want to watch for it.  The symptoms are that terminated UV tty 
processes disappear from LISTU and PORT.STATUS, but continue to exist in 
the process table and consume a UV per-seat license.  I discovered the 
issue when we ran out of licenses after a couple of months of uptime and 
I initially couldn't figure out where they went.  Running the ps 
command at the OS level revealed their existence.  I'm guessing the 
issue occurs on maybe 1 out of 200 or 300 tty sessions.


 The root cause of the issue is the localtime() function being called 
from the signal handler.  The localtime() function is not POSIX 
async-signal-safe, which means it can't be safely called from there.  
The function acquires a lock which may already be held by the process 
that was interrupted by the signal if it too was in localtime().  When 
this happens, a deadlock is the result and the process is in limbo 
forever.  I was able to easily work around the issue by having cron run 
a script after hours every day to clean up any hung UV processes and 
recover the licenses.  I opened a ticket with Rocket, and they're 
planning to include a fix for the issue in 11.2.4.


 I'm happy to provide my workaround script to anyone who runs into 
this on a linux or unix box.  Unfortunately, I'm not sure how one would 
craft a workaround on Windows.


 -John

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


Re: [U2] Recommended 11.1.point release to upgrade to.

2014-02-28 Thread Charles Stevenson

is this unix-, linux-specific  or windows, too?
Fix in 11.2.4,  but in 11.1.16 too?  That's the usual practice, isn't it?

On 2/28/2014 6:50 PM, Daniel McGrath wrote:

As an FYI, I'm sitting in a meeting now were we are pulling a check-in to use a 
re-entrant version of the function for our latest build to fix this issue. You 
should expect a fix in 11.2.4 unless something goes wrong.

Regards,
Dan

-Original Message-
From: u2-users-boun...@listserver.u2ug.org 
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of John Hester
Sent: Thursday, February 27, 2014 4:59 PM
To: U2 Users List
Subject: Re: [U2] Recommended 11.1.point release to upgrade to.

We migrated from UV 10.2.7 on RedHat 5.1 x86 to 11.1.13 on RedHat 6.4 x64 last November.  
I've since run into a bug that can reveal itself when tty processes are terminated.  It 
could be unique to linux, but you may want to watch for it.  The symptoms are that 
terminated UV tty processes disappear from LISTU and PORT.STATUS, but continue to exist 
in the process table and consume a UV per-seat license.  I discovered the issue when we 
ran out of licenses after a couple of months of uptime and I initially couldn't figure 
out where they went.  Running the ps command at the OS level revealed their 
existence.  I'm guessing the issue occurs on maybe 1 out of 200 or 300 tty sessions.

The root cause of the issue is the localtime() function being called from the 
signal handler.  The localtime() function is not POSIX async-signal-safe, which 
means it can't be safely called from there.  The function acquires a lock which 
may already be held by the process that was interrupted by the signal if it too 
was in localtime().  When this happens, a deadlock is the result and the 
process is in limbo forever.  I was able to easily work around the issue by 
having cron run a script after hours every day to clean up any hung UV 
processes and recover the licenses.  I opened a ticket with Rocket, and they're 
planning to include a fix for the issue in 11.2.4.

I'm happy to provide my workaround script to anyone who runs into this on a 
linux or unix box.  Unfortunately, I'm not sure how one would craft a 
workaround on Windows.

-John

-Original Message-
From: u2-users-boun...@listserver.u2ug.org 
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Charles Stevenson
Sent: Thursday, February 27, 2014 12:34 PM
To: U2 Users List
Subject: Re: [U2] Recommended 11.1.point release to upgrade to.

Reporting back on a question I asked a few months ago.

We finally upgraded from uv10.2.10 to uv11.1.15 mid-February.
Delays were for internal business reasons having nothing to do with UV or the 
upgrade project itself.

Platform is Windows 2003, which will be upgraded later this year. I'm pushing 
for Linux but not holding my breath.

Primary goal was fear of falling off the back end of maintenance.

I would have liked 11.2,  but it is too new.  There is no pressing business 
need to be an early adapter.  Stability overrides.

Because several years ago many here on both business  IT sides suffered a UV 
upgrade that caused the worst disaster I've ever seen a production system take.  We 
restored from backup, losing 2 days of production data.  That is the only problem I 
have ever seen with any UV upgrade.
But I performed the one that went bad so I, personally, can't afford a 2nd with 
this same audience.

So reluctance, nay, fear was high; regression testing, extensive; time
between upgrades, long.   (I won't get 11.2 for years unless we migrate
to Linux.)

Since every point release potentially introduces new bugs as well as fixes,  I 
hesitated going to the latest 11.1.x, and toyed with going to
a lesser one that more people are running on, pain-free.   In the end we
opted for the newest at that time, 11.1.13.  If we ever have an issue, Rocket would 
probably put the fix in the next release  we'd have to install the cummulative 
changes, anyway.  So we might as well test for as much as possible up front.

Most regression testing was on 11.1.13.  By the time we were ready to install, 
11.1.15 was available.  There did not appear to be much that affected us in -.14 
 -.15,  so I installed -.15 on the test system.
Then mid-February I moved  production from 10.2.10 to 11.1.15.

Due to prior disaster, rollback-readiness to return to 10.2.10 was important.  
I exercised that a couple times on dev.

Issues, comments:

No issues during regression testing.

The (default) uvhome is now c:\u2\uv instead of c:\ibm\uv.
I chose to do a new install instead of upgrade.
Permissions when installing 11.1.15 on production were tighter than when
I installed 11.1.13 on dev.  I don't know why.   I like tight
permissions, so I left them  it's ok.  Had to be careful to allow update 
permissionw wher I created the new uv\errlog.

MAKE.MAP.FILE had errors on both dev  prod after 11.1.15 install.  I 
re-catalogued a couple subroutines it cared about and it seems to be ok.  It wasn't

Re: [U2] Recommended 11.1.point release to upgrade to.

2014-02-27 Thread Charles Stevenson

Reporting back on a question I asked a few months ago.

We finally upgraded from uv10.2.10 to uv11.1.15 mid-February.
Delays were for internal business reasons having nothing to do with UV 
or the upgrade project itself.


Platform is Windows 2003, which will be upgraded later this year. I'm 
pushing for Linux but not holding my breath.


Primary goal was fear of falling off the back end of maintenance.

I would have liked 11.2,  but it is too new.  There is no pressing 
business need to be an early adapter.  Stability overrides.


Because several years ago many here on both business  IT sides suffered 
a UV upgrade that caused the worst disaster I've ever seen a production 
system take.  We restored from backup, losing 2 days of production 
data.  That is the only problem I have ever seen with any UV upgrade.  
But I performed the one that went bad so I, personally, can't afford a 
2nd with this same audience.


So reluctance, nay, fear was high; regression testing, extensive; time 
between upgrades, long.   (I won't get 11.2 for years unless we migrate 
to Linux.)


Since every point release potentially introduces new bugs as well as 
fixes,  I hesitated going to the latest 11.1.x, and toyed with going to 
a lesser one that more people are running on, pain-free.   In the end we 
opted for the newest at that time, 11.1.13.  If we ever have an issue, 
Rocket would probably put the fix in the next release  we'd have to 
install the cummulative changes, anyway.  So we might as well test for 
as much as possible up front.


Most regression testing was on 11.1.13.  By the time we were ready to 
install, 11.1.15 was available.  There did not appear to be much that 
affected us in -.14  -.15,  so I installed -.15 on the test system.  
Then mid-February I moved  production from 10.2.10 to 11.1.15.


Due to prior disaster, rollback-readiness to return to 10.2.10 was 
important.  I exercised that a couple times on dev.


Issues, comments:

No issues during regression testing.

The (default) uvhome is now c:\u2\uv instead of c:\ibm\uv.
I chose to do a new install instead of upgrade.
Permissions when installing 11.1.15 on production were tighter than when 
I installed 11.1.13 on dev.  I don't know why.   I like tight 
permissions, so I left them  it's ok.  Had to be careful to allow 
update permissionw wher I created the new uv\errlog.


MAKE.MAP.FILE had errors on both dev  prod after 11.1.15 install.  I 
re-catalogued a couple subroutines it cared about and it seems to be 
ok.  It wasn't a permissions problem.


Gracious thanks to those on this list who offered advice,
Chuck Stevenson


On 9/25/2013 12:27 AM, Charles Stevenson wrote:

We're finally going to upgrade from 10.2.10 to 11.1.[something].

But which point release?

We're on Win2003.  (Linux next year.  Baby steps.) . . . 


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


Re: [U2] SELECTINDEX problem Universe 11.1.11

2014-02-22 Thread Charles Stevenson

Use BSCAN command. instead of SELECTINDEX.
SELECTINDEX gets exact matches, whereas BSCAN gets you to a starting 
point , then you go forward from there.   You'd BSCAN for MACKE, then 
loop with additional BSCANs until you are past what you care about.


Or execute a SELECT statement:
 SELECT . . . WITH NAME LIKE MACKE...
or
 SELECT . . . WITH NAME = MACKE]
to get a select list based on the index. I assume RetrieVe 
effectively does BSCAN behind the curtain.


It depends on whether you want readability or efficiency.
cds

From: mbeggs [via U2 (UniVerse  UniData)] Subject: SELECTINDEX problem 
Universe 11.1.11


We are currently running UV 11.1.11 and have come across a problem with 
SELECTINDEX.  For example if I enter in MACKE for a name should all names 
starting with MACKE display, including MACKENZIE.  This does not appear to be 
working properly.  According to Rocket they say there was a bug in 11.1.2 for 
this problem, and was corrected, but appears to still be a problem.  Does 
anyone have any suggestions?



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


Re: [U2] wasted time on rs.com

2014-02-21 Thread Charles Stevenson

The question was Why can't it be easy to find?
not Where is it?

Searching Rocket website is difficult.

The other day someone on this list was searching for Tech support 
Survivor's guide.
Did he find it?  We were told he needed a 2UBC login to get to it.  Not 
for the riffraff.


Try finding Mark Baldridge's Hitchhiker's Guide To UniVerse, which 
should be required reading.

Go to www.rocketsoftware.com  homepage  enter some variants of
Hitchhiker's guide to the universe
at the search prompt of rocket software homepage.
 Your search yielded no results
Keep going.   You can limit the product families to U2. (Although I 
don't think that really does anything.)  Nada.

Tell me how long it takes to find it.

Try to find out what particular error codes mean.

Known issues and the release where they are fixed are buried in some 
help file you can get to only by looking up particular releases in a 
product matrix and downloading the entire help file.

At least, that's the only way I've found.

Do you have to do that for Lnux? MS? HP? any other software product you use?
I used a new MS backup tool to backup a Win8 server  its virtual 
servers.  I got an error code.  I am decidedly not a windows 
administrator.  But on 1st attempt I found a useable MS answer.


I rely on this u2-list.  It's quicker to post a question here than wade 
through RS looking for anything.
A couple weeks ago I couldn't remember syntax for the old, arcane 
Revise.  Posted the q here  got 2 answers.



On 2/20/2014 8:05 PM, baker_hug...@neimanmarcus.com wrote:

It is on the Tech Connect website.  You might need a u2tc login to get to
the product matrix.
https://u2tc.rocketsoftware.com/matrix.asp

Then enter Product desired, and OS:
https://u2tc.rocketsoftware.com/buildmatrix.asp

Regards,
R. Baker Hughes
Senior UV DBA, Wipro/NMG


From:   Marc Harbeson marc.harbe...@gmail.com
To: U2 Users List u2-users@listserver.u2ug.org,
Date:   02/20/2014 11:00 AM
Subject:[U2] wasted time on rs.com
Sent by:u2-users-boun...@listserver.u2ug.org

why can the download for the U2 clients not be easy to find on the web
site?!?!?



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


Re: [U2] Debugging UNIX Segmentation Violations and Core Dumps (UV)

2014-02-18 Thread Charles Stevenson

You only allow that information out to people under maintenance contracts?
Anyone can sign up at TechConnect.  That isn't good enough?

 Original Message 

Robert, If you have a current maintenance contract with Rocket U2 you will
be able to access this and many more resources from the Rocket Customer
Portal.

Neil Richards
Sales Engineer
Rocket Software


On Thu, Feb 13, 2014 at 11:12 PM, Robert i...@keyway.net wrote:


I received a copy of a CD, that has a lot of good information on it.

It is labeled U2 Tech Support Survival Kit. It has some good documents
and diagnostic utilities on it. Here is an example:

IBM-U2 Data Management Solutions,Technical Support White Paper,Subject:
Debugging UNIX Segmentation Violations and Core Dumps (UV)

Anyone have a link to the latest equivalent of this CD on the Rocket
Website?

When I searched there was no mention on the Rocket website about SURVIVAL
KIT.

Thanks,

Robert Norman
ROBERT NORMAN AND ASSOCIATES
23441 Golden Springs Dr., #289, Diamond Bar, CA 91765
(323) 285-7272, (951) 541-1668
http://universe-basic-programming.webstarts.com
http://users.keyway.net/~ice/index.html
http://www.affordablemultivalueprogramming.i8.com

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


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



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


Re: [U2] ED: The very finest of 1970s technology! was: UniVerse Dictionary question

2014-02-09 Thread Charles Stevenson

For ED on UV we're each partially right, partially wrong.

IBspaceenter puts you in input mode  instead of inserting a blank 
line like it should, like Ispaceenter does.


But IBspacespaceenter , does insert a space.  At some earlier 
release it don't think it did.  It did what IBspaceenter should (but 
doesn't) do.


I suppose you want to quibble of over the finest of 70's technology, too.
How about Better than EDLIN.   We can probably agree on that.

Thank-you for the nit-picking.  I feel cleaner already.
Chuck

On 2/7/2014 7:03 PM, Howder, Scott wrote:

Sorry, meant to add the following on my previous post:

At least this is true in AE on Unidata



Scott Howder
Assistant CIO
Cedarville University
howd...@cedarville.edu
937-766-7905


On Fri, Feb 7, 2014 at 10:56 AM, Howder, Scott howd...@cedarville.eduwrote:


IBspacespaceenter technically does not insert a blank line.  It will
insert a line with a space at the beginning.  You can verify this by doing
the following:

IBspacespaceenter
AspaceX

You will notice that the X is indented by one space.

As others have noted, to actually insert a blank line with nothing in it
you would have to use the ` character as in:

IBspace`

or

Ispace`

Kind of picky perhaps but in some cases the difference matters.



Scott Howder
Assistant CIO
Cedarville University
howd...@cedarville.edu
937-766-7905


On Thu, Feb 6, 2014 at 4:48 AM, Charles Stevenson 
stevenson.c...@gmail.com wrote:


 it's been that way for, oh I dunno, going back to PI, 30+ years?
That's in input mode.

Here are some related ED facts about edit-mode that I've found Pickies
(vs. Primates) don't seem to know:

Rspace enter   replaces current line with a blank line.

Ispacethis is some textenter
will insert a line this is some textbut leave yoiu in edit-mode, not
insert-mode.

IB will put you in input mode BEFORE the line you're on.

IBspacethis is a some textenter
will insert a line this is some text  BEFORE the current line
but leave yoiu in edit-mode, not insert-mode.

There  is a bit of an inconsistency with IB:
IBspacespaceenter
 Inserts a blank line BEFORE current line.  I don't know why 2 spaces
are needed. Oh, well.

Renter   repeats the previous full-line Replacement
Center   repeats the previous Change command.
R this is some textenter
 replaces thw whole line.
R/ABC/XYZ
   is really  C/ABC/XYZ

So if you pickies are used to saying
 R/ABC/XYZ/
That is really a Change command,   C/ABC/XYZ.
So subsequent Center will repeat your R/ABC/XYZ/


Finally, there is the actually helpful HELPenter command. (Check out
HELP SEQenter.)

AE aficionados may quibble over the ED  motto,  The very finest of 1970s
technology!

cds


On 2/6/2014 4:24 AM, Clif Oliver wrote:


The UniVerse ED verb in input mode accepts a *single* space as a null
line indicator.


Regards,

Clif


On Feb 5, 2014, at 6:15 PM, Daniel McGrath dmcgr...@rocketsoftware.com
wrote:

  A tip my original mentor taught me on the first day was that in ED/AE,

the back tick (`) gets treated as an empty line so you can keep going in
insert mode and not need to worry about it.

Regards,
Dan


-Original Message-
From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-bounces@
listserver.u2ug.org] On Behalf Of Martin Scholl
Sent: Wednesday, February 05, 2014 5:07 PM
To: 'U2 Users List'
Subject: Re: [U2] UniVerse Dictionary question

The dots were just there to keep the numbered list going, The same I
use dots in the Editor to enter blank lines. Later I go to the top and do
R/.//50 to remove the dot.

-Original Message-
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Wjhonson
Sent: Tuesday, February 04, 2014 3:04 PM
To: u2-users@listserver.u2ug.org
Subject: Re: [U2] UniVerse Dictionary question


What are the periods in 3 and 4 for?
Did you try removing those?



-Original Message-
From: Woodward, Bob bob_woodw...@k2sports.com
To: U2 Users List u2-users@listserver.u2ug.org
Sent: Tue, Feb 4, 2014 11:49 am
Subject: Re: [U2] UniVerse Dictionary question


Just to make sure, you're wanting FIELD 178 and the first value of that
field.  Correct?  Because you have a length of 1, left justified I want to
make sure you're not looking for the first character of the 178th field.
Maybe if you showed what you're wanting and what you're getting,
instead, then we'd be sure to give you an answer that makes sense.

-Original Message-
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Bill Haskett
Sent: Tuesday, February 04, 2014 11:45 AM
To: U2 Users List
Subject: Re: [U2] UniVerse Dictionary queston

Martin:

This is the only way to do accomplish the defined task in UniData.
Maybe @RECORD178,1 is the preferred method in UV.

Bill
Untitled Page




- Original Message -
*From:* msch...@martinscholl.com
*To:* U2 Users

[U2] ED: The very finest of 1970s technology! was: UniVerse Dictionary question

2014-02-06 Thread Charles Stevenson

 it's been that way for, oh I dunno, going back to PI, 30+ years?
That's in input mode.

Here are some related ED facts about edit-mode that I've found Pickies 
(vs. Primates) don't seem to know:


Rspace enter   replaces current line with a blank line.

Ispacethis is some textenter
   will insert a line this is some textbut leave yoiu in edit-mode, 
not insert-mode.


IB will put you in input mode BEFORE the line you're on.

IBspacethis is a some textenter
   will insert a line this is some text  BEFORE the current line
   but leave yoiu in edit-mode, not insert-mode.

There  is a bit of an inconsistency with IB:
IBspacespaceenter
Inserts a blank line BEFORE current line.  I don't know why 2 
spaces are needed. Oh, well.


Renter   repeats the previous full-line Replacement
Center   repeats the previous Change command.
R this is some textenter
replaces thw whole line.
R/ABC/XYZ
  is really  C/ABC/XYZ

So if you pickies are used to saying
R/ABC/XYZ/
That is really a Change command,   C/ABC/XYZ.
So subsequent Center will repeat your R/ABC/XYZ/


Finally, there is the actually helpful HELPenter command. (Check out 
HELP SEQenter.)


AE aficionados may quibble over the ED  motto,  The very finest of 
1970s technology!


cds


On 2/6/2014 4:24 AM, Clif Oliver wrote:

The UniVerse ED verb in input mode accepts a *single* space as a null line 
indicator.


Regards,

Clif


On Feb 5, 2014, at 6:15 PM, Daniel McGrath dmcgr...@rocketsoftware.com wrote:


A tip my original mentor taught me on the first day was that in ED/AE, the back 
tick (`) gets treated as an empty line so you can keep going in insert mode and 
not need to worry about it.

Regards,
Dan


-Original Message-
From: u2-users-boun...@listserver.u2ug.org 
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Martin Scholl
Sent: Wednesday, February 05, 2014 5:07 PM
To: 'U2 Users List'
Subject: Re: [U2] UniVerse Dictionary question

The dots were just there to keep the numbered list going, The same I use dots 
in the Editor to enter blank lines. Later I go to the top and do R/.//50 to 
remove the dot.

-Original Message-
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Wjhonson
Sent: Tuesday, February 04, 2014 3:04 PM
To: u2-users@listserver.u2ug.org
Subject: Re: [U2] UniVerse Dictionary question


What are the periods in 3 and 4 for?
Did you try removing those?



-Original Message-
From: Woodward, Bob bob_woodw...@k2sports.com
To: U2 Users List u2-users@listserver.u2ug.org
Sent: Tue, Feb 4, 2014 11:49 am
Subject: Re: [U2] UniVerse Dictionary question


Just to make sure, you're wanting FIELD 178 and the first value of that field.  
Correct?  Because you have a length of 1, left justified I want to make sure 
you're not looking for the first character of the 178th field.
Maybe if you showed what you're wanting and what you're getting, instead, then 
we'd be sure to give you an answer that makes sense.

-Original Message-
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Bill Haskett
Sent: Tuesday, February 04, 2014 11:45 AM
To: U2 Users List
Subject: Re: [U2] UniVerse Dictionary queston

Martin:

This is the only way to do accomplish the defined task in UniData.
Maybe @RECORD178,1 is the preferred method in UV.

Bill
Untitled Page



- Original Message -
*From:* msch...@martinscholl.com
*To:* U2 Users List u2-users@listserver.u2ug.org
*Date:* 2/4/2014 11:33 AM
*Subject:* [U2] UniVerse Dictionary queston

UniVerse.

I want to create a dictionary item that extract value 178,1

I thought

1.   I
2.   EXTRACT(@RECORD,178,1,0)
3.   .
4.   .
5.   1L
6.   S


Would do but it does not give me the desired result. Any suggestions?



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


Re: [U2] How do you verify windows printer is good before fatal error by PRINTing to a bogus printer.

2014-01-30 Thread Charles Stevenson

Thanks, Brian.
I was heading that general direction with
   net view \\[printserver]
Then searching for the printer I'm looking for.

You're right about the drivers,  but I don't think I'll get a fatal 
error just because the printing is garbled or printer is offline, will I?


We've been getting a rash of errors in something that's been pretty 
stable for years, resulting in incomplete updates because the PRINT 
statements aborted were in the middle of the writes.




On 1/30/2014 4:23 PM, Brian Leach wrote:

Not quite so easy -

Remember that under Windows a printer is a combination of a driver and a
device.

If you link to a remote printer, it needs to install the driver locally on
your server so as to access the printer correctly .. that means either it
has to be a model that has previously been installed (say, if you have two
equivalent HP Lasers on different machines) or the client needs to have the
right drivers to publish back to you - which can give problems if they are
running different versions of Windows and e.g. 64 bit vs 32 bit and you
haven't loaded them all.

Also, BTW, being able to access the driver doesn't mean the printer is
working. Most drivers only check when they actually start printing. So any
'is this printer online or offline' messages only relate to the last thing
the driver knew about and not necessarily the current state.

That said, you can try the DOS NET commands. NET USE will show you what you
have visible already:

C:\Users\briannet use
New connections will be remembered.


Status   Local RemoteNetwork


---
Unavailable  LPT1: \\tiny\text1  Microsoft Windows Network
The command completed successfully.

Now this is NOT showing what is actually available.

C:\Users\brianNET USE \\tiny\HP Color LaserJet CP2020 Series PCL6
The command completed successfully.

Now it is there:

Status   Local RemoteNetwork


---
Unavailable  LPT1: \\tiny\text1  Microsoft Windows Network
OK \\tiny\HP Color LaserJet CP2020 Series PCL6
 Microsoft Windows Network
The command completed successfully.

Brian



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



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


Re: [U2] How do you verify windows printer is good before fatal error by PRINTing to a bogus printer.

2014-01-30 Thread Charles Stevenson
Thanks Anthony.  Yeah, it you can find the code w/o too much trouble,  
I'd be interested.


BTW,  it's impressive how little printing this company actually does.  
Remember that promise of a paperless society?   Maybe we're getting 
there.   Good.  I hate printers.  Always have.


Chuck


On 1/29/2014 10:43 PM, Anthonys Lists wrote:

On 28/01/2014 20:59, Charles Stevenson wrote:

Anthony pretty much nailed how we're doing it.

But my original question is still unanswered.
I want to make sure it's a valid printer before I start printing to it.
I think I problably need to do something like
EXECUTE DOS /C [some-command] \\MY_PRINT_SERVER\PrinterName 
CAPTURING DOSMSG

IF DOSMSG = [something bad] THEN  . . .

I was hoping someone in this august body had crossed that bridge before.


We never had that problem.

I had a PRINTER subroutine or suchlike that accessed a printers file 
with all the parameters. Any programatic (or user command line) 
attempt to access a printer was via my stuff, that checked this file, 
and set things up accordingly.


So as far as eg accounts was concerned, they had the ACCOUNTS printer. 
Whenever anything changed, I simply changed the ACCOUNTS entry in the 
parameter file. Very useful, because on the odd occasion when a 
printer went down I just made a temporary change to the file and 
everything got diverted :-)


If tyou're interested, let me know and I'll see if I can find the code 
- I know I had it but it's a long time ago ...


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



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


[U2] How do you verify windows printer is good before fatal error by PRINTing to a bogus printer.

2014-01-28 Thread Charles Stevenson

SETPTR 0,80,60,3,3,1,AT \\Bad\PrinterName
seems to execute w/o throwing an error.
but an actual PRINT statement yields a fatal error:

   Program PRT: Line 2, Printer name \\Bad\PrinterName is not 
recognized by the system.


I'd like to verify we're printing to a good printer *before* attempting 
to do so.

Execute some DOS command, maybe?

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


[U2] How do you verify windows printer is good before fatal error by PRINTing to a bogus printer.

2014-01-28 Thread Charles Stevenson

SETPTR 0,80,60,3,3,1,AT \\BAD\NAME
seems to execute w/o throwing an error.
but an actual PRINT statement yields a fatal error:

   Program PRT: Line 2, Printer name \\BAD\PRINTERNAME is not 
recognized by the system.


I'd like to verify we're printing to a good printer *before* attempting 
to do so.

Execute some DOS command, maybe?

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


Re: [U2] How do you verify windows printer is good before fatal error by PRINTing to a bogus printer.

2014-01-28 Thread Charles Stevenson

Anthony pretty much nailed how we're doing it.

But my original question is still unanswered.
I want to make sure it's a valid printer before I start printing to it.
I think I problably need to do something like
EXECUTE DOS /C [some-command] \\MY_PRINT_SERVER\PrinterName  
CAPTURING DOSMSG

IF DOSMSG = [something bad] THEN  . . .

I was hoping someone in this august body had crossed that bridge before.

cds


On 1/28/2014 11:31 PM, Jeff Schasny wrote:
I've been using Universe since it was in beta and I had no idea you 
could use a URI in SETPTR.


Its a good day, I've learned something new. Thanks!

Wols Lists wrote:

So if I am working on \\ASHDOWN (the name of my computer) I can use
SETPTR to point at \\TIGGER\HP - a printer logically connected to a
different computer that I've never told UV anything about.

Setptr is quite happy to be given a windows remote computer reference
and it works fine. That was how all our printers worked - they usually
had network cards in them, so when a new printer turned up, I would
assign it a name in DNS, and for anybody who was supposed to use it I
would just edit their login script to add eg

SETPTR ...,AT \\ACCOUNTS-HP\RAW

And it just worked. No UV printer setting up whatsoever. Okay, my setup
was a little bit cleverer than that, but everything, and I mean
EVERYTHING, was done in my programs. Nothing at the UV level whatsoever.

Cheers,
Wol
  Correct. Except he was *also* using the URI syntax, ie 
\\COMPUTER\QUEUE.

Wols Lists wrote:

On 28/01/14 15:07, Jeff Schasny wrote:


SPOOL -LIST will show you all the print queue names

Is that all the printer names known to U2, or all the printer names
known to the network?

In Chuck's example, this particular printer will never have been
declared to U2 - I did this all the time. The only printer UV was told
about was DEFAULT, which didn't exist ...

In fact, I suspect this syntax will list all the printers known to the
server on which U2 is running, which could easily NOT include a valid
printer the user is trying to print to ...

Cheers,
Wol


Charles Stevenson wrote:

SETPTR 0,80,60,3,3,1,AT \\BAD\NAME
seems to execute w/o throwing an error.
but an actual PRINT statement yields a fatal error:

   Program PRT: Line 2, Printer name \\BAD\PRINTERNAME is not
recognized by the system.

I'd like to verify we're printing to a good printer *before*
attempting to do so.
Execute some DOS command, maybe? 




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


Re: [U2] Logging program execution in Unidata?

2014-01-07 Thread Charles Stevenson

track OS's last access date on the object?
On 1/7/2014 3:08 AM, McGowan, Ian wrote:

We're looking into a major conversion late this year, which will involve 
checking out several thousand programs (mostly opens, reads or writes).  Some 
programs are run many times a day, whereas some were throwaway and haven't been 
touched in years.  It would be great to get some sense of which ones are active.

We unfortunately don't have a wrapper program, wondering if anyone has run into 
this before - is it possible to somehow log when a program is executed in 
Unidata?  Any magic triggers, directory flags or other audit flags that can get 
turned on?

Any ideas gratefully received,
Ian


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


Re: [U2] JET

2014-01-06 Thread Charles Stevenson

Jet as a subset of Rocket instead or Rocket as a subset of Jet.
It's a different universe.

On 1/6/2014 8:00 PM, Daniel McGrath wrote:

Have them contact their U2 support provider. Rocket has JET.

Cheers,

Dan McGrath
Managing Director, U2 Servers Lab
Rocket Software



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


Re: [U2] REVISE - how do tou delete a mv association

2013-12-30 Thread Charles Stevenson

Thanks, Derek!
I knew there was a #, or #n or ## involved.
I think I tried every combo but the right one in the right place.

Happy New Year,
Chuck


On 12/29/2013 7:08 AM, Derek wrote:

I believe you would select line 8 to display the one multivalued field and its 
associated values, then select line 2 (PTR.LINO) and replace the existing value 
with ## to delete the value and associated values.

HTH, Derek

On Dec 27, 2013, at 3:14 PM, Charles Stevenson stevenson.c...@gmail.com wrote:


Somebody help me, please.
I don't think I've used it since it was called  ENTRO on PI.
I can only see the command line syntax for revise.
I want to delete a set of values from several associated fields.


CONTROL -Screen 1-FIRST SCREEN Fri Dec 27 15:03:03 2013

1  CONTROLBC.PRINTER

S1 == FIRST SCREEN
S2 == PTR.LINO PTR.NAME PTR.OS

CHANGE= S2
--

CONTROL -Screen 2-PTR.LINO PTR.NAME PT Fri Dec 27 15:03:48 2013

CONTROL== BC.PRINTER
No. LINO PTR.NAME... PTR.OS
  11 ZEBRAANC\\prtsvr\ZEBRAANC
  22 ZEBRAATL\\prtsvr\ZEBRAATL
  33 ZEBRABOI\\prtsvr\ZEBRABOI
  44 ZEBRACLT\\prtsvr\ZEBRACLT
  55 ZEBRACVG\\prtsvr\ZEBRACVG
  66 ZEBRADEN\\prtsvr\ZEBRADEN
  77 ZEBRAEDC\\prtsvr\ZEBRAEDC
  88 ZEBRAICT\\prtsvr\ZEBRAICT  ---if I want to delete this...
  99 ZEBRAJAX\\prtsvr\ZEBRAJAX
10   10 ZEBRAMEM\\prtsvr\ZEBRAMEM
11   11 ZEBRAPDX1   \\prtsvr\ZEBRAPDX1

Change which line item=--- need cmd to delete value 8 from the assoc?



Or do I choose 8  and delete it from the next sub-screen?


CONTROL -Screen 2-PTR.LINO PTR.NAME PT Fri Dec 27 15:06:33 2013

CONTROL==BC.PRINTERLine== 8
2  PTR.LINO   8
3  PTR.NAME   ZEBRAICT
4  PTR.OS \\prtsvr\ZEBRAICT
CHANGE=  here 




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


Re: [U2] Regarding: LISTING SUB-VALUES

2013-12-27 Thread Charles Stevenson

Anthony meant:
002: CUSTOMER.PHONE.NUMBER1,3

On 12/27/2013 1:08 PM, Wols Lists wrote:

CUSTOMER.PHONE.NUMBER.3
0001: I
0002: CUSTOMER.PHONE.NUMBER3

1,3 extracts the 3rd value from that single attribute.
3 extracts the 3rd attribute, which in this case would yield null.
CUSTOMER.PHONE.NUMBER already extracted the 3rd attribute.
So it is an array 1 attribute long, but with multivalues.

On UD, I think  this is customary:
002: EXTRACT( CUSTOMER.PHONE.NUMBER,1,3 )

THE  ...  syntax is really an alternate syntax of the EXTRACT function.

On UV, after you write your I-descriptor  compile it,
DLIST CUSTOMER.FILE CUSTOMER.PHONE.3
will show you what it actually compiles to.
That can be illuminating.

I think this is beyond your immediate question but:
There are other fancier ways to get at multiple associated values 
aligned across several fields. Generally involves WHEN, BY.EXP, 
BY.EXP.DSND keywords.
You also need to make sure the I descriptors have an M in 6 and a 
common association name defined in 7.


Regards,
cds


On 12/27/2013 1:08 PM, Wols Lists wrote:

CUSTOMER.PHONE.NUMBER.3
0001: I
0002: CUSTOMER.PHONE.NUMBER3


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


[U2] REVISE - how do tou delete a mv association

2013-12-27 Thread Charles Stevenson

Somebody help me, please.
I don't think I've used it since it was called  ENTRO on PI.
I can only see the command line syntax for revise.
I want to delete a set of values from several associated fields.


CONTROL -Screen 1-FIRST SCREEN Fri Dec 27 15:03:03 2013

1  CONTROLBC.PRINTER

S1 == FIRST SCREEN
S2 == PTR.LINO PTR.NAME PTR.OS

CHANGE= S2
--

CONTROL -Screen 2-PTR.LINO PTR.NAME PT Fri Dec 27 15:03:48 2013

CONTROL== BC.PRINTER
No. LINO PTR.NAME... PTR.OS
  11 ZEBRAANC\\prtsvr\ZEBRAANC
  22 ZEBRAATL\\prtsvr\ZEBRAATL
  33 ZEBRABOI\\prtsvr\ZEBRABOI
  44 ZEBRACLT\\prtsvr\ZEBRACLT
  55 ZEBRACVG\\prtsvr\ZEBRACVG
  66 ZEBRADEN\\prtsvr\ZEBRADEN
  77 ZEBRAEDC\\prtsvr\ZEBRAEDC
  88 ZEBRAICT\\prtsvr\ZEBRAICT  ---if I want to delete this...
  99 ZEBRAJAX\\prtsvr\ZEBRAJAX
 10   10 ZEBRAMEM\\prtsvr\ZEBRAMEM
 11   11 ZEBRAPDX1   \\prtsvr\ZEBRAPDX1

Change which line item=--- need cmd to delete value 8 from the assoc?



Or do I choose 8  and delete it from the next sub-screen?


CONTROL -Screen 2-PTR.LINO PTR.NAME PT Fri Dec 27 15:06:33 2013

CONTROL==BC.PRINTERLine== 8
2  PTR.LINO   8
3  PTR.NAME   ZEBRAICT
4  PTR.OS \\prtsvr\ZEBRAICT
CHANGE=  here 

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


Re: [U2] BASIC code - upper, lower, CamelCase, what say you?

2013-12-20 Thread Charles Stevenson
If you use mixed case, what search tools  comparitors do you use when 
researching your program libraries?
Particularly if you have programs written in different styles over the 
years.

What formatting tools do you use?




On 12/20/2013 10:01 PM, Bobby Worley wrote:

First off - Merry Christmas and Happy New Year to all.

I'm starting to write a lot of new BASIC (Universe 11.1) subroutines for
our DesignBais application, and since I'll be starting with a blank code
template instead of modifying existing code, and I thought 'hey why not
join the 21st century' and make the code look more mainstream, and
readable.  (falling back on our last TEXMUG presentation by Clif Oliver on
refactoring).

And considering Universe 11.2 now supports local subroutines and functions,
I should make the code look and behave more object-like.

Does anyone know of a set of rules or guidelines on how to do this?Just
experimenting briefly, Universe BASIC compiler will allow any mix of cases
for keywords, but variables are case sensitive.  Example:


ED BP TEST

ABC=1
Abc=2
abc=3
PRINT ABC
Print Abc
pRiNt abc
stop
end


RUN TEST

1
2
3

So, how are developers mixed case in their code these day? Do keywords,
local variables, common variable, equates follow a standard method?

thanks in advance,


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


Re: [U2] UniVerse Training

2013-10-25 Thread Charles Stevenson

Perry,  you could just teach it instead.

Actually, there's some significant changes in user management at 11.1.
It looks like the Unidata-based Data Replication is pretty tightly 
integrated.

There are some new logs, but that's pretty straightforward.
I think I took an internals class back at maybe 9.6 or so.  I'd like to 
to take it again.


Chuck

On 10/25/2013 8:25 PM, Perry Taylor wrote:

I've signed up for it a couple of times in the past only to have it cancelled 
due to lack of participation :(

-Original Message-
From: u2-users-boun...@listserver.u2ug.org 
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Ladd, Ryan
Sent: Friday, October 25, 2013 8:53 AM
To: U2-Users@listserver.u2ug.org
Subject: Re: [U2] UniVerse Training

I believe the internals class you are referring to is now called UV910 - Universe 
theory and practice.  I've included a link, but it doesn't look like they are offering it 
anytime soon.

http://www.rocketsoftware.com/u2-training-uv910-universe-theory-and-practice

Ryan


-Original Message-
From: u2-users-boun...@listserver.u2ug.org 
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Mike Pflugfelder
Sent: Friday, October 25, 2013 8:25 AM
To: U2-Users@listserver.u2ug.org
Subject: [U2] UniVerse Training

Does anyone know if the UniVerse internals class is being offered anymore?  It 
something that I've always wanted to attend, but I was never able to get approved.  I 
think I can get it approved now, but it seems like the course isn't being taught 
anymore.  If it's not available, is there any option to get the course materials?  
I've tried reaching out to 
u2train...@rocketsoftware.commailto:u2train...@rocketsoftware.com and haven't 
gotten any response.

On a somewhat similar topic, does anyone know anything about U2 UniVersity?  
The information on their web page (http://www.rocketsoftware.com/u2-university) 
is a little out of date, mentioning University 2012.  Nothing about 2013 or 
2014.

Thanks!
-Mike




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


Re: [U2] [OT] Interview Questions

2013-10-08 Thread Charles Stevenson

Some of these responses have been really good.  Thanks, all.
Does anyone see any value in U2 Certification from Rocket?
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


Re: [U2] Dick Pick

2013-09-26 Thread Charles Stevenson

Now I want to see page 146.

On 9/26/2013 5:16 PM, Brian Leach wrote:

This photo of Dick Pick was doing the rounds at a client this week - from
Jonathan Sisk's site:

http://jes.com/gfx/people/csn_1983_11_28_antigrav_dick_001.jpg

  


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


Re: [U2] Recommended 11.1.point release to upgrade to.

2013-09-25 Thread Charles Stevenson

Remember GTAR?
Back in olden days Camelot, I mean Prime, was kind enough to tell us 
what the outstanding issues were.

Not just tell us what the issue was after it was fixed.
Gosh, that would be nice.
cds

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


Re: [U2] Recommended 11.1.point release to upgrade to.

2013-09-25 Thread Charles Stevenson

Thank-you, Ryan.

We don't use triggers.  Mostly because it makes RAID difficult. And it 
used to be a serious performance hit I don't know how true that is today.


I am looking forward to using the new @IDX.IOTYPE because we do have a 
couple pseudo-trigger index using an I-descriptor subroutine to update a 
file.
There is an issue or 2 in the release notes about indexed subroutines 
that do updates.


   11.1.0UNV-4025
   Prior to this release, updates performed within a UniVerse BASIC
   subroutine called through an indexed I-type may have failed when the
   index update was being done within a transaction. For example, if
   the file containing the indexed I-type was updated within a BEGIN
   TRANSACTION/END TRANSACTION block in a UniVerse BASIC program, any
   updates done in the indexed subroutine could fail.

I haven't seen that corruption.  I don't know when it was introduced.  
They don't tell us that.


cds

On 9/25/2013 9:01 PM, Ladd, Ryan wrote:

Chuck,
   Two other new parameters that may require changing are SHM_GNTBLS and SHM_GNPAGES.  The What you 
need to know for Eleven-One document mentions these, but in the segment that called Shared Memory 
Parameters that should not require changing.  The key word in that statement is should.  
When we upgraded on AIX to 11.1.4 from 10.3.9 the defaults were used and we ran out of GCT entries fairly 
early in the day.

   I would also say that if you use dynamic files with i-type indices as well 
as triggers, pay close attention to the patches.  You may need to modify your 
TXMEM parameter to avoid write errors for larger records.

   I remember change to the FMT statement.  I believe the fix was the addition of the 
FMT_TEXTMARK configurable.  We were lucky with that one and noticed the issue before 
upgrading our production environment.

Ryan



-Original Message-
From: u2-users-boun...@listserver.u2ug.org 
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Rick Nuckolls
Sent: Tuesday, September 24, 2013 6:16 PM
To: 'U2 Users List'
Subject: Re: [U2] Recommended 11.1.point release to upgrade to.

Chuck,

I agree that they took a simple (but fine) route on the local scoping.  What is funny is 
that the interpretation of it seems to be that it allows the overriding of the production 
version of subroutines rather than simply creation of a safe version of 
gosub.  It should work for both; I just never pictured it that way.

Be sure to read the install notes on 11, in particular, the NUSERS config item is 
new  important.  Fixtool finally seems to work well.  I know that a lot of work has gone 
into that over the previous couple of years.

Rick

-Original Message-
From: u2-users-boun...@listserver.u2ug.org 
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Charles Stevenson
Sent: Tuesday, September 24, 2013 3:53 PM
To: U2 Users List
Subject: Re: [U2] Recommended 11.1.point release to upgrade to.

Thanks, Rick.

They're finally getting in your desired variable scoping into 11.2,
too.  From what I read, I like how they did it.

My prejudice against being an early adopter of major releases kicks in 
makes me not want 11.2.0.   11.2.4 maybe.  Also, if I wait until
November, my window closes.

The vast majority of the issues listed in the 11.1 release notes have to
do with stuff we don't use at all (DR, DARE, MQ, etc), or use so
minimally that complete regression testing is easy (XML, callHTTP, etc.)

There were several issues having to do with indexing.   I think if I
validate the indexes after regression tests, that should suffice.

Issues that involve locking are trickier.  It will require load testing
and lock contention.
I am not looking forward to that.

The only time in my whole career that I recall having any problem with
backward compatibility after a UV upgrade is also the only time I've
seen a day's worth of work for an entire company abandoned and the
previous night's backups restored.  There was an undocumented change to
FMT  was made that ended up truncating out data, if I recall.   It's in
the U2-list archives.  Some of the same people who suffered through that
are with me now.

cds

On 9/25/2013 12:53 AM, Rick Nuckolls wrote:

Chuck,

We currently have one machine running 11.1.12 with no real problems.  11.1.13 
is basically a one, only-on-severe-load, bug fix, and even then, unlikely.

There is at least one thing that I am expecting in 11.2 that is worth waiting 
for, assuming it shows up.  I did not see it in the public beta. I think that 
11.2 is supposed to be out around Nov 1.

-Rick

-Original Message-
From: u2-users-boun...@listserver.u2ug.org 
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Charles Stevenson
Sent: Tuesday, September 24, 2013 2:28 PM
To: U2 Users List
Subject: [U2] Recommended 11.1.point release to upgrade to.

We're finally going to upgrade from 10.2.10 to 11.1.[something].

But which point release?

We're on Win2003.  (Linux next year.  Baby steps.)

Release

[U2] Recommended 11.1.point release to upgrade to.

2013-09-24 Thread Charles Stevenson

We're finally going to upgrade from 10.2.10 to 11.1.[something].

But which point release?

We're on Win2003.  (Linux next year.  Baby steps.)

ReleaseDate   Issues
11.1.13   Sept 2013 3 brand new.
11.1.12   June 201338  rescinded
11.1.11   Mar 201330 Metadata Manager  introduced.
11.1.10   Dec 2012 66
11.1.9 May2012 75
11.1.8 ?  2
11.1.7Dec 2011 3
11.1.6?   4
11.1.5Nov 2011  42
11.1.4Aug 2011  17
11.1.3Jun 2011   17
11.1.2May 2011 29
11.1.1Feb  2011  45
11.1.0? 23

I generally tend to not be an early adopter when the major release first 
comes out unless it has a new functionality that I have a strong 
business need for.
The later point releases tend to be bug fixes, so I am more prone to get 
them sooner rather than wait.


In this case though, we have new functionality, Metadata Manager, 
introduced at 11.1.11.

Are many users on 11.1.11?  Happy?

If i understand correctly, 11.1.12 was pulled off the market because of 
a bug that was fixed in 11.1.13, which just came out.  So not much  
experience in the wild with these 2.


Which one  did / would  you choose to upgrade to 11.1?


TIA
Chuck Stevenson

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


Re: [U2] Recommended 11.1.point release to upgrade to.

2013-09-24 Thread Charles Stevenson

Thanks, Rick.

They're finally getting in your desired variable scoping into 11.2,  
too.  From what I read, I like how they did it.


My prejudice against being an early adopter of major releases kicks in  
makes me not want 11.2.0.   11.2.4 maybe.  Also, if I wait until 
November, my window closes.


The vast majority of the issues listed in the 11.1 release notes have to 
do with stuff we don't use at all (DR, DARE, MQ, etc), or use so 
minimally that complete regression testing is easy (XML, callHTTP, etc.)


There were several issues having to do with indexing.   I think if I 
validate the indexes after regression tests, that should suffice.


Issues that involve locking are trickier.  It will require load testing 
and lock contention.

I am not looking forward to that.

The only time in my whole career that I recall having any problem with 
backward compatibility after a UV upgrade is also the only time I've 
seen a day's worth of work for an entire company abandoned and the 
previous night's backups restored.  There was an undocumented change to 
FMT  was made that ended up truncating out data, if I recall.   It's in 
the U2-list archives.  Some of the same people who suffered through that 
are with me now.


cds

On 9/25/2013 12:53 AM, Rick Nuckolls wrote:

Chuck,

We currently have one machine running 11.1.12 with no real problems.  11.1.13 
is basically a one, only-on-severe-load, bug fix, and even then, unlikely.

There is at least one thing that I am expecting in 11.2 that is worth waiting 
for, assuming it shows up.  I did not see it in the public beta. I think that 
11.2 is supposed to be out around Nov 1.

-Rick

-Original Message-
From: u2-users-boun...@listserver.u2ug.org 
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Charles Stevenson
Sent: Tuesday, September 24, 2013 2:28 PM
To: U2 Users List
Subject: [U2] Recommended 11.1.point release to upgrade to.

We're finally going to upgrade from 10.2.10 to 11.1.[something].

But which point release?

We're on Win2003.  (Linux next year.  Baby steps.)

ReleaseDate   Issues
11.1.13   Sept 2013 3 brand new.
11.1.12   June 201338  rescinded
11.1.11   Mar 201330 Metadata Manager  introduced.
11.1.10   Dec 2012 66
11.1.9 May2012 75
11.1.8 ?  2
11.1.7Dec 2011 3
11.1.6?   4
11.1.5Nov 2011  42
11.1.4Aug 2011  17
11.1.3Jun 2011   17
11.1.2May 2011 29
11.1.1Feb  2011  45
11.1.0? 23

I generally tend to not be an early adopter when the major release first
comes out unless it has a new functionality that I have a strong
business need for.
The later point releases tend to be bug fixes, so I am more prone to get
them sooner rather than wait.

In this case though, we have new functionality, Metadata Manager,
introduced at 11.1.11.
Are many users on 11.1.11?  Happy?

If i understand correctly, 11.1.12 was pulled off the market because of
a bug that was fixed in 11.1.13, which just came out.  So not much
experience in the wild with these 2.

Which one  did / would  you choose to upgrade to 11.1?


TIA
Chuck Stevenson

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



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


Re: [U2] universe 11.1 triggers via indexing and @IDX.IOTYPE sample

2013-08-28 Thread Charles Stevenson

Thanks, Troy.
I was going to write that after I got to 11.1.
(The upgrade was scheduled for Q3, but I hear rumours it got bumped 
because salesmen just sold something we can't do - yet.  It pays the bills.)


Troy, I want to borrow your code,  but I want to include proper 
attribution in the program header.


Chuck

On 8/27/2013 7:02 PM, Buss, Troy (Contractor, Logitek Systems) wrote:

Regarding the recent discussion of using indexes as triggers, I use the 
following to update timestamps of record changes to a master item stats file 
that we use for controlling updates to a business warehouse (BW).   Without 
modifying hundreds of legacy programs to support proper timestamps in the 
primary records, I added the following indexed Idescriptors to files I need to 
track.   We are on universe 11.1.1 and this has been working well for over a 
year.

DICT AR-INVOICE INDEX..MODIFIEDZ
0001 I
0002 SUBR(ZIDESC.ITEMSTATS.UPDATE, AR-INVOICE!:F0,)
0004 \
0005 1L
0006 S
0049 used to create item created, modified, delete in zitemstats file - create 
index with this and no.nulls keyword
EOI 216 bytes

In this example, we have a AR-INVOICE header record and a related ARLI line item file.   
For our purposes to keep in sync with the BW, we want to timestamp the corresponding 
header record whenever a line item is updated so the ARLI dict item also updates 
AR-INVOICE header ZITEMSTATS with an I indirect update flag.

DICT ARLI INDEX..MODIFIEDZ
0001 I
0002 SUBR(ZIDESC.ITEMSTATS.UPDATE, ARLI!:F0,):SUBR(ZIDESC.ITEMSTATS.UPDATE, 
AR-INVOICE!:F1,I)
0004 \
0005 1L
0006 S
0049 used to create item created, modified, delete in zitemstats file - create 
index with this and no.nulls keyword
EOI 264 bytes

Alternate Key Index Summary for file ARLI
File... ARLI
Indices 3 (0 A-type, 0 C-type, 0 D-type, 3 I-type, 0 SQL, 0 S-type)
Index Updates.. Enabled, No updates pending

Index name  Type  BuildNulls  In DICT  S/M  Just Unique Field num/I-type
INDEX..MODIFIEDZ INot Reqd  No Yes  SL NSUBR(ZIDESC.ITE
 MSTATS.UPDATE,
 
ARLI!:F0,):S
 
UBR(ZIDESC.ITEM
 STATS.UPDATE, 

 
AR-INVOICE!:F1,
 I)


Subroutine ZIDESC.ITEMSTATS.UPDATE:

0001 SUB (RETURN.VALUE, ZITEMSTATS.ID, OPTIONS)
0002 * updates zitemstats with timestamps; create, modified, deleted
0003 *
0004 * Revision history:
0005 *
0006 * tdb.1190 2012-04-22_1602 new
0007 *
0008 *
0009 * input:  ZITEMSTATS.ID item id to use for ZITEMSTATS file
0010 * OPTIONS
0011 *I  update attb 5 with I for indirect 
reference
0012 *
0013 * output: RETURN.VALUE  NULL
0014 *
0015 * common vars: /ZITEMSTATS/
0016 *
0017 * called by:  INDEX..MODIFIEDZ dictionary items
0018 * calls:
0019 *
0020 * notes:
0021 *
0022 *
0023 $OPTIONS TIME.MILLISECOND
0024 *
0025 * @idx.iotype = 0 - Not being used from an index;
0026 * 1 - INSERT (new) record;
0027 * 2 - DELETE record;
0028 * 3 - Derive old index value;
0029 * 4 - Derive new index value;
0030 *
0031 COMMON /ZITEMSTATS/ F.ZITEMSTATS, ZITEMSTATS.FLAG.OPEN, ZITEMSTATS.WHO
0032 *
0033 EQU NUL TO 
0034 *
0035 RETURN.VALUE = NUL
0036 *
0037 * the following handles initial call and logto commands
0038 *
0039 IF NOT(ZITEMSTATS.FLAG.OPEN) OR (@WHO # ZITEMSTATS.WHO) THEN
0040   OPEN ZITEMSTATS TO F.ZITEMSTATS ELSE
0041 RETURN ;*  to caller.
0042   END
0043 *
0044   ZITEMSTATS.FLAG.OPEN = 1
0045   ZITEMSTATS.WHO   = @WHO
0046 END
0047 *
0048 LOG.TYPE = NUL
0049 *
0050 BEGIN CASE
0051   CASE @IDX.IOTYPE = 0
0052 *
0053   CASE @IDX.IOTYPE = 1
0054 LOG.TYPE = C ;* new - created - easier to see than 'N' new
0055 *
0056   CASE @IDX.IOTYPE = 2
0057 LOG.TYPE = D ;* delete
0058 *
0059   CASE @IDX.IOTYPE = 3
0060 *
0061   CASE @IDX.IOTYPE = 4
0062 LOG.TYPE = M ;* modified
0063 *
0064 END CASE
0065 *
0066 IF LOG.TYPE # NUL THEN
0067 *
0068   DATE.NOW = DATE()
0069   TIME.NOW = TIME()
0070 *
0071 * handle instance of midnight between date/time functions
0072 *
0073   IF DATE.NOW # DATE() AND TIME()  TIME.NOW THEN DATE.NOW = DATE()
0074 *
0075   TIMESTAMP = DATE.NOW * 86400 + TIME.NOW
0076 *
0077   READU ZITEMSTATS$ FROM F.ZITEMSTATS, ZITEMSTATS.ID ELSE ZITEMSTATS$ = NUL
0078 *
0079   INDIRECT.FLAG = COUNT(OPTIONS, I)
0080 *
0081   IF INDIRECT.FLAG THEN
0082 ZITEMSTATS$1 = M ;* modified
0083   END ELSE
0084 ZITEMSTATS$1 = LOG.TYPE
0085   END
0086 *
0087 * created
0088 *
0089   IF INDIRECT.FLAG ELSE
0090 IF LOG.TYPE = C THEN
0091   ZITEMSTATS$2 = TIMESTAMP
0092 END
0093   END
0094 *
0095 * modified
0096 *
0097   ZITEMSTATS$3 = TIMESTAMP
0098 *
0099 * deleted
0100 *
0101 

Re: [U2] Select from one file with save-list from another file

2013-08-28 Thread Charles Stevenson

I'm with Ian.
Maybe Ian and I don't understand the question.   The other answers seem 
so complicated.


Brandon, Replace Ian's example Y.PACKET.ID with whatever is thereal 
name in DICT X.INFO  pointing to  what you describa ase Y.INFO's key 
exists as a foreign key somewhere in X.INFO.


Give Ian's code a try and see if it gives you what you want.
You don't even need to do the SAVE.LIST  GET.LIST.  That's just so you 
can have the list for later use or examination.


Chuck


On 8/28/2013 1:32 AM, McGowan, Ian wrote:

At least on Unidata you can put the foreign key in the select statement, and 
that's the id that will be used:

#SELECT X WITH STATUS = ccc Y.PACKET.ID
#SAVE.LIST L1
#GET.LIST L1
#LIST Y

If you put two atb names in the select, they are interleaved in the resulting 
saved list, which can be a quick way to export some data...

-Original Message-
From: u2-users-boun...@listserver.u2ug.org 
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Hilk, Brandon
Sent: Tuesday, August 27, 2013 1:24 PM
To: u2-users@listserver.u2ug.org
Subject: [U2] Select from one file with save-list from another file

Hello!

  


UniVerse 10.1, HP/UX, Pick.

  


Is there a way I can build a save-list from a selection from one file X.INFO (where the 
record ID is an 8 digit number) and use that list to select from file Y.INFO (where that 
8 digit number is not the record ID but does exist as a foreign key elsewhere 
in the file). In SQL this would be considered a join and would look something like this:

  


select *

from X.INFO, Y.INFO

where X.INFO.packet.id=Y.INFO.packet.id

and X.INFO.status='ccc';

  


I can run this in TCL and have it return the results I want but can't build a 
save-list from it because I don't know the UniVerse/SQL syntax to do so.

  


So to summarize, is there a way to use a save-list built from X.INFO to make 
another save-list comprised of the record ID's from Y.INFO?

  


Thanks for any advice you can give.

  


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


Re: [U2] Select from one file with save-list from another file

2013-08-28 Thread Charles Stevenson
P.S.   If there is a many::1 relationship between X.FILE  Y.FILE,  
i.e., if more than 1 X.FILE record can have the same Y.INFO foreign key 
in it,

do this:

SELECT X.FILE WITH STATUS = cc  SAVING UNIQUE Y.PACKET.ID
LIST Y.FILE



On 8/28/2013 9:56 AM, Charles Stevenson wrote:

I'm with Ian.
Maybe Ian and I don't understand the question.   The other answers 
seem so complicated.


Brandon, Replace Ian's example Y.PACKET.ID with whatever is thereal 
name in DICT X.INFO  pointing to  what you describa ase Y.INFO's key 
exists as a foreign key somewhere in X.INFO.


Give Ian's code a try and see if it gives you what you want.
You don't even need to do the SAVE.LIST  GET.LIST.  That's just so 
you can have the list for later use or examination.


Chuck


On 8/28/2013 1:32 AM, McGowan, Ian wrote:
At least on Unidata you can put the foreign key in the select 
statement, and that's the id that will be used:


#SELECT X WITH STATUS = ccc Y.PACKET.ID
#SAVE.LIST L1
#GET.LIST L1
#LIST Y

If you put two atb names in the select, they are interleaved in the 
resulting saved list, which can be a quick way to export some data...


-Original Message-
From: u2-users-boun...@listserver.u2ug.org 
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Hilk, Brandon

Sent: Tuesday, August 27, 2013 1:24 PM
To: u2-users@listserver.u2ug.org
Subject: [U2] Select from one file with save-list from another file

Hello!


UniVerse 10.1, HP/UX, Pick.


Is there a way I can build a save-list from a selection from one file 
X.INFO (where the record ID is an 8 digit number) and use that list 
to select from file Y.INFO (where that 8 digit number is not the 
record ID but does exist as a foreign key elsewhere in the file). 
In SQL this would be considered a join and would look something like 
this:



select *

from X.INFO, Y.INFO

where X.INFO.packet.id=Y.INFO.packet.id

and X.INFO.status='ccc';


I can run this in TCL and have it return the results I want but can't 
build a save-list from it because I don't know the UniVerse/SQL 
syntax to do so.



So to summarize, is there a way to use a save-list built from X.INFO 
to make another save-list comprised of the record ID's from Y.INFO?



Thanks for any advice you can give.





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


Re: [U2] [UV] Globally catalogs - source code

2013-08-23 Thread Charles Stevenson

Hello LeRoy,

Haven't seen you on u2-list for a while.
Are you still in South Africa?
I'm just up the road a piece (well, 3000 km, not necessarily paved) from 
you  in Dar es Salaam as of last month.


Chuck Stevenson


On 8/21/2013 5:43 AM, LeRoy Dreyfuss wrote:

Many are in APP.PROGS in the UV account.

Regards,

LeRoy
Sent from my iPhone 4




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


Re: [U2] [UV] Do you avoid TRIGGERS because of the difficulty using DEBUG or RAID with them? Was: Universe Triggers

2013-08-06 Thread Charles Stevenson

@IDX.IOTYPE
Thanks to a fellow u2-list member who mailed me privately.
I think David Hona was maybe thinking of that,  but it's available at 
11.1, not 10.1.


Chuck

On 8/5/2013 6:23 PM, Perry Taylor wrote:

Rocket added an @variable (don't recall the name of it) that tells which call 
is being made.

Perry

-Original Message-
From: u2-users-boun...@listserver.u2ug.org 
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Charles Stevenson
Sent: Saturday, August 03, 2013 9:40 AM
To: U2 Users List
Subject: Re: [U2] [UV] Do you avoid TRIGGERS because of the difficulty using 
DEBUG or RAID with them? Was: Universe Triggers

David,

I didn't understand your 1st clause, Now that (from UV10.1) Index-based
triggers are officially supported,

By index-based triggers,  I assume you mean the trick of indexing an
I-descriptor that calls a subroutine that updates some other file, which
is generally not the sort of thing you expect such a subroutine to do.

What is this official support?  Did I miss an announcement, a change
in the documentation, or a whitepaper?

And  by support  -  just to get my hopes up beyond all reason - does
that mean they've introduced some mechanism (@variable?) to help
distinguish among calls of the subroutine for insert (where indexing
calls the subroutine once, to find the new value to index) delete (where
indexing calls the subroutine 1x, to find the value to delete), and
change (where indexing calls the subroutine 2x, once with the old
version of the record, once with the new, to see whether the indexed
value has changed and, if so,  what to delete, what to add.
Distinguishing these has always been tricky for the general case.

Hope springs eternal,
Chuck

On 8/1/2013 12:32 PM, Hona, David wrote:

Now that (from UV10.1) Index-based triggers are officially supported, can these 
replace your SQL-based triggers? These have less functionality and less 
overhead, but that's the price you have to pay

Can't say I had a chance to try it for myself...yet...!



-Original Message-
From: u2-users-boun...@listserver.u2ug.org 
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Charles Stevenson
Sent: Saturday, 27 July 2013 5:32 AM
To: U2 Users List
Subject: [U2] [UV] Do you avoid TRIGGERS because of the difficulty using DEBUG 
or RAID with them? Was: Universe Triggers

How many people avoid using triggers BECAUSE of the virtual impossibility of 
using RAID with Triggers?

On 7/26/2013 12:33 PM, Phil Walker wrote:

I won't be holding my breath Charles ;-)

-Original Message-
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Charles
Stevenson
Sent: Friday, 26 July 2013 9:22 p.m.
To: U2 Users List
Subject: Re: [U2] Universe Triggers

re. triggers  Raid,  I could not agree with Phil more.  Well said.
Come on, Rocket!

On 7/19/2013 1:32 AM, Phil Walker wrote:

Ken,

I am glad you raised the issue about debugging a program with a file which has 
a trigger attached. I have been on to UV (Vmark/Ardent/IBM/Rocket for ages 
about fixing this pushing for the ability to be able to step into the trigger 
code, but at a VERY MINIMUM being able to debug the program and perform the 
write on the file, and in effect step over the trigger subroutine and carry on 
debugging. The issue is the trigger subroutine cannot support input, so what UV 
have done is basically say you are using the debugger so you are inputting 
debug commands so you will abort. They need to turn this restriction off for 
debugging so that either of the above two scenarios is supported.

In a Microsoft world I can debug anything through the connected world of 
web/databases etc..

Have had no feedback from UV

-Original Message-
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Ken Ford
Sent: Friday, 19 July 2013 9:48 a.m.
To: u2-users@listserver.u2ug.org
Subject: Re: [U2] Universe Triggers

Dan,
In addition to the other responses you have received, I suggest the following:
1. Have one master file trigger subroutine (globally catalogued) that calls 
subroutines (locally catalogued) tailored to individual files.  This means you 
don't have to stop and restart Universe when a new trigger is required or a 
change to an existing one.  If the master subroutine changes, you do have to 
restart Universe.
2. Use a control record that records the subroutine name and state of the 
trigger for each file having a trigger.
3. Use a program to change the state of a trigger, using the control records in 
2 above.
4. Make sure all background processes that have a file with a trigger open are 
logged out when recompiling the subroutine for that file trigger.
5. Remember that you can't do anything to a file with an active trigger whilst 
in the RAID debugger (it will crash).  Rather, if you are testing a file 
trigger subroutine, drop the trigger and use a trigger testing program that 
calls

Re: [U2] [UV] Do you avoid TRIGGERS because of the difficulty using DEBUG or RAID with them? Was: Universe Triggers

2013-08-03 Thread Charles Stevenson

David,

I didn't understand your 1st clause, Now that (from UV10.1) Index-based 
triggers are officially supported,


By index-based triggers,  I assume you mean the trick of indexing an 
I-descriptor that calls a subroutine that updates some other file, which 
is generally not the sort of thing you expect such a subroutine to do.


What is this official support?  Did I miss an announcement, a change 
in the documentation, or a whitepaper?


And  by support  -  just to get my hopes up beyond all reason - does 
that mean they've introduced some mechanism (@variable?) to help 
distinguish among calls of the subroutine for insert (where indexing 
calls the subroutine once, to find the new value to index) delete (where 
indexing calls the subroutine 1x, to find the value to delete), and 
change (where indexing calls the subroutine 2x, once with the old 
version of the record, once with the new, to see whether the indexed 
value has changed and, if so,  what to delete, what to add.
Distinguishing these has always been tricky for the general case.


Hope springs eternal,
Chuck

On 8/1/2013 12:32 PM, Hona, David wrote:

Now that (from UV10.1) Index-based triggers are officially supported, can these 
replace your SQL-based triggers? These have less functionality and less 
overhead, but that's the price you have to pay

Can't say I had a chance to try it for myself...yet...!



-Original Message-
From: u2-users-boun...@listserver.u2ug.org 
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Charles Stevenson
Sent: Saturday, 27 July 2013 5:32 AM
To: U2 Users List
Subject: [U2] [UV] Do you avoid TRIGGERS because of the difficulty using DEBUG 
or RAID with them? Was: Universe Triggers

How many people avoid using triggers BECAUSE of the virtual impossibility of 
using RAID with Triggers?

On 7/26/2013 12:33 PM, Phil Walker wrote:

I won't be holding my breath Charles ;-)

-Original Message-
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Charles
Stevenson
Sent: Friday, 26 July 2013 9:22 p.m.
To: U2 Users List
Subject: Re: [U2] Universe Triggers

re. triggers  Raid,  I could not agree with Phil more.  Well said.
Come on, Rocket!

On 7/19/2013 1:32 AM, Phil Walker wrote:

Ken,

I am glad you raised the issue about debugging a program with a file which has 
a trigger attached. I have been on to UV (Vmark/Ardent/IBM/Rocket for ages 
about fixing this pushing for the ability to be able to step into the trigger 
code, but at a VERY MINIMUM being able to debug the program and perform the 
write on the file, and in effect step over the trigger subroutine and carry on 
debugging. The issue is the trigger subroutine cannot support input, so what UV 
have done is basically say you are using the debugger so you are inputting 
debug commands so you will abort. They need to turn this restriction off for 
debugging so that either of the above two scenarios is supported.

In a Microsoft world I can debug anything through the connected world of 
web/databases etc..

Have had no feedback from UV

-Original Message-
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Ken Ford
Sent: Friday, 19 July 2013 9:48 a.m.
To: u2-users@listserver.u2ug.org
Subject: Re: [U2] Universe Triggers

Dan,
In addition to the other responses you have received, I suggest the following:
1. Have one master file trigger subroutine (globally catalogued) that calls 
subroutines (locally catalogued) tailored to individual files.  This means you 
don't have to stop and restart Universe when a new trigger is required or a 
change to an existing one.  If the master subroutine changes, you do have to 
restart Universe.
2. Use a control record that records the subroutine name and state of the 
trigger for each file having a trigger.
3. Use a program to change the state of a trigger, using the control records in 
2 above.
4. Make sure all background processes that have a file with a trigger open are 
logged out when recompiling the subroutine for that file trigger.
5. Remember that you can't do anything to a file with an active trigger whilst 
in the RAID debugger (it will crash).  Rather, if you are testing a file 
trigger subroutine, drop the trigger and use a trigger testing program that 
calls the subroutine after taking a copy of the record being changed, pausing 
whilst you change it in another session, and then resuming, calling the 
subroutine.

If you would like samples of any of the software mentioned above, let me know, 
and I can send them to you.

Regards,
Ken Ford
Universe Software Developer
t 07 3013 8605 | f 07 3002 8400
e ken.f...@firstmac.com.au | w firstmac.com.au




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


[U2] Fwd: Re: What is true

2013-08-02 Thread Charles Stevenson

On UV, if you want to see if parentheses make a difference,
write similar lines with  without, compile,  VLIST to decomiple the 
object to a readable form.


It reads like assembler, but you have the source line with it so it's 
really really easy to figure out what it's doing.



Building on Tom  Tony's examples:

CT CDS.BP PAREN.TEST

 PAREN.TEST
0001IF (A) THEN CRT 'TRUE' ELSE CRT 'FALSE' ;* Test 1
0002IF  A  THEN CRT 'TRUE' ELSE CRT 'FALSE'
0003
0004CALL FOO( X, Y,  Z  )   ;* Test 2
0005CALL FOO( X, Y, (Z) )
0006CRT Z
0007
0008X = Y = 3   ;* Test 3
0009 END


VLIST CDS.BP PAREN.TEST


1:IF (A) THEN CRT 'TRUE' ELSE CRT 'FALSE' ;* Test 1
1 0 : 2DE testfw A 00014:
1 8 : 046 crtcrlfTRUE
1 E : 0C2 jump   0001A:
1 00014 : 046 crtcrlfFALSE

2:IF  A  THEN CRT 'TRUE' ELSE CRT 'FALSE'
2 0001A : 2DE testfw A 00030:
2 00024 : 046 crtcrlfTRUE
2 0002A : 0C2 jump   00036:
2 00030 : 046 crtcrlfFALSE

3:

4:CALL FOO( X, Y,  Z  )   ;* Test 2
4 00036 : 01E call   FOO X Y Z

5:CALL FOO( X, Y, (Z) )
5 00042 : 0F8 move   Z  = _T
5 00048 : 01E call   FOO X Y _T

6:CRT Z
6 00054 : 046 crtcrlfZ

7:

8:X = Y = 3   ;* Test 3
8 0005A : 06E eq Y 3  = X

9: END
9 00062 : 190 stop


Test 1:Lines 1  2 compile exactly the same.  parens didn't matter.

Test 2:
It doesn't take a genius to see that _T is some sort of temporary 
variable that the compiler created.



Enclosing in parentheses is a way to pass by value instead of by address.
Z will remain unchanged by CALL FOO(X,Y,(Z)), since _T is what's 
really passed back  forth, then ignored upon return.





 Original Message 
Subject:Re: [U2] What is true
Date:   Thu, 1 Aug 2013 10:51:49 -0400
From:   Tom Whitmore tewhitm...@ratex.com
Reply-To:   U2 Users List u2-users@listserver.u2ug.org
To: U2 Users List u2-users@listserver.u2ug.org



Here is a simple program I wrote and ran on UV 11.1.9.  It would be interesting 
to hear if UD behaves the same way.

0001: A=''
0002: CRT 'A = ':QUOTE(A):' ':
0003: IF (A) THEN CRT 'TRUE' ELSE CRT 'FALSE'
0004: A=0
0005: CRT 'A = ':QUOTE(A):' ':
0006: IF (A) THEN CRT 'TRUE' ELSE CRT 'FALSE'
0007: A='HELLO'
0008: CRT 'A = ':QUOTE(A):' ':
0009: IF (A) THEN CRT 'TRUE' ELSE CRT 'FALSE'
0010: A=1
0011: CRT 'A = ':QUOTE(A):' ':
0012: IF (A) THEN CRT 'TRUE' ELSE CRT 'FALSE'

The results are:
 A =  FALSE
 A = 0 FALSE
 A = HELLO TRUE
 A = 1 TRUE

Tom Whitmore
RATEX Business Solutions


-Original Message-
From: u2-users-boun...@listserver.u2ug.org 
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Jim Swain
Sent: Thursday, August 01, 2013 8:24 AM
To: U2 Users List
Subject: Re: [U2] What is true

This is not true as when A='HELLO'  IF (A) returns true.

You use the parenthesis to set a Boolean variable, i.e  BRITISH = (COUNTRY = 
'ENGLAND' OR COUNTRY = 'WALES')  etc   the var BRITISH is set to 1 when the 
conditions inside the parenthesis are met, otherwise BRITISH is set to 0




Jim Swain - Developer
Telephone: +44 (0) 1295 701 810  | Fax: +44 (0) 1295 701 819
www.zafire.com


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


Re: [U2] What is true

2013-07-31 Thread Charles Stevenson

And then there's the query language:

Suppose INVOICED field is supposed to be true or false.  Stored as 1 or 
0, but maybe left null in some records (We've all been there.):


 SELECT CUSTOMER WITH INVOICED

If INVOICED is 0 or null, will said CUSTOMER record be selected or not?
UV selects if 0,  but excludes if null.
Do all MV platforms work that way?


On 7/31/2013 11:06 AM, Martin Phillips wrote:

Hi,


About the true/false thing, I always use 0 and 1 but I was chastised
about that by a colleague recently, that it might not be completely
cross-platform, and now I stutter on it every time I do that,
wondering if I'm not really following a best practice

I seem to recall this same topic being discussed a year or two back, perhaps in 
a different group.

In the multivalue world, the language definition says that anything that 
returns true/false returns 1 for true, 0 for false.
Anything that interprets a value as true/false treats zero and a null string as 
false, everything else as true. This definition
holds for all multivalue products but not necessarily in other languages. Any 
new multivalue product that breaks this definition is
probably doomed to failure because migration of existing applications would 
become a nightmare task.

In our type variant world where we have no such thing as a Boolean data type, 
it is very easy to write statements such as
INVOICED = 1

Is INVOICED a Boolean variable, perhaps telling us in this case that an invoice 
has been raised? Or, is it a state flag with
multiple values for which this might be indicating a type of invoice that has 
been sent? There is no way for the reader to tell.

At risk of starting a whole new discussion on programming style (and I start 
form the viewpoint that there are many acceptable
styles, it is more important to be consistent), this is probably best resolved 
by use of tokens. I have for many years held an
interesting opinion that a program should never have any hard coded numeric 
values except perhaps zero, not that I adhere rigidly to
my own opinion. The above line becomes something like
INVOICED = TRUE
or
INVOICED = INV.PDF

Now, all is clear(er) to the reader.

Prime Information introduced @FALSE and @TRUE as symbolic constants (0 and 1 
respectively) to avoid the need for our own equated
tokens and several other multivalue products have followed this convention.

Of course, nothing is ever completely black and white. As multivalue Basic has 
developed, internal data types have gone beyond
simply numbers and strings. If I write
IF FVAR THEN ...
where FVAR is a file variable, what do I expect this to do? The language 
definition does not tell us but most multivalue products
would give us a data type error of some sort because there is no rule for 
transforming a file variable to a Boolean value.


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



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


Re: [U2] Universe Triggers

2013-07-26 Thread Charles Stevenson

re. triggers  Raid,  I could not agree with Phil more.  Well said.
Come on, Rocket!

On 7/19/2013 1:32 AM, Phil Walker wrote:

Ken,

I am glad you raised the issue about debugging a program with a file which has 
a trigger attached. I have been on to UV (Vmark/Ardent/IBM/Rocket for ages 
about fixing this pushing for the ability to be able to step into the trigger 
code, but at a VERY MINIMUM being able to debug the program and perform the 
write on the file, and in effect step over the trigger subroutine and carry on 
debugging. The issue is the trigger subroutine cannot support input, so what UV 
have done is basically say you are using the debugger so you are inputting 
debug commands so you will abort. They need to turn this restriction off for 
debugging so that either of the above two scenarios is supported.

In a Microsoft world I can debug anything through the connected world of 
web/databases etc..

Have had no feedback from UV

-Original Message-
From: u2-users-boun...@listserver.u2ug.org 
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Ken Ford
Sent: Friday, 19 July 2013 9:48 a.m.
To: u2-users@listserver.u2ug.org
Subject: Re: [U2] Universe Triggers

Dan,
In addition to the other responses you have received, I suggest the following:
1. Have one master file trigger subroutine (globally catalogued) that calls 
subroutines (locally catalogued) tailored to individual files.  This means you 
don't have to stop and restart Universe when a new trigger is required or a 
change to an existing one.  If the master subroutine changes, you do have to 
restart Universe.
2. Use a control record that records the subroutine name and state of the 
trigger for each file having a trigger.
3. Use a program to change the state of a trigger, using the control records in 
2 above.
4. Make sure all background processes that have a file with a trigger open are 
logged out when recompiling the subroutine for that file trigger.
5. Remember that you can't do anything to a file with an active trigger whilst 
in the RAID debugger (it will crash).  Rather, if you are testing a file 
trigger subroutine, drop the trigger and use a trigger testing program that 
calls the subroutine after taking a copy of the record being changed, pausing 
whilst you change it in another session, and then resuming, calling the 
subroutine.

If you would like samples of any of the software mentioned above, let me know, 
and I can send them to you.

Regards,
Ken Ford
Universe Software Developer
t 07 3013 8605 | f 07 3002 8400
e ken.f...@firstmac.com.au | w firstmac.com.au


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


[U2] [UV] Do you avoid TRIGGERS because of the difficulty using DEBUG or RAID with them? Was: Universe Triggers

2013-07-26 Thread Charles Stevenson
How many people avoid using triggers BECAUSE of the virtual 
impossibility of using RAID with Triggers?


On 7/26/2013 12:33 PM, Phil Walker wrote:

I won't be holding my breath Charles ;-)

-Original Message-
From: u2-users-boun...@listserver.u2ug.org 
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Charles Stevenson
Sent: Friday, 26 July 2013 9:22 p.m.
To: U2 Users List
Subject: Re: [U2] Universe Triggers

re. triggers  Raid,  I could not agree with Phil more.  Well said.
Come on, Rocket!

On 7/19/2013 1:32 AM, Phil Walker wrote:

Ken,

I am glad you raised the issue about debugging a program with a file which has 
a trigger attached. I have been on to UV (Vmark/Ardent/IBM/Rocket for ages 
about fixing this pushing for the ability to be able to step into the trigger 
code, but at a VERY MINIMUM being able to debug the program and perform the 
write on the file, and in effect step over the trigger subroutine and carry on 
debugging. The issue is the trigger subroutine cannot support input, so what UV 
have done is basically say you are using the debugger so you are inputting 
debug commands so you will abort. They need to turn this restriction off for 
debugging so that either of the above two scenarios is supported.

In a Microsoft world I can debug anything through the connected world of 
web/databases etc..

Have had no feedback from UV

-Original Message-
From: u2-users-boun...@listserver.u2ug.org 
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Ken Ford
Sent: Friday, 19 July 2013 9:48 a.m.
To: u2-users@listserver.u2ug.org
Subject: Re: [U2] Universe Triggers

Dan,
In addition to the other responses you have received, I suggest the following:
1. Have one master file trigger subroutine (globally catalogued) that calls 
subroutines (locally catalogued) tailored to individual files.  This means you 
don't have to stop and restart Universe when a new trigger is required or a 
change to an existing one.  If the master subroutine changes, you do have to 
restart Universe.
2. Use a control record that records the subroutine name and state of the 
trigger for each file having a trigger.
3. Use a program to change the state of a trigger, using the control records in 
2 above.
4. Make sure all background processes that have a file with a trigger open are 
logged out when recompiling the subroutine for that file trigger.
5. Remember that you can't do anything to a file with an active trigger whilst 
in the RAID debugger (it will crash).  Rather, if you are testing a file 
trigger subroutine, drop the trigger and use a trigger testing program that 
calls the subroutine after taking a copy of the record being changed, pausing 
whilst you change it in another session, and then resuming, calling the 
subroutine.

If you would like samples of any of the software mentioned above, let me know, 
and I can send them to you.

Regards,
Ken Ford
Universe Software Developer
t 07 3013 8605 | f 07 3002 8400
e ken.f...@firstmac.com.au | w firstmac.com.au




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


Re: [U2] Benton Scheduler

2013-07-22 Thread Charles Stevenson
And I'm even more pleased to hear Dr. Leitner still graces us with his 
presence.

Cheers, Lee!

Chuck

On 7/19/2013 8:00 PM, Riverman wrote:

Thanks to all the speedy responders. I am pleased Benton is still alive and
well, according to Google you do not exist. Searches only returned dead
links. Benton has served us well for many years and our organisation looks
forward to many more years of faithful service.


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


Re: [U2] Running total

2013-07-04 Thread Charles Stevenson

The important general idea is this:

Use the @-buffer to get the result of the i-desc calculation from the 
*previous* record to apply it to the calculation for the *current* 
record.   (RetrieVe inits @-buffers to null (which goes to 0) when the 
sentence executes.)


I don't think this works for UD's uniQuery.  From Martin's response, I'm 
guessing not for QM, either.


Kate's non-compound solution, @1+F1, is superior to my own, @2+F1; @1,
because it allows nesting this I-descriptor inside a 2nd.  For example, 
if you want to use this as part of running-weighted-averages.
Better still,   ADDS(@,F1)  or   @ + SUMMATION( @ )  because they 
handle multivalues.

I knew you all could come up with the details to suit your purposes.

The important piece of the puzzle is extracting the previous record's 
calculation for use in the next record's calculation.


Another example of the same idea is to see if a value has changed  
process accordingly,  effectively a breakpoint control inside an 
i-descriptor:


 2 :  @2; CUST.ID; IF @1 = @2 THEN [logic for same customer as 
last time] ELSE [logic for next customer]


(The above would only be useful on a presorted list.)

cds

On 7/4/2013 5:04 AM, Kate Stanton wrote:

I could only find doc for this in the System Description manual, where it
talks about using @ in I-type expressions, where @ is the previous one
(just resolved), @1 is result of first sentence (separated by ;), @2 is
result of 2nd sentence, etc.  I could not see an example of using the
result from the previous record, but it works.

BTW, with multi-values, ADDS(@1,F26) works.  V1 of first record adds to V1
of 2nd, etc.  I can't think of where we could use it, but it depends on
your file structure.


On 4 July 2013 11:47, Peter Cheney peter.che...@firstmac.com.au wrote:


I believe the expression in the second example is referred to as a
compound expression?

Can't put my finger on the exact documentation but I seem to recall that
compound expressions are broken up into parts (for want of a better term)
delimited by a ';' and each part can be referenced throughout the entire
expression by an @ number e..g. @1 refers to the first part and the nth
part is @n etc.

So for:
LIST VOC SIZE EVAL SIZE + @2;@

My take on how this works is the the first part of the expression (SIZE +
@2) can be referenced later on as @1, The second part is referenced as @
(instead of @2) and I believe is used to refer to the result of the entire
expression (sum of all the parts).

Can @ in this case also be referenced as @2? It probably could but would
break the expression.

Therefore the reference to @2 is causing the expression to grab the entire
result using contents of @ (via @2 thus keeping it separate to @) and add
it to SIZE which then becomes the new result (@) of the expressions and the
whole thing is repeated.

Does that sound about tight? Or have I got it way wrong?

Cheers
Peter




Peter Cheney

Universe Engineer

t 07 3017 8837 | f 07 3002 8400

e peter.che...@firstmac.com.au | w www.firstmac.com.au




From: u2-users-boun...@listserver.u2ug.org [
u2-users-boun...@listserver.u2ug.org] on behalf of Wjhonson [
wjhon...@aol.com]
Sent: Thursday, 4 July 2013 7:31 AM
To: u2-users@listserver.u2ug.org; donr_w...@yahoo.com
Subject: Re: [U2] Running total

Can anyone explain this situation better.  I've only ever used the @ to
simplify a few I-descriptors.

I have a dict item SIZE that is just the LEN(@RECORD)

So in this thread we've seen two EVAL solutions to a running total

LIST VOC SIZE EVAL @1+SIZE
LIST VOC SIZE EVAL SIZE + @2;@

In the first example is the @1 just saving the previous result of THIS
eval ?

And then in the second example does the fact that SIZE is first in the
Eval, effectively *push* the accumulator into position two or something?
  So that's why you need @2 ?

And then what would be the meaning of ;@ at the end of that?

Pretty confusing stuff!








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


Re: [U2] Running total

2013-07-02 Thread Charles Stevenson

LIST NEWACC BYTES EVAL BYTES+@2;@
VOC. Bytes.. BYTES+@2;@

ADDX  47 47
CHDIR 53100
ENDPAGE   54154
LNUM  64218


On 7/2/2013 11:29 AM, Martin Phillips wrote:

Hi,

  


As far as I know, the only way to do this in U2 is to use either a common 
variable or one of the @USERn variables in a subroutine to
accumulate the result. Handling multi-values is not hard (as below). Getting 
this to work for breakpoint lines is a bit more
awkward.

  


For example, using UniVerse's demonstration sales database (INITIALIZE.DEMO), I 
can create an I-type named ACCUM that reads

I

subr('ACCUMULATE', ITEM.TOTAL)

MD2

Cumulative

   8R

M

BOUGHT

  


and a program catalogued as ACCUMULATE

  


function accumulate(item)

common /total/tot

  


if @ni = 1 then tot = 0

  


x = ''

n = dcount(item, @vm)

for i = 1 to n

   tot += item1,i

   x1,i = tot

next i

  


return (x)

end

  


I can then do

LIST ORDERS PROD.NO SELL QTY ITEM.TOTAL ACCUM

  


@ID..  Product No  Sell.  Qty.  Item Total  Cumulative

  


10002 605 $40.00 1  $40.00   40.00

   501  $5.00 1   $5.00   45.00

   502  $5.00 1   $5.00   50.00

   504  $5.00 1   $5.00   55.00

10006 112  $6.00 3  $18.00   73.00

10004 704$115.00 1 $115.00  188.00

   301 $10.00 9  $90.00  278.00

10005 502  $5.00 9  $45.00  323.00

10003 202  $5.0010  $50.00  373.00

   204  $5.0010  $50.00  423.00

10001 112  $6.00 7  $42.00  465.00

   418 $27.00 4 $108.00  573.00

   704$115.00 1 $115.00  688.00

10007 301 $10.00 3  $30.00  718.00



  


Maybe Rocket can be persuaded to implement the CUMULATIVE field modifier 
keyword that we have in QM to make this trivial

  

  


Martin Phillips

Ladybridge Systems Ltd

17b Coldstream Lane, Hardingstone, Northampton NN4 6DB, England

+44 (0)1604-709200

  

  

  


-Original Message-
From: u2-users-boun...@listserver.u2ug.org 
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Wjhonson
Sent: 02 July 2013 01:36
To: u2-users@listserver.u2ug.org
Subject: [U2] Running total

  


Teach me again how to do a running total in a Access/Recall/English report.

I haven't done one in years, but I seem to recall that it's possible.

  

  


___

U2-Users mailing list

  mailto:U2-Users@listserver.u2ug.org U2-Users@listserver.u2ug.org

  http://listserver.u2ug.org/mailman/listinfo/u2-users 
http://listserver.u2ug.org/mailman/listinfo/u2-users

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



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


Re: [U2] Running total

2013-07-02 Thread Charles Stevenson

Martin,

True, you might need mv-handling subrs for mv fields.  Which are always 
fun.  (I hate to concede  that correlatives might actually be better at 
something, but I do wish there were a way to write a variation of an 
I-descriptor where you could code single value logic, with the value 
looping implied, like *cough* correlatives do.  There, I said it.  It's 
in writing.  On the internet.)


But, Martin, the method does NOT fail if you have multiple 
I-descriptors.  It did on PI, but not on UV.  UV uses seperate @-buffers 
for each I-descriptor, insulating i-descriptors from each other.

I don't think the method works on UD at all.
Tongue firmly in cheek, where it still hurts from biting it praising 
correlatives: The downside is you can't do fancy things like pass 
information between I-descriptors via @-buffers like you could on PI.  
That kind of i-descriptor hotshot programming was excellent for job 
security because no one else had a hope of deciphering it.  When I was 
young I explored the outer limits before settling on a reasonable mix of 
when to write a subroutine and when to do everything in native 
I-descriptor line 2.  I wonder how long it took Lynden to undo some of 
that after I left?   (Be gentle now, Rick.)


George's remarks about presorting are spot-on.

For breakpoints: @NB,  TOTAL() with keyword CALC  are your friends.  
They should be in everyone's RetrieVe  uniQuery repertoire.


Chuck


On 7/2/2013 3:48 PM, Martin Phillips wrote:

Hmmm.

Simpler than my approach but it fails with multivalues or with queries that 
have other I-types in them.


Martin

-Original Message-
From: u2-users-boun...@listserver.u2ug.org 
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Charles Stevenson
Sent: 02 July 2013 13:07
To: U2 Users List
Subject: Re: [U2] Running total

LIST NEWACC BYTES EVAL BYTES+@2;@
VOC. Bytes.. BYTES+@2;@

ADDX  47 47
CHDIR 53100
ENDPAGE   54154
LNUM  64218


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



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


Re: [U2] History of Prime Information

2013-06-12 Thread Charles Stevenson

Martin,
Those are details I hadn't heard.
Thanks,
Chuck

On 6/12/2013 7:36 AM, Martin Phillips wrote:

I can add that I think VMark rewrote Prime Information in C which really
boosted the performance.  I think they called it Prime Info or something
like that.

I'm not sure about this. As far as I know, once VMark took ownership of Prime 
Information, they gently retired it.

Are you thinking of PI/open? If so, I was one of the technical managers for its 
development.

PI/open started life in Prime Australia where the intention was to write it 
using a macro assembler called K9. Shortly after they
got started, Prime Australia was closed and development moved to the UK. I took 
a look at K9 and decided that it was the wrong way
to go as it made assumptions about the underlying processor architecture that 
were not necessarily valid if we wanted portability
without massive rewriting efforts. I made a decision that the core of PI/open 
would be written in C. This was highly contentious. I
can recall a project meeting in which the VP of Engineering stated that my 
continued employment was dependent on this being
successful.

At the time, Prime's C compiler was not good and there was much doubt about 
whether it would produce good code. One of my team was
tasked with finding a good C compiler. He took the interesting approach of 
constructing a very devious program that used all manner
of C operations to construct and display the ubiquitous Hello World string. 
Comparison of the resulting object code from a variety
of compilers showed that some were not that good whereas one of them evaluated 
the entire process within the compiler and just
generated a print of the literal string.

A few performance critical bits of PI/open were still written in assembler but 
I put a rule in place that there must be a C
equivalent too.

It is interesting to note that just a few weeks before first release the 
marketing guys decided to change the platform on which it
would be launched. If we had gone the assembler route, this would have imposed 
a huge delay. With C, it took just a few changes to
recompile everything.

Phew! I still had a job.


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




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


Re: [U2] [UV] Record Sampling for File Sizing Diagnostics

2013-06-11 Thread Charles Stevenson
SAMPLED keyword with a D on the end will go thru the entire file.
SAMPLED 1000  will get every thousandth record as it reads through the file.
SAMPLED 1000 SAMPLE 2000  will do the same, but then stop after it builds a
list of 2000. That is, after it's read thru the 1st 2 million keys.


On Tue, Jun 11, 2013 at 11:01 AM, Perry Taylor perry.tay...@zirmed.comwrote:

 I have several *very* large files on which I need to perform some file
 sizing diagnostics.  Rather than repeatedly running HASH.AID against these
 files is there a good way to sample say 2-3 million records to copy into a
 test file?  SAMPLE will only grab the first n records in hash order and I'm
 thinking that would not necessarily be a good representative sample of the
 file's contents.  Am I up in the night thinking this is the case?  Is there
 a better way to get a good sample of records for this purpose?

 Thanks.
 Perry

 Perry Taylor
 Senior MV Architect
 ZirMed
 888 West Market Street, Suite 400
 Louisville, KY 40202
 www.zirmed.comhttp://www.zirmed.com/



 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
 http://listserver.u2ug.org/mailman/listinfo/u2-users

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


Re: [U2] UV File doesn't like being sampled?

2013-05-24 Thread Charles Stevenson

George,
Does the file have an index on the id?
If so, try adding the NO.INDEX keyword.
I've something similar @ UV10.2.10:
--

SELECT PARTS SAMPLE 2
26417 record(s) selected to SELECT list #0.
-

SELECT PARTS SAMPLE 2 NO.INDEX
2 record(s) selected to SELECT list #0.
-

DELETE.INDEX PARTS PART_ID
Removing index file PART_ID.
SELECT PARTS SAMPLE 2
2 record(s) selected to SELECT list #0.
-

So I’m guessing that the UniVerse engineers have a glitch and didn’t 
consider that someone might index the id.


This makes sense why SELECT PARTS SAMPLE 2 works if you already have an 
active select list: the index isn’t used if a select list is active.






On 5/24/2013 8:52 AM, George Gallen wrote:

OK.

Any Ideas? I have a Type 30 file that if I use the SAMPLE modifier in the 
SELECT still returns the entire file,
However, if I use the SAMPLE modifier in a LIST command on that same file, it 
only returns the sample amount.

Now, it gets stranger, If I do a SELECT with the SAMPLE modifier, it returns 
the whole file as an active list, and if I
Do another SELECT with the SAMPLE modifier on that active list, it only returns 
the the sample amount.
So what, the file is just toying with me? I guess if I really want that sample, 
I have to ask twice?


SELECT FILENAME SAMPLE 10

929347 record(s) selected to SELECT list #0.

SELECT FILENAME  SAMPLE 10

10 record(s) selected to SELECT list #0.
This seems to be the only file that is behaving this way. There are no 
dictionary items in the file that would
Interfere with the UV selection.

My next step will be to create a new file, and copy over the contents, just in 
case there is something that
Is corrupted in the file.

This is on UV 10.0.2 / RH Linux




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


Re: [U2] Relative Path for SET.INDEX in Universe

2013-05-17 Thread Charles Stevenson
At 10.1 (on Windows)  I've run into trouble when filename is an 
F-pointer to a relative path that is not just a file resident in that 
account.  e.g.:


   VOC XYZ
   01: F
   02: ABC/XYZ

Rick,
Your INDICES() result will differ depending on whether you invoke the 
function in the account where  filename F-pointer is defined locally,  
or from an account where you are referencing it with a Q-pointer.  There 
you'll get the full path.


cds


On 5/15/2013 11:19 PM, Rick Nuckolls wrote:

Thanks, Jeff.  Someone else did respond, but with caveats that he remembered 
non-specific issues. One definitely seems to be that INDICES() returns the 
partial path rather than the full one, so utilities that use that information 
will have an issue.

-Rick

On May 15, 2013, at 8:56 PM, Jeff Fitzgerald j...@fitzlong.com wrote:


Rick,

Don't know if you got your question about relative index answered, but this
was from a post I made back in 2007:



IBM tech support just made me aware of an apparently
undocumented feature that was added to SET.INDEX in release 10.1
allowing a relative path for the index file.

SET.INDEX  filename  TO  RELATIVE.PATH

This command will set the index pathname to ./I_filename eliminating
the need to reset the index pathname when the files are copied, as long
as the data file and index file are copied as a unit.  Similarly:

CREATE.INDEX  filename  indexname  AT  RELATIVE.PATH

Wanted to share this *very* nice enhancement.

Jeff Fitzgerald
Fitzgerald  Long, Inc.

---

Not too long after my post, Steve O'Neal made this post about a problem.
Haven't tested lately to see if it's still a problem or not

---

There are, of course, caveats with everything.  You cannot add a second
index after you make the first one, AT RELATIVE.PATH, in a typical
fashion.  This would be necessary if you wanted indices with different
characteristics, for example, with and without NO.NULLS.

This behavior occurs on AIX 5.3 and Windows XP at UniVerse 10.2

Case 422234*USA has been created.

C:\Accounts\bugs\IndexRelative2C:\ibm\uv\bin\uv
This directory is not set up for uniVerse.
Would you like to set it up (Y/N)?Y
0. Ideal UniVerse compatibility
1. IN2 compatibility
2. Prime Information compatibility
3. PICK compatibility
4. PI/open compatibility
5. Microdata Reality compatibility


Which way do you wish to configure your VOC ? 0
Your VOC is configured for Ideal UniVerse compatibility
Creating file VOC as Type 3, Modulo 23, Separation 4.
Creating file D_VOC as Type 3, Modulo 2, Separation 1.
Loading your VOC file.  (Each * = 10 records.)

Loading your D_VOC file.  (Each * = 10 records.)
*
Creating file SAVEDLISTS as Type 1.
Creating file D_SAVEDLISTS as Type 3, Modulo 1, Separation 2.
Added @ID, the default record for RetrieVe, to D_SAVEDLISTS.
Creating file VOCLIB as Type 2, Modulo 7, Separation 4.
Creating file D_VOCLIB as Type 3, Modulo 1, Separation 2.
Added @ID, the default record for RetrieVe, to D_VOCLIB.
UniVerse Command Language 10.2
(c) Copyright IBM Corporation 2006. All rights reserved.
IndexRelative2 logged on: Thu May 17 10:16:49 2007


CREATE.INDEX VOC F2 AT RELATIVE.PATH
CREATE.INDEX VOC F1 AT RELATIVE.PATH

Unable to open index map C:\Accounts\bugs\IndexRelative2/VOC/INDEX.MAP
for rea
d/write,CREATE.INDEX VOC F1

Unable to open index map C:\Accounts\bugs\IndexRelative2/VOC/INDEX.MAP
for rea
d/write,
---

Hope this helps!

Jeff Fitzgerald
Fitzgerald  Long, Inc.
www.fitzlong.com





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


Re: [U2] Selecting a special character in a SELECT (UV)

2013-05-16 Thread Charles Stevenson

SELECT filename WITH EVAL INDEX( @ID, CHAR(160), 1)  0

On 5/16/2013 8:41 AM, George Gallen wrote:

Ok.

I'm trying to find all the ID's in a file that contain the character ^160

I tried : SELECT filename WITH @ID LIKE ...^160...
But that didn't work.


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


Re: [U2] [UV] RESIZE INPLACE

2013-05-06 Thread Charles Stevenson

So, Perry, did you do it?
Chuck

On 4/25/2013 3:09 PM, Perry Taylor wrote:

Before I go and resize a 144GB file has anyone had any experiences with the 
INPLACE option of RESIZE in UniVerse?  Good, bad, ugly???

Thanks.
Perry

Perry Taylor
Senior MV Architect
ZirMed
888 West Market Street, Suite 400
Louisville, KY 40202
www.zirmed.comhttp://www.zirmed.com/



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


Re: [U2] [UV] RESIZE INPLACE

2013-05-06 Thread Charles Stevenson
So you remain on the ice flow with the rest of us little penguins 
waiting for someone else to see if the water is safe from hungry lurking 
seals.   We'll keep watching for someone else's blood in the water.


Glad you're alive. Still, 144GB!  That coulda been a good show . . .

Thanks,
Chuck

On 5/6/2013 9:50 AM, Perry Taylor wrote:

I had contact with U2 Support who confirmed that the INPLACE option was not 
stable at our release (10.3.9) so I steered clear.  I actually had the luxury 
of being able to create a new file and copying records so that is what I ended 
up doing.

Perry

-Original Message-
From: u2-users-boun...@listserver.u2ug.org 
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Charles Stevenson
Sent: Monday, May 06, 2013 7:25 AM
To: U2 Users List
Subject: Re: [U2] [UV] RESIZE INPLACE

So, Perry, did you do it?
Chuck

On 4/25/2013 3:09 PM, Perry Taylor wrote:

Before I go and resize a 144GB file has anyone had any experiences with the 
INPLACE option of RESIZE in UniVerse?  Good, bad, ugly???

Thanks.
Perry

Perry Taylor
Senior MV Architect
ZirMed
888 West Market Street, Suite 400
Louisville, KY 40202
www.zirmed.comhttp://www.zirmed.com/



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


Re: [U2] [UV] RESIZE INPLACE

2013-04-26 Thread Charles Stevenson

Nothing like jumping into the deep end, eh, Perry?
144GB.  More by the time this thread is finished.

If RESIZE INPLACE fails, what is the typical kind of failure to expect?  
What's the worst that can happen?  What has happened to others?


If you do this, please let us know the result,  good or bad, including 
the activity level on that file while the resize was happening.


It's all very interesting,  but as dearly as I love you all at ZirMed, I 
am happy to watch from a distance.



This is my typical approach for resizing big files.  It avoids the 
RESIZE command  requires some, but little, downtime.
I am certain Perry knows all this, but there are always new people 
listening in.


It requires being able to identify which records have been updated 
recently, (e.g. indexes).
That may mean a little planning ahead, anticipating future needs, such 
as resizes.


1. Create a new empty file the proper size and copy the entire old file 
into the new.

2. Create a list of all records updated since the copy began.
3. Recopy those.Repeat 23 as needed.
4. Shut off all other access to the file.  (No one has it open, can open 
it.)

5. Create a list of all records update since last iteration of #2-3.
6. Recopy those.
7. Set.index to null  on the original file -- dont forget to do this!
8. Rename to original file
9. Rename to new file to be live file
10. Set.index on the new live file.  attach original indexes to new file.
11. Let users at the file.

Warm regards,
Chuck


On 4/25/2013 3:09 PM, Perry Taylor wrote:

Before I go and resize a 144GB file has anyone had any experiences with the 
INPLACE option of RESIZE in UniVerse?  Good, bad, ugly???

Thanks.
Perry

Perry Taylor
Senior MV Architect
ZirMed
888 West Market Street, Suite 400
Louisville, KY 40202
www.zirmed.comhttp://www.zirmed.com/



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


Re: [U2] WRITESEQ Error

2013-04-12 Thread Charles Stevenson
I, for one, truly appreciate it when people post back like this when 
they finally find the solution to their puzzle.

Thanks, Al.

cds

On 4/12/2013 9:59 AM, Al DeWitt wrote:

We found the cause to this problem and I thought I'd share it with you.

The file we append sits on a virtual PC.  The VOC pointer is 
\\file-server\share-name\folder-name

This PC is configured for automatic windows updates and automatically restarts. 
 We had Patch Tuesday.  The PC restarted fine and automatically started the 
application, however, the share-name stopped working.

When the IT person tried to restart it he didn't do it correctly.  Now that we 
have correctly recreated share-name all is well.

Thanks for all your help.

Al DeWitt


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


Re: [U2] Replacements for Old SB?

2013-03-14 Thread Charles Stevenson

On 3/13/2013 8:55 PM, Tony Gravagno wrote:
 I haven't had a single department manager tell me they want a thick 
client GUI in almost a decade. Anyone who is looking to me for GUI 
these days wants a browser.


Case in  point:
We're in testing now with a thick-client 4GL handheld ap to be deployed 
to company personnel.

Much biz data  logic reside on local device.
Interface to corporate UV db via mv.Net.
But GUI on the handheld will be browser-based.

We have also deployed small telnet screens  (40char wide) on 4GL 
handheld for quick data entry in warehouse away from a normal terminal.  
Bar-code entry via phone camera works interfaces into telnet screen.
This has been a big hit with the users!


Chuck



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


Re: [U2] ISO Date Format

2013-03-11 Thread Charles Stevenson
By the way, you can also completely eliminate the dash (or slash, etc.) 
delimiters:


OCONV( 16507   , DYMD[4'',2'',2] )  --  20130311
ICONV( 20130311, DYMD[4'',2'',2] )  --  16507

Notice that ICONV'ing the OCONV'd or OCONV'ing the ICONVd result gets 
you bat to where you started.  That makes it particularly useful in dict 
conversion fields.



I learned that on this list, but I do not remember from whom. There are 
too many people I've learned from.


cds


On 11 March 2013 13:56, Jeff Schasny jscha...@gmail.com wrote:
Has anyone come up with an OCONV string that will product an ISO 
standard date (-MM-DD)? After a vendor insisted on this last week 
I ended up creating a subroutine called by an I descriptor but it 
seems like there should be an easier way. A quick trip through the 
Universe Basic manual, my old Prime Info-Basic manual, and Pick 
Basic: A programmer's guide didn't shed any light.


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


[U2] [UV] User Exits was: ISO Date Format

2013-03-11 Thread Charles Stevenson

You can do user exits on UniVerse.
I thought User-defined processor codes were standard on MV platforms.

For UV they are defined in the UniVerse Guide for  Pick Users, 
Appendix A, User Exit Codes.


In the past I've used the technique to create my own uparrow i-conv, 
o-conv code  that mimicks ED's up-arrow mode.


I do wish they were a bit more versitile.  If I remember my pick 
assembler user exit coding -- which I don't!  --  I think we're shy 4 
hex digits of parameters that ought to be able to be passed.  Or 
something like that.


cds

On 3/11/2013 10:55 AM, Tony Gravagno wrote:

It's things like this that make me wish more MV platforms had
user-defined processor codes. U2 excels in the versatility here. I
can't use wonderful codes like this because most of my code needs to
work across platforms.  Wah.  :'(

T


From: Charles Stevenson
OCONV( 16507   , DYMD[4'',2'',2] )  --  20130311
ICONV( 20130311, DYMD[4'',2'',2] )  --  16507

From Brian and Robert:

D-YMD[4,2,2]

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



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


Re: [U2] ISO Date Format

2013-03-11 Thread Charles Stevenson

Bob,

I'm curious,on UD6.1 does this work, using 2 conversion codes with a 
value mark between? :


  OCONV( 16507,  D-YMD[2,2,]: @VM: MCN )  -- 120311

cds



On 3/11/2013 12:16 PM, Woodward, Bob wrote:

I guess you need to be on a more current version of UD than 6.1 for this
to work.  DYMD[4,2,2] works just fine but everything I've tried is
proving that in this version, anyway, there MUST be a delimiter between
the parts of the date.  It does not matter what delimiter as I've tried
space, period, slash, even a comma but for both ICONV and OCONV adding a
quote of any type, null/space/dash/etc, to the numeric only gives
undesired results.

I have to strip out the delimiter in OCONV results and make sure some
kind of delimiter is there for ICONV to get me back to the internal date
value.

An interesting note is using the OCONV(IDATE,'D-YMD[2,2,2]') format, the
dash can be replaced with the digits 5 to 9 but using the digits 0 to 4
result in an output delimited with a space.  Would have been acceptable
(and nice) to have been able to get 13003011 but oh well.  I guess I
could use 'D5YMD[2,2,2]' to give me the value 13503511 just as well.

Fun with dates!

BobW

-Original Message-
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Charles
Stevenson
Sent: Monday, March 11, 2013 8:08 AM
To: U2 Users List
Subject: Re: [U2] ISO Date Format

By the way, you can also completely eliminate the dash (or slash, etc.)
delimiters:

OCONV( 16507   , DYMD[4'',2'',2] )  --  20130311
ICONV( 20130311, DYMD[4'',2'',2] )  --  16507

Notice that ICONV'ing the OCONV'd or OCONV'ing the ICONVd result gets
you bat to where you started.  That makes it particularly useful in dict
conversion fields.


I learned that on this list, but I do not remember from whom. There are
too many people I've learned from.

cds


On 11 March 2013 13:56, Jeff Schasny jscha...@gmail.com wrote:

Has anyone come up with an OCONV string that will product an ISO
standard date (-MM-DD)? After a vendor insisted on this last week
I ended up creating a subroutine called by an I descriptor but it
seems like there should be an easier way. A quick trip through the
Universe Basic manual, my old Prime Info-Basic manual, and Pick
Basic: A programmer's guide didn't shed any light.




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


Re: [U2] ISO Date Format

2013-03-11 Thread Charles Stevenson

What?   It's 2013 already? ! ! ! ? !
Why didn't someone tell me?
I set my clock ahead yesterday and everything.

On 3/11/2013 1:10 PM, Woodward, Bob wrote:

With a couple of corrections, yes, it did work.

PRINT OCONV(16507,D-YMD[2,2,2]:@VM:MCN)

This returned the value 130311.

You were missing the last 2 and the year is 2013, not 2012.  This was a
good thought, though.  Cool


-Original Message-
From: Charles Stevenson [mailto:stevenson.c...@gmail.com]
Sent: Monday, March 11, 2013 10:59 AM
To: U2 Users List
Cc: Woodward, Bob
Subject: Re: [U2] ISO Date Format

Bob,

I'm curious,on UD6.1 does this work, using 2 conversion codes with a
value mark between? :

OCONV( 16507,  D-YMD[2,2,]: @VM: MCN )  -- 120311

cds



On 3/11/2013 12:16 PM, Woodward, Bob wrote:

I guess you need to be on a more current version of UD than 6.1 for
this to work.  DYMD[4,2,2] works just fine but everything I've tried
is proving that in this version, anyway, there MUST be a delimiter
between the parts of the date.  It does not matter what delimiter as
I've tried space, period, slash, even a comma but for both ICONV and
OCONV adding a quote of any type, null/space/dash/etc, to the numeric
only gives undesired results.

I have to strip out the delimiter in OCONV results and make sure some
kind of delimiter is there for ICONV to get me back to the internal
date value.

An interesting note is using the OCONV(IDATE,'D-YMD[2,2,2]') format,
the dash can be replaced with the digits 5 to 9 but using the digits 0
to 4 result in an output delimited with a space.  Would have been
acceptable (and nice) to have been able to get 13003011 but oh well.
I guess I could use 'D5YMD[2,2,2]' to give me the value 13503511 just

as well.

Fun with dates!

BobW

-Original Message-
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Charles
Stevenson
Sent: Monday, March 11, 2013 8:08 AM
To: U2 Users List
Subject: Re: [U2] ISO Date Format

By the way, you can also completely eliminate the dash (or slash,
etc.)
delimiters:

OCONV( 16507   , DYMD[4'',2'',2] )  --  20130311
ICONV( 20130311, DYMD[4'',2'',2] )  --  16507

Notice that ICONV'ing the OCONV'd or OCONV'ing the ICONVd result gets
you bat to where you started.  That makes it particularly useful in
dict conversion fields.


I learned that on this list, but I do not remember from whom. There
are too many people I've learned from.

cds


On 11 March 2013 13:56, Jeff Schasny jscha...@gmail.com wrote:

Has anyone come up with an OCONV string that will product an ISO
standard date (-MM-DD)? After a vendor insisted on this last
week I ended up creating a subroutine called by an I descriptor but
it seems like there should be an easier way. A quick trip through
the Universe Basic manual, my old Prime Info-Basic manual, and Pick
Basic: A programmer's guide didn't shed any light.




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


Re: [U2] FW: Clearing Input Buffer

2013-03-05 Thread Charles Stevenson

Like David Green, I would have suggested CLEARINPUT.
I'm missing something:  why all these other schemes people are talking 
about?


On 2/22/2013 1:20 PM, Al DeWitt wrote:

I have an input screen (built with System Builder) where data can either be 
entered manually or via a barcode scanner.  The screen has 3 text boxes for 
input.  The barcode option fills two of the text boxes and is supposed to land 
on the third box to await input.  However, the scanner must be adding an extra 
return or something because when I scan it  the third field's Process After 
executes.

What can I do to flush the input buffer at the end of my validation routine on 
my second field...or is it better to do this on the Process Before on my third 
field.

It's more of a nuisance but it would look more professional if I could make it 
clean.

Thanks.
Albert DeWitt, CPIM



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


Re: [U2] [UD] correlative syntax

2013-03-01 Thread Charles Stevenson

Isn't there a T missing?

OCONV(@ID,G*1); OCONV(@,FILE;X;0;0); @#
   
   TFILE ?
should be:
OCONV(@ID,G*1); OCONV(@,TFILE;X;0;0); @#




another way is to do both correlatives in 1 oconv:

OCONV(@ID,(G*1:@VM:TFILE;X;0;0))#


On 2/28/2013 3:29 PM, bradley.sch...@usbank.com wrote:

A coworker just ran across the following in one of our DICTs. The name of
the item indicates it was written by someone who is no longer with the
organization and was well known for knowing wonderful arcane UniData
tidbits. We can't find anything describing what exactly is going on. The
end result is very useful. I'm wondering if anyone can explain the @#
bit.


OCONV(@ID,G*1); OCONV(@,FILE;X;0;0); @#


The file the DICT is in has a compound key: ACCOUNT.NUMBER*sequential.
What this item does is grab the account number, attempt to read from FILE
and return a 0 if the account doesn't exist in FILE or a 1 if it does.
Pretty nifty.

UD7.1
AIX5.3


TIA,
Brad.
U.S. BANCORP made the following annotations
-
Electronic Privacy Notice. This e-mail, and any attachments, contains 
information that is, or may be, covered by


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


Re: [U2] Unidata 7.1.16 Multiple Active Select Lists

2012-09-24 Thread Charles Stevenson

Dave,

Be careful with that because LOCATE's sort BY AR or DR may be 
different from LIST's sort BY an R-justified field.  Leading zeros, 
negative numbers, decimals with trailing zeros all come to mind.

If I recall that inconsistency is consistent across several MV platforms.

However,  it might be more consistent of UD to be inconsistent with the 
MV-world (the MV-universe) on this point.


cds

On 9/24/2012 1:04 PM, Dave Davis wrote:

What we do in situations like this is set up a subroutine that retrieves the list of record keys in 
B, given the value of the index I want to retrieve.  This can then be called from an 
I-type in A, or from another subroutine.

I do the sort the hard way (in basic) so that the keys are in the correct order, usually using 
LOCATE with AL or AR and INSERT


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


Re: [U2] Unidata 7.1.16 Multiple Active Select Lists

2012-09-24 Thread Charles Stevenson

Kevin,

This is a long shot,  an Is-it-plugged-In-Category question, but you 
might as well check:


On UV I got bit recently using numbered select lists because 1, 2, 
... were custom items in the VOC.
Some commands recognized the numbered select lists on the command line; 
but  some read the VOC and got confused.


cds

On 9/24/2012 11:43 AM, Kevin King wrote:

How does one manage multiple active select lists in Unidata?  I could have
sworn I've done this before, but for some reason it's not working at all as
I recall.

I have this SUBR(..) type field in file A that selects records from file B
to calculate an aggregate.  This works fine when listing file A and showing
the field.  However, if there's an active select list when file A is listed
with this field, the select statement in my SUBR(..) is consuming the
active select list 0 and returning incorrect results.

My subroutine is $BASICTYPE U and is selecting records using the lower
case select and selecting to active list #3.  It then processes from list
#3 and returns its result.  I've tried using the RTNLIST and PASSLIST
options on the EXECUTE statements and I get a Misuse of Reserved Word
'PASSLIST' or Misuse of Reserved Word 'RTNLIST'.  I've tried UDTEXECUTE
with no compilation errors but also no improvement on the problem.  I've
even tried MDPERFORM but I get the misuse errors with the RTNLIST and
PASSLIST options.  Oddly enough, removing $BASICTYPE U I don't get an
error on MDPERFORM but I can't READNEXT from a numbered select without the
$BASICTYPE U.

How should I structure this SUBR(..) so that it does not consume list 0
when selecting to list 3?



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


Re: [U2] Etymology of Q-Pointer

2012-09-12 Thread Charles Stevenson

I have 2 definitive answers. I believe both are true.


I posed the question to the U2-list  LinkedIn Pick Users Group (not 
Googlegroups).1


No one seemed to know there, either. “Q”uick seemed to be the most 
popular guess.


Finally, there were 2 claims of certain knowledge:

Brian Stone says:

Dick Pick himself told me that the Q-pointer stood for Query.

Jonathon Sisk says:

Since my Pocket Guide was mentioned, I went to the same authority I used 
31 years ago when researching it. That would be Henry, of course, who 
said there is no significance to the choice of the letter Q for 
Q-pointers. Glad to still have access for these types of questions, and 
sorry to disappoint those searching for deeper meaning.


The Henry that Sisk mentions is, no doubt, Henry Eggers.

I believe both answers.

In case anyone was still interested.


cds




On 9/7/2012 5:25 PM, Charles Stevenson wrote:
The etymology question about Q has deteriorated into a PI vs Pick 
discussion.

In the Pick User GoogleGroup, it's about words that rhyme with orange.

No one has the definitive historical answer? I thought maybe our 
resident historian, Dawn Wolthuis, would notice my dawning days of 
Pick comment and chime in.


Quick is the best anyone has come up with, I guess.


On 9/6/2012 9:19 PM, Charles Stevenson wrote:

A newbie stumped me: Why are Q-Pointers Q pointers ?

The Q lingo comes from the dawning days of Pick.
Why was the letter Q chosen?

Attribute makes sense.
Synonym makes sense.
PQ for Prestored Query makes sense. PR for Proc would have been 
better.


D3 User Guide just says,
Q-pointers are used in account master dictionaries to point to other 
files.

UV User Ref says,
Q-pointers are file definition synonyms that point to files in local 
and remote UniVerse accounts.

Jonathon Sisk's Pick Pocket Guide doesn't help, either.
PI never had Q-pointers. Clif, did Devcom consider it Questionable?

I posed the same question on Pick Users GoogleGroup, but I didn't get 
a really satisfactory answer, yet.

I'll bet someone here on the U2-List knows the true answer.

Chuck Stevenson







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


Re: [U2] Etymology of Q-Pointer

2012-09-07 Thread Charles Stevenson
True about not needing it on PI.  But PI could have handled Q-pointers 
exactly how UV does today, if they had wanted to.
Personally, I like having 1 F-Pointer and every other pointer a 
Q-pointer.  Slightly less efficeint, but IMO more manageable.
REPLACE and INSERT functions also allowed (still allow) a syntax mixing 
commas  a semi-colon.  Ugh.



On 9/7/2012 10:54 AM, Wols Lists wrote:

On 07/09/12 03:19, Charles Stevenson wrote:

A newbie stumped me:   Why are Q-Pointers  Q pointers ?

The Q lingo comes from the dawning days of Pick.
Why was the letter Q chosen?

 Attribute makes sense.
 Synonym makes sense.
 PQ  for Prestored Query makes sense.  PR for Proc would have been
better.

D3 User Guide just says,
 Q-pointers are used in account master dictionaries to point to
other files.
UV User Ref says,
 Q-pointers are file definition synonyms that point to files in
local and remote UniVerse accounts.
Jonathon Sisk's Pick Pocket Guide doesn't help, either.
PI never had Q-pointers.  Clif, did Devcom consider it Questionable?

Seeing as INFORMATION never had any use for q-pointers, I guess that's
why it never had them. Bear in mind, all PI FILEs were referenced by a
file pointer in the VOC where f2 was the data portion os-level filename
and f3 was the dict portion, why would it need a q-pointer?

And I've just remembered another reason - PI doesn't have an MD of any
sort. Given that f2 of a q-pointer is an account, how would PI find the
FILE? PI doesn't have the concept of account in the same way as Pick -
an account was an os-level directory and there was no master list.

So I guess q-pointers didn't exist because (a) they weren't needed and
(b) they would have needed a MAJOR changed in behaviour to implement
them (it could have been done easy enough, but it didn't fit the
philosophy, and I've always admired PI because of the very clean
philosophy).

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



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


Re: [U2] Etymology of Q-Pointer

2012-09-07 Thread Charles Stevenson
The etymology question about Q has deteriorated into a PI vs Pick 
discussion.

In the Pick User GoogleGroup, it's about words that rhyme with orange.

No one has the definitive historical answer?  I thought maybe our 
resident historian,  Dawn Wolthuis, would notice my dawning  days of 
Pick comment and chime in.


Quick is the best anyone has come up with, I guess.


On 9/6/2012 9:19 PM, Charles Stevenson wrote:

A newbie stumped me:   Why are Q-Pointers  Q pointers ?

The Q lingo comes from the dawning days of Pick.
Why was the letter Q chosen?

Attribute makes sense.
Synonym makes sense.
PQ  for Prestored Query makes sense.  PR for Proc would have 
been better.


D3 User Guide just says,
Q-pointers are used in account master dictionaries to point to 
other files.

UV User Ref says,
Q-pointers are file definition synonyms that point to files in 
local and remote UniVerse accounts.

Jonathon Sisk's Pick Pocket Guide doesn't help, either.
PI never had Q-pointers.  Clif, did Devcom consider it Questionable?

I posed the same question on  Pick Users GoogleGroup,  but I didn't 
get a really satisfactory answer, yet.

I'll bet someone here on the U2-List  knows the true answer.

Chuck Stevenson




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


[U2] Etymology of Q-Pointer

2012-09-06 Thread Charles Stevenson

A newbie stumped me:   Why are Q-Pointers  Q pointers ?

The Q lingo comes from the dawning days of Pick.
Why was the letter Q chosen?

Attribute makes sense.
Synonym makes sense.
PQ  for Prestored Query makes sense.  PR for Proc would have been 
better.


D3 User Guide just says,
Q-pointers are used in account master dictionaries to point to 
other files.

UV User Ref says,
Q-pointers are file definition synonyms that point to files in 
local and remote UniVerse accounts.

Jonathon Sisk's Pick Pocket Guide doesn't help, either.
PI never had Q-pointers.  Clif, did Devcom consider it Questionable?

I posed the same question on  Pick Users GoogleGroup,  but I didn't get 
a really satisfactory answer, yet.

I'll bet someone here on the U2-List  knows the true answer.

Chuck Stevenson


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


Re: [U2] Friday type of question

2012-09-01 Thread Charles Stevenson
If you also want to delete everything with only system delimiters but no 
actual data between them do something like:


   SELECT PERSON WITH EVAL LEN( CONVERT( @AM:@VM:@SM, , @RECORD )) 
= 0

or
   SELECT PERSON WITH EVAL SUMMATION( LENS( @RECORD )) = 0

Technically, system delimiters include chars 255 thru 248 so the 2nd 
form is more rigorous.




On 8/31/2012 6:42 PM, Morelli, David W. wrote:

Is there an easy way to determine if a record is empty?

I have a saved list of a thousand or more records that have record ID's that 
interfere with our Ellusian database.

If they are truly empty, I can do house cleaning on them.  If they contain any 
data, I have to do a different process.

When I AE into a record I get
:AE PERSON 2362
Top of 2362 in PERSON, 0 lines.

So, it is really empty.

I believe there must be a better way than handling every one of them, but I 
have been away from Unidata and forgotten everything.


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


Re: [U2] Comparing Two Dyamic Arrays

2012-07-24 Thread Charles Stevenson

Mike meant  NES( ),  not  EQS( ).
and SUMMATION( ),  not SUM( ).
SUM( ) won't yield a scalar unless all delimiters are the same.

  ResultArray =  NES(Array1, Array2)
  If summation(ResultArray)=0 then samething = true else samething 
= false


Which is all well and good . . . as long as you consider 7 = 7.00 = 
007 =  7.



To address Bill Brutzman's original question:

The trouble is that we don't _declare_ variables in UV/UD/MV Basic as 
strings or integer, etc.

So UV  its kin makes a best guess.
UV ( kin? There may be some variance!)  will attempt to compare EQ, NE, 
GT,  their ilk the two vars numerically, if possible.
That's what happens with my seven example above.  All those strings 
are treated as equal numerically.
The related multivalue handling functions, .e.g, EQS, do the same, piece 
by piece.


If one of the two vars can't be treated numerically, then it compares as 
strings.


This is probably as good a general solution as any using EQ:

  if  len(Array1) EQ len( Array2 )  then   ; * because len( )  
is so very fast
 * non-numeric 'x' concatenation forces the 2 to be treated as 
strings:

 samething = ( ( 'x': Array1 ) EQ ( 'x': Array2 ) )
  end else
 samething = @false
  end

i don't know how the speed compares to COMPARE(), which is simpler to read.

-- Chuck


On 7/23/2012 3:46 PM, Bill Haskett wrote:
I'm not sure this would work, as the UniData documentation for EQS 
states:


The UniBasic EQS function compares each value in array1 to its 
corresponding
value in array2. UniData returns an array with 1 in each position 
where values are

equal, and 0 in each position for values that are not equal.

Thus, if the following...

ARRAY1 = '11':@VM:'12':@VM:'13':@VM:'20':@VM:'21'
ARRAY2 = '11':@VM:'12':@VM:'13':@VM:'19':@VM:'22'
ARRAY3 = EQS(ARRAY1,ARRAY2)

...then the resultant ARRAY3 would look like:

'1':@VM:'1':@VM:'1':@VM:'0':@VM:'0'

On the other hand, the following...

ARRAY1 = '11':@VM:'12':@VM:'13':@VM:'20':@VM:'21'
ARRAY2 = '11':@VM:'12':@VM:'13':@VM:'20':@VM:'21'
ARRAY3 = EQS(ARRAY1,ARRAY2)

...would assign ARRAY3 to look like:

'1':@VM:'1':@VM:'1':@VM:'1':@VM:'1'

...and:

SUM(ARRAY3)

...would equal 5, which would only indicate equality if

SUM(ARRAY3) = DCOUNT(ARRAY3, @VM)

Does this make sense?  With mixed @AMs  @VMs I suspect one would have 
to loop through the result array comparing.


Is UniData different than UniVerse?

Bill



- Original Message -
*From:* mfarr...@premdor.com
*To:* U2 Users List u2-users@listserver.u2ug.org
*Date:* 7/23/2012 1:17 PM
*Subject:* Re: [U2] Comparing Two Dyamic Arrays

Try:
ResultArray =  EQS(Array1, Array2)
If sum(ResultArray)=0 then samething = true else samething = false

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


Re: [U2] RESIZE - dynamic files

2012-07-05 Thread Charles Stevenson

Chris,

I can appreciate what you are doing as an academic exercise.

You seem happy how it looks at this moment, where, because you set  
MINIMUM.MODULUS  118681, you ended up with a current load of 63%.
But think about it:  as you add records, the load will reach 70%, per 
SPLIT.LOAD 70,  then splits will keep occuring and current modlus with 
grow past 118681.  MINIMUM.MODULUS will never matter again.  (This was 
described as an ever-growing file.)


If the current config is what you want, why not just set SPLIT.LOAD 63  
MINIMUM.MODULUS 1.   That way the ratio that you like today will stay 
like this forever.


MINIMUM.MODULUS will not matter unless data is deleted.  It says to not 
shrink the file structure below that minimally allocated disk space, 
even if there is no data to occupy it.  That's really all 
MINIMUM.MODULUS is for.


Play with it all you want, because it puts you in a good place when some 
crisis happens.  At the end of the day, with this file, you'll find your 
tuning won't matter much.  Not a lot of help, but not much harm if you 
tweak it wrong, either.



On 7/5/2012 1:20 PM, Chris Austin wrote:

Rick,

You are correct, I should be using the smaller size (I just haven't changed it 
yet). Based on the reading I have done you should
only use the larger group size when the average record size is greater than 
1000 bytes.

As far as being better off with the defaults that's basically what I'm trying 
to test (as well as learn how linear hashing works). I was able
to reduce my overflow by 18% and I only increased my empty groups by a very 
small amount as well as only increased my file size
by 8%. This in theory should be better for reads/writes than what I had before.

To test the performance I need to write a ton of records and then capture the 
output and compare the output using timestamps.

Chris


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


Re: [U2] RESIZE - dynamic files

2012-07-04 Thread Charles Stevenson

Good explanation, Brian!
To anyone who skipped it because it looked long:  read it anyway.
cds

On 7/4/2012 5:26 AM, Brian Leach wrote:

Sorry to those who already know this, but maybe it's time to go over linear 
hashing in theory ..

Linear hashing was a system devised by Litwin and originally only for in-memory 
lists. In fact there's some good implementations in C# that provide better 
handling of Dictionary types. Applying it to a file system adds some complexity 
but it's basically the same theory.

Let's start with a file that has 100 groups initially defined (that's 0 through 
99). That is your minimum starting point and should ensure that it never 
shrinks below that, so it doesn't begin it's life with loads of splits right 
from the start as you populate the file. You would size this similarly to the 
way you size a regular hashed file for your initial content: no point making 
work for yourself (or the database).

As data gets added, because the content is allocated unevenly, some of that 
load will be in primary and some in overflow: that's just the way of the world. 
No hashing is perfect. Unlike a static file, the overflow can't be added to the 
end of the file as a linked list (* why nobody has done managed overflow is 
beyond me), it has to sit in a separate file.

At some point the amount of data held in respect of the available space reaches 
a critical level and the file needs to reorganize. Rather than split the most 
heavily populated group - which would be the obvious thing - linear hashing 
works on the basis of a split pointer that moves incrementally through the 
file. So the first split breaks group 0 and adds group 100 to the end of the 
file, hopefully moving around half the content of group 0 to this new group. Of 
course, there is no guarantee that it will depending on key structure) and also 
no guarantee that this will help anything, if group 0 isn't overflowed or 
populated anyway. So the next write may also cause a split, except now to split 
group 1 into a new group 101, and so forth.

Eventually the pointer will reach the end and all the initial 100 groups will 
have been split, and the whole process restarts with the split pointer moving 
back to zero. You now have 200 groups and by this time everything should in 
theory have levelled out, but in the meantime there is still overloading and 
stuff will still be in overflow. The next split will create group 200 and split 
half of group 0 into it, and the whole process repeats for ever.

Oversized records ( buffer size) also get moved out because they stuff up the 
block allocation.

So why this crazy system, rather than hitting the filled groups as they get 
overstuffed? Because it makes finding a record easy. Because linear hashing is 
based on a power of 2, the maths is simple - if the group is after the split 
point, the record MUST be in that group (or its overflow). If it is before the 
split point, it could be in the original group or the split group: so you can 
just rehash with double the modulus to check which one without even having to 
scan the groups.

What makes the implementation difficult is that Litwin et al were all assuming 
a single threaded access to an in-memory list. Concurrent access whilst 
maintaining the load factor, split pointer and splitting all add a lot more 
complexity, unless you lock the whole file for the duration of an IO operation 
and kill the performance.

And coming back to the manual, storing large numbers of data items - even large 
ones - in a type 19 file is a bad idea. Traversing directories is slow, 
especially in Windows, and locking is done against the whole directory.

Brian

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


Re: [U2] RESIZE - dynamic files

2012-07-04 Thread Charles Stevenson
SMAT -d  (or ANALYZE.SHM -d)   see uv/bin/smat[.exe] 
uv/bin/analyze.shm[.exe]


Dynamic Files:
Slot #  Inode Device Ref Count Htype Split Merge Curmod Basemod 
Largerec   Filesp Selects Nextsplit
 0 1285128087 209307792516208050 4001
2048 3267  2782736   0  1954
 1  153221440 151542860060208050 397040 
262144 1628 58641084   0134897
 2 1155376080  317006236 6208050 81  64 
1628   133616   018
 3  924071961  976405761 2208050 957 
512 1628  1249180   0   446
 4  619894993 1297457141 1208050 1157
1024 1628  3837400   0   134
 5 1401440370  656655020 6218050 213429 
131072 1628 54052576   0 82358
 6 1053905064 1350670129 2208050 365 
256 1628   529956   0   110
 7  963519080 1084306943 2208050 2564
2048 1628  4019040   0   517
 8 1909033200  47372346598208050 3851
2048 3267 12775756   0  1804

   etc.

Because of the concurrency difficulties that Brian mentioned . . .

On 7/4/2012 5:26 AM, Brian Leach wrote:

What makes the implementation difficult is that Litwin et al were all assuming 
a single threaded access to an in-memory list. Concurrent access whilst 
maintaining the load factor, split pointer and splitting all add a lot more 
complexity, unless you lock the whole file for the duration of an IO operation 
and kill the performance.
. . . is why UV reserves a table in shared memory for dynamic files, per 
SMAT -d.
The 1st user that opens the file causes the control info in the file 
header to be loaded to shared memory, where it remains until Ref Count 
drops to 0.
(It also get written to the file whenever there is a change.  At least 
on modern versions.)


Rick's post makes good sense if you work the numbers in the SMAT table.
Notice that (Curmod - Basemod) + 1 = Nextsplit  (off by 1 because groups 
start at 0.)
As Rick pointed out, Basemod is always a power of 2.  It is used by the 
hashing algorithms.  E.g., That 64 will eventually change to 128 or 32, 
once enough splits or merges happen.


Notice also that the future Nextsplit group number is set, i.e., 
predictable.  Remember Brian  Rick (others?) saying that split/merge 
decisions are determined by the entire file load, not which individual 
group that might happen to be in heavy overload? They were right: it is 
methodical.


Chris,
Notice that every number in the Split, Merge,  Largerec columns are the 
default values.
Although I do have exceptions, any random grab of 9 files like this 
would likely show straight default values.   Generally, fine-tuning 
isn't worth the bother.  It's more bang for the IT buck to buy more 
memory, disk than to pay Brian or Rick to squeeze performance out of 
type-30 files.



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


Re: [U2] UniVerse LIST statement question [not-secure]

2012-07-03 Thread Charles Stevenson

What Brian said, except don't replace LIST!
Rather, write your subroutine to be called from an I-descriptors:

 MARKH
0001   FUNCTION MARKH( INARG )
0002   COMMON /MARKH/ START.IDT, END.IDT, PREV.ID, VLIST
0003 *
0004 * Assumes common has been initialized properly before this function
0005 * is called from i-descriptors
0006 *
0007   IF @ID = PREV.ID ELSE
0008  IDTS = @RECORD 10 
0009  VLIST = 
0010  VMC = 0
0011  VMAX = DCOUNT( IDTS, @VM )
0012  FOR V = 1 TO VMAX
0013 IDT = IDTS1,V
0014 IF IDT = START.IDT THEN IF IDT = END.IDT THEN 
VLIST-1 = V

0015  NEXT V
0016   END
0017 *
0018   OUTARG = 
0019   MORE = LEN( VLIST ); * true/false
0020   LOOP WHILE MORE
0021  REMOVE V FROM VLIST SETTING MORE
0022  OUTARG1,-1 = INARG1, V 
0023   REPEAT
0024   SETREM 0 ON VLIST
0025 *
0026   RETURN( OUTARG )
0027END

An example using it is below.

It's more flexible and maintainable in the long run than tossing 
RETRIEVE altogether.
(Actually, I do think it can be done with the mv-handling functions but 
an I-descriptor subroutine will be more maintainable.)


Your sub should limits the output to the values you want. If every value 
is out of range, your subr returns null.  It can be called for various 
associated fields, and the 1st time called for a given @ID it figures 
out the value range, and saves to labeled common what vals you want for 
that record.  Subsequent calls to the sub, as long as @ID hasn't 
changed, gets the already calculated value range from common, and 
applies it to the field you pass it.


The only trick is feeding your subroutine the date range you won't know 
until runtime.I don't know a good way to feed an I-descriptor 
command line parameters such as = 6/1/2012 = 6/30/2012
You'll need to set them in a control record or, better, in @USER1, 
@USER2, or in your labeled common before the LIST is executed.


Use the I-descriptors that call your subroutine as output criteria and 
not WITH or WHEN selection criteria.  The guts of the subr will do the 
selection limits.


That may not be altogether clear.  Here's an example.
1st the relevant dict entries then an example:


DICT RTAG09:45:22am  03 Jul 2012  Page1

Field. Type  Field Conversion.. Column. Output 
Depth 
Name.. Field. Definition... Code Heading Format 
Assoc..

   Number

LOCD3 12LS
EVENT.CODE D8Event 4L M EVENT
.ASSOC
 Code
EVENT.DT   D   10   D2/  Event 8R M EVENT
.ASSOC
 Date
PRINTERD   13 15LS
MARKH.CODE I  SUBR(  Event 4L M MARKH
'MARKH',  .ASSOC
  EVENT.CODE )
 Code
MARKH.DT   I  SUBR( D2/  Event 8R M MARKH
'MARKH',  .ASSOC
  EVENT.DT )
 Date
MARKH.ASSOCPH MARKH.LINO
  MARKH.CODE
  MARKH.REF
  MARKH.DT
  MARKH.TM
  MARKH.WHO
  MARKH.DTM

7 records listed.


RUN CDS.BP MARKH.INIT 4/1 4/30
LIST RTAG LOC PRINTER   EVENT.CODE EVENT.DT   MARKH.CODE MARKH.DT


LIST RTAG LOC PRINTER EVENT.CODE EVENT.DT MARKH.CODE MARKH.DT 
09:46:05am  03 Jul 2012  PAGE1

Return.. LOC. PRINTER Event Event... Event Event...
Tag.  Code. Date Code. Date

 5137176 TPAWHSE-IN   ZEBRATPAPRINT 02/08/12
  NEW   11/04/11
10009741 EROCWHSE-OUT PI04/26/12 PI 04/26/12
  NEW   04/26/12 NEW 04/26/12
 5135103 PROCWHSE-DEF REQ   12/30/11
  REQ   12/30/11
  ASGN  12/30/11
  FREE  11/03/11
 5134267 EROCDPO-DIN  ZEBRATPAI 03/01/12
  PRINT 02/08/12
  REQ   12/09/11
  ASGN  12/09/11
  FREE  11/03/11
10010396 DFWWHSE  PI05/22/12
  NEW   05/22/12
 5119929  SI04/10/12 SI 04/10/12
  NEW   09/20/11
10004562 CROCWHSE-OUT ZEBRAEROC   PRINT 04/04/12 PRINT 04/04/12
  PRINT 01/31/12
  PRINT 01/24/12
  PRINT 

Re: [U2] UniVerse LIST statement question [not-secure]

2012-07-03 Thread Charles Stevenson

Ed is quite right.

1:  I just did it for simplicity in the example.

2:  @SENTENCE, without a wrapper:  you have do get ReTrieve to ignore 
part of the sentence.   I've never come up with a good way to do that 
other than via EVAL.  Anyone?


3.  EVAL: Yes, it is a way to pass run-time parameters!
I tend to forget about it because I - personally - don't like it in 
production.

EVAL means dictionaries can't be read-only.
And they tend to permanently leave temporary I-descriptors scattered 
in the dicts if  when something terminates abnormally.

RetrieVe rudely spits the EVAL compilation report into the output, too.
If you have multiple associated columns,  if your usage gets fancy 
(that (future) option is a reason for this approach), then your EVAL may 
need ASSOC, ASSOC.WITH, MULTIVALUED keywords, besides AS, FMT, COL.HDG.

Other than that, I love EVAL.


On 7/3/2012 11:08 AM, Ed Clark wrote:

There are 3 ways I can think of offhand to tell the subroutine what date range 
to use. I like #3 the best:

1: use common variables, which is what the example function MARKH does. The 
downside is that you have to assign the common variables before you run the 
query.

2: You could use @SENTENCE in the function and parse out the date range. That 
could be easy or hard depending on how many people write queries and what odd 
contortions of syntax they use. But both #1 and #2 could be simplified by 
writing a wrapper program. An example command line would look like:
   QLAUNCH 06/01/2012 06/30/2012 ~ LIST MYFILE INRANGE
QLAUNCH parses arguments before the '~` delimiter and puts them into a common. 
The INRANGE attribute calls the function MARKH which uses the common.

3: use the function directly from the command line with EVAL:
   LIST MYFILE EVAL SUBR('MARKH','06/01/2012','06/30/2012')  AS MYCOL COL.HDG 
WHATEVER FMT 11L
It's wordier, but you have very fine-grained control over what comes out on the 
report. COL.HDG, and FMT are optional and AS is optional in this case. You 
would us it if you wanted to sort or break on the EVAL column.



On Jul 3, 2012, at 9:55 AM, Charles Stevenson wrote:


What Brian said, except don't replace LIST!
Rather, write your subroutine to be called from an I-descriptors:

 MARKH
0001   FUNCTION MARKH( INARG )
0002   COMMON /MARKH/ START.IDT, END.IDT, PREV.ID, VLIST
0003 *
0004 * Assumes common has been initialized properly before this function
0005 * is called from i-descriptors
0006 *
0007   IF @ID = PREV.ID ELSE
0008  IDTS = @RECORD 10 
0009  VLIST = 
0010  VMC = 0
0011  VMAX = DCOUNT( IDTS, @VM )
0012  FOR V = 1 TO VMAX
0013 IDT = IDTS1,V
0014 IF IDT = START.IDT THEN IF IDT = END.IDT THEN VLIST-1 = V
0015  NEXT V
0016   END
0017 *
0018   OUTARG = 
0019   MORE = LEN( VLIST ); * true/false
0020   LOOP WHILE MORE
0021  REMOVE V FROM VLIST SETTING MORE
0022  OUTARG1,-1 = INARG1, V 
0023   REPEAT
0024   SETREM 0 ON VLIST
0025 *
0026   RETURN( OUTARG )
0027END

An example using it is below.

It's more flexible and maintainable in the long run than tossing RETRIEVE 
altogether.
(Actually, I do think it can be done with the mv-handling functions but an 
I-descriptor subroutine will be more maintainable.)

Your sub should limits the output to the values you want. If every value is out 
of range, your subr returns null.  It can be called for various associated 
fields, and the 1st time called for a given @ID it figures out the value range, 
and saves to labeled common what vals you want for that record.  Subsequent 
calls to the sub, as long as @ID hasn't changed, gets the already calculated 
value range from common, and applies it to the field you pass it.

The only trick is feeding your subroutine the date range you won't know until runtime.I don't 
know a good way to feed an I-descriptor command line parameters such as = 6/1/2012 
= 6/30/2012
You'll need to set them in a control record or, better, in @USER1, @USER2, or 
in your labeled common before the LIST is executed.

Use the I-descriptors that call your subroutine as output criteria and not WITH 
or WHEN selection criteria.  The guts of the subr will do the selection limits.

That may not be altogether clear.  Here's an example.
1st the relevant dict entries then an example:


DICT RTAG09:45:22am  03 Jul 2012  Page1

Field. Type  Field Conversion.. Column. Output Depth 
Name.. Field. Definition... Code Heading Format Assoc..
   Number

LOCD3 12LS
EVENT.CODE D8Event 4L M EVENT
.ASSOC
 Code
EVENT.DT   D   10   D2/  Event 8R M EVENT
.ASSOC
 Date
PRINTERD   13 15LS
MARKH.CODE I  SUBR(  Event 4L

Re: [U2] RESIZE - dynamic files

2012-07-03 Thread Charles Stevenson

Chris,
Let's back way up.   I take it your original question is a general one,  
not specific to one poorly performing problematic file.  Is that right?


If so, generally speaking, you just don't get a lot out of fine-tuning 
dynamic files.
Tweaking the default parameters doesn't usually make a whole lot of 
difference.

Several people have said something similar in this thread.

Other than deciding which hashing algorithm,  I generally use the 
defaults and only tweak things once the file proves problematic, which 
usually means slow I/O.


When a problem erupts, look carefully at how that specific file is used, 
as Susan  others have said.   You might get hold of FitzgeraldLong's 
paper on how dynamic files work.  If you understand the fundamentals, 
you'll understand how to attack your problem file, applying the ideas 
Rick  others have talked about here.


You may go several years without having to resort to that.

Chuck Stevenson


On 7/2/2012 2:22 PM, Chris Austin wrote:

I was wondering if anyone had instructions on RESIZE with a dynamic file? For 
example I have a file called 'TEST_FILE'
with the following:

01 ANALYZE.FILE TEST_FILE
File name ..   TEST_FILE
Pathname ...   TEST_FILE
File type ..   DYNAMIC
File style and revision    32BIT Revision 12
Hashing Algorithm ..   GENERAL
No. of groups (modulus)    83261 current ( minimum 31 )
Large record size ..   3267 bytes
Group size .   4096 bytes
Load factors ...   80% (split), 50% (merge) and 80% (actual)
Total size .   450613248 bytes

How do you calculate what the modulus and separation should be? I can't use 
HASH.HELP on a type 30 file to see the recommended settings
so I was wondering how best you figure out the file RESIZE.

Thanks,

Chris



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


Re: [U2] uv/win - PHANTOM JOBS not sync'ed

2012-06-18 Thread Charles Stevenson

Manu,

Look up the commands NOTIFY and MESSAGE.
If I recall, either or both of those can configure the parent session to 
receive or block the child phantom's message.
The PHANTOM command has a BRIEF keyword, too.  That is supposed to 
prevent the phantom from sending the message.  It doesn't sound as if 
that is your problem, though.


I think 1 of those 3 ought to control suppressing/enabling those 
messages, but, frankly, I'm having the opposite problem:  I can't seem 
to be able to turn it off !?


On top of that, although I do not recall that phantoms are supposed to 
skip ON.EXIT,  that seems to be the case here.I'm on 10.2.10 / Windows.


Chuck



On 6/15/2012 7:59 AM, Manu Fernandes wrote:

Hi,

VOC entry look exactly like NEWACC.
One more info, PHANTOM process finishs but I'm not NOTIFIED about it ; it comes 
probably from the same trouble.

Thanks for your attention.
Manu

JOBS
01 Verb - Show which PHANTOM jobs are running
02 JOBS
03 I
04 G

PHANTOM
01 Verb - Create a PHANTOM task to perform a specified operation
02 PHANTOM
03 I


-Message d'origine-
De : u2-users-boun...@listserver.u2ug.org [mailto:u2-users-
boun...@listserver.u2ug.org] De la part de Wjhonson
Envoyé : jeudi 14 juin 2012 18:26
À : u2-users@listserver.u2ug.org
Objet : Re: [U2] uv/win - PHANTOM  JOBS not sync'ed

Post the VOC entry for JOBS



-Original Message-
From: Manu Fernandes e...@infodata.lu
To: u2-users u2-users@listserver.u2ug.org
Sent: Thu, Jun 14, 2012 7:11 am
Subject: [U2] uv/win - PHANTOM  JOBS not sync'ed


Hi group,
A strange behavior on Universe/Windows.
When I start a PHANTOM, it starts correctly, do his works and finish properly ;
no more PORT.STATUS, no more WindowsTaskManagerProcessus).
But JOBS command continue to report it Running.
Any idea what wrong in the system ? rights ?
Manu




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


[U2] [UV] Program X: Line 2, WRITE failure. ( SYS.MESSAGE 040019 )

2012-06-12 Thread Charles Stevenson
Does anyone have a complete list of what kinds of problems will throw 
this error?


RUN CDS.BP X
   Program X: Line 2, WRITE failure.

uv\errlog:
   Tue Jun 12 15:54:05  12848 cdstevenson Program X: Line 2, 
Message[040019]



Although I generated it here by attempting to write a record with a 
system delimiter in the Id:


   01 OPEN 'CDSTMP' TO F ELSE STOP 201
   02 WRITE '' TO F, 'ABC':@VM:'XYZ'

while I have UVCONFIG's param prohibiting that:

   ALLOWMARKS 0

Yet, I fear there are several  sundry ways to yield up that generic 
message.

Care to contribute to the list?
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


Re: [U2] [UV] Program X: Line 2, WRITE failure. ( SYS.MESSAGE 040019 )

2012-06-12 Thread Charles Stevenson

Thanks, but does UD have the same error numbers as UV?
Something similar, but not exactly the same as SYS.MESSAGE,  uv/errlog  
file, right?


I'm looking for causes of that particular 040019 WRITE failure.
A very particular number for a very generic error.

(A wonderful documentation enhancement would be a better description of 
the error codes and their possible causes.)


On 6/12/2012 3:52 PM, Martin Braid wrote:

Not a complete list, but on UD ...
You are writing a key containing an asterisk into a DIR type file.
Permissions.
A programming error to do with STATUS in a global Trigger routine.
Possible problem with e.g. McAfee not releasing at NT level fast enough.
Martin

-Original Message-
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Charles
Stevenson
Sent: 12 June 2012 21:02
To: U2 Users List
Subject: [U2] [UV] Program X: Line 2, WRITE failure. ( SYS.MESSAGE
040019 )
Does anyone have a complete list of what kinds of problems will throw
this error?

RUN CDS.BP X

 Program X: Line 2, WRITE failure.
uv\errlog:
 Tue Jun 12 15:54:05  12848 cdstevenson Program X: Line 2,
Message[040019]

Although I generated it here by attempting to write a record with a
system delimiter in the Id:
 01 OPEN 'CDSTMP' TO F ELSE STOP 201
 02 WRITE '' TO F, 'ABC':@VM:'XYZ'
while I have UVCONFIG's param prohibiting that:
 ALLOWMARKS 0
Yet, I fear there are several  sundry ways to yield up that generic
message. Care to contribute to the list?


Epicor Software (UK) is a limited company registered in England  Wales.
Registration Number: 2338274.   Registered Office:  6th Floor, One London Wall, 
London EC2Y 5EB
This e-mail is for the use of the intended recipient(s) only. If you have 
received this e-mail in error, please notify the sender immediately and then 
delete it. If you are not the intended recipient, you must not use, disclose or 
distribute this e-mail without the author's prior permission. We have taken 
precautions to minimize the risk of transmitting software viruses, but we 
advise you to carry out your own virus checks on any attachment to this 
message. We cannot accept liability for any loss or damage caused by software 
viruses. Any views and/or opinions expressed in this e-mail are of the author 
only and do not represent the views of Epicor Software (UK) Limited or any 
other company within its group.


This message has been scanned for malware by Websense. www.websense.com
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users



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


Re: [U2] [UV] Program X: Line 2, WRITE failure. ( SYS.MESSAGE 040019 )

2012-06-12 Thread Charles Stevenson

Another cause:

If the write is to a record that someone else has locked (shame on you 
for not explicitly locking it 1st), the 040019 error occurs on 20 minute 
timeout.  (That default can be changed.)
Search for 040019 on this list's archives.  There are several less 
than definitive discussions about it.


That's where I've encountered it.  Went on a wild goose chase recently 
looking for that cause until I found the value-mark-in-the-id problem 
also causes it.   David Jordan's sounds similar: mv data where 
single-valued expected.


How many others?


On 6/12/2012 3:01 PM, Charles Stevenson wrote:
Does anyone have a complete list of what kinds of problems will throw 
this error?


RUN CDS.BP X
   Program X: Line 2, WRITE failure.

uv\errlog:
   Tue Jun 12 15:54:05  12848 cdstevenson Program X: Line 2, 
Message[040019]



Although I generated it here by attempting to write a record with a 
system delimiter in the Id:


   01 OPEN 'CDSTMP' TO F ELSE STOP 201
   02 WRITE '' TO F, 'ABC':@VM:'XYZ'

while I have UVCONFIG's param prohibiting that:

   ALLOWMARKS 0

Yet, I fear there are several  sundry ways to yield up that generic 
message.

Care to contribute to the list?


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


Re: [U2] [UV] Program X: Line 2, WRITE failure. ( SYS.MESSAGE 040019 )

2012-06-12 Thread Charles Stevenson

Here's from a similar discussion from 2005 below.   No solution then.

But I just thought of something I wish I'd thunk of 7 years ago.  I 
can't make a write cough up 040019 during this condition, but maybe 
someone else can build on on it:


For type-19, all ids hash to the same lock semaphore set for the lock 
table.  If the lock table isn't big enough,  you lock a lot of them 
(e.g., you forgot to release them by mistake) it is very easy to get this:


   READU threshold reached, lock on XYZ denied!

(The hashing for the lock table is similar in principle to file 
hashing.  The device, inode,  the target id's group number determine 
which lock semaphore applies.  For type-19 there is no  group, so same 
semaphore for entire dir.)


cds

-Original Message-
From: Anmol Chandrakant Khopade
Sent: Tuesday, July 19, 2005 5:01 PM
To: u2-users@listserver.u2ug.org
Subject: [U2] DATABASE write problem

Hi, I am facing a problem wherein a WRITE operation to a type 19 file 
is failing in some cases. The call to STATUS() function within the ON 
ERROR clause returns error 40019. Strangely this problem does not occur 
for all the writes operations, but approximately 100 times (out of 60K 
write operations). The record id contains the current time, so it 
doesn't seem to be an issue of 2 concurrent writes using the same record 
id. A point to note that this file has read and writes happening 
simulatneously i.e. A process keeps writing records, while the other 
process keeps on polling this file to read the records. Any pointers to 
the below points will be highly appreciated
 1. Documentation where the error number can be looked up (40019 in 
this case)
 2. If anyone has encountered a similar problem with write operation on 
a type 19 files, and has a solution, it would really help.


Thanks in advance
Warm regards
Anmol
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


Re: [U2] Why did this compile??

2012-06-07 Thread Charles Stevenson

A Pickism, not a Prime-ism.
Prime demanded that you say  FMT( TRIM( LINE3, ~ ) if that's what 
you meant.


VLIST the program  it will be obvious how it compiled.

cds

On 6/7/2012 1:47 PM, David Wolverton wrote:

Look at this line of code...

TEST.STRING = TRIM(LINE1):~:TRIM(LINE3)~:TRIM(LINE4)


See how it is missing the : between3)~  ??

Neither did I ... and the program compiled and ran without a complaint in
UniData 7.2.12 -- but Obviously I was getting bogus results on the other
side!!

I'm trying to figure out why this was 'allowed' ... I'm ready this and
thinking this should have tripped a compile message of SOME type!

Just one of those 'how weird is this' things I thought I'd share since it
cost me about an hour to find!!

DW


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



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


Re: [U2] Do indexes record mv pos ?

2012-06-06 Thread Charles Stevenson

It's working as designed.
PI did it better  the workaround for other flavours is:

   $OPTIONS PIOPEN.SELIDX

From basic ref pdf, under SELECTINDEX:

Note: If index is multivalued, each value is indexed even if the field 
contains duplicate values in the same record. Except in PIOPEN flavor 
accounts, such duplicate values are returned to list.number. To prevent 
the return of duplicate key values, use the PIOPEN.SELIDX option of the 
$OPTIONS statement.

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


Re: [U2] matrix dimension

2012-05-24 Thread Charles Stevenson

So LARGE.ARRAY is 2-dimensional  SMALL.ARRAY is 1 dimensional.

The real value of INMAT is telling the SIZE of (each) dimension.

Yes, I'm deliberately being picky.  I've found it very frustrating to be 
hard-limited to 1- or 2-dimnsional arrays.

What would be so wrong to allow:

  DIM BETTER.ARRAY( 23, 14, 10, 2, 3 )

Seems like it would be an easy enough feature to add, completely 
backward compatible.


Why isn't dimension arbitrary?



On 5/23/2012 3:01 PM, Wally Terhune wrote:

Extracted from the UniBasic Commands Reference for INMAT()

In the next example, the program segment dimensions two arrays and then prints 
the
dimensions using the PRINT statement and INMAT function:
DIM LARGE.ARRAY(23,14)
DIM SMALL.ARRAY(9)
PRINT INMAT(LARGE.ARRAY)
PRINT INMAT(SMALL.ARRAY)
This results in the following:
23}14
9
-Original Message-
From: Jeffrey Butera
... is there a function to determine it's dimensions?...

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


[U2] training material on LOCKS

2012-05-09 Thread Charles Stevenson
Even though It is a foundational concept for any multi-user database 
management, several times in my career I have come across seasoned MV 
programmers who do not understand the basics of readu locks  (let alone 
related topics like file locks, deadlocks, group locks, L-locks, 
transactions, optimistic/pessimistic, lock table, monitoring  configuring.)


Has anyone ever put that specific material into some kind of training 
module?  An article in Spectrum?  Infocus?  A conference session?


TIA for any leads,
cds
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


Re: [U2] training material on LOCKS

2012-05-09 Thread Charles Stevenson

Brian,

I'd agree with you, except for empirical evidence to the contrary.
The Basic manual is a reference guide,  quite good, but not a teaching 
guide.  Those are 2 different animals.

For some reason, some otherwise talented people find locks very confusing.

cds

On 5/9/2012 10:21 AM, Brian Leach wrote:

Actually, Chapter 4 of the UniVerse Basic manual has quite a good treatment
on them.

Brian

-Original Message-
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Charles Stevenson
Sent: 09 May 2012 14:45
To: U2 Users List
Subject: [U2] training material on LOCKS

Even though It is a foundational concept for any multi-user database
management, several times in my career I have come across seasoned MV
programmers who do not understand the basics of readu locks  (let alone
related topics like file locks, deadlocks, group locks, L-locks,
transactions, optimistic/pessimistic, lock table, monitoring  configuring.)

Has anyone ever put that specific material into some kind of training
module?  An article in Spectrum?  Infocus?  A conference session?

TIA for any leads,
cds



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


Re: [U2] training material on LOCKS

2012-05-09 Thread Charles Stevenson

Yes, Leroy,  UV910 will have some of what I'm looking for.
UV800 proably has more of what I need.
I'll cobble something together.

Thanks all,
cds

On 5/9/2012 3:01 PM, LeRoy Dreyfuss wrote:

Chuck, waHappy 100th Birthday Ronald Coase!! | Points and Figures  
http://pointsandfigures.com/2010/12/29/happy-100th-birthday-robert-coase/
sn't the UV910 material useful?

Regards,

LeRoy
Sent from my iPhone 4

On May 9, 2012, at 12:43 PM, Charles Stevensonstevenson.c...@gmail.com  wrote:


Brian,

I'd agree with you, except for empirical evidence to the contrary.
The Basic manual is a reference guide,  quite good, but not a teaching guide.  
Those are 2 different animals.
For some reason, some otherwise talented people find locks very confusing.

cds

On 5/9/2012 10:21 AM, Brian Leach wrote:

Actually, Chapter 4 of the UniVerse Basic manual has quite a good treatment
on them.

Brian

-Original Message-
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Charles Stevenson
Sent: 09 May 2012 14:45
To: U2 Users List
Subject: [U2] training material on LOCKS

Even though It is a foundational concept for any multi-user database
management, several times in my career I have come across seasoned MV
programmers who do not understand the basics of readu locks  (let alone
related topics like file locks, deadlocks, group locks, L-locks,
transactions, optimistic/pessimistic, lock table, monitoring   configuring.)

Has anyone ever put that specific material into some kind of training
module?  An article in Spectrum?  Infocus?  A conference session?

TIA for any leads,
cds

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


Re: [U2] ASCII ^010^013 Removal (LF CR)

2012-04-26 Thread Charles Stevenson

UV's CHANGE or EREPLACE are synonyms:

   EREPLACE(expression, substring, replacement [,occurrence [,begin] ] )
   CHANGE  (expression, substring, replacement [,occurrence [,begin] ] )

which pretty much mimic ED's Change command or Pick Editor's Replace.


UV's SWAP is different:
  SWAP variable1, variable2
   SWAP MAT variable1, MAT variable2

The SWAP statement interchanges the values in the variables you specify. 
variable
   can be any valid variable, for example, integers, numbers, 
characters, and so forth.


Swap is handy for things like this:

SWAP REC.A, REC.TO.PROCESS ; GOSUB PROCESS.REC ; SWAP REC.A, 
REC.TO.PROCESS
SWAP REC.B, REC.TO.PROCESS ; GOSUB PROCESS.REC ; SWAP REC.B, 
REC.TO.PROCESS


It is also cheap, because no actual data is moved in memory, just 
pointers to the strings exchanged in memory.


Others have discussed CONVERT.

cds

On 4/25/2012 7:07 PM, Tony Gravagno wrote:
I don't recall about which platforms this applies, but CONVERT is used 
to change a single character. CHANGE or SWAP (depending on platform) 
changes multiple chars: CONVERT SINGLE1 TO SINGLE2 IN VAR VAR = 
CHANGE(VAR,MULTI1,MULTI2) VAR = SWAP(VAR,MULTI1,MULTI2)


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


Re: [U2] ASCII ^010^013 Removal (LF CR)

2012-04-26 Thread Charles Stevenson
Why not, during program init, build the undesired char list once, then 
call CONVERT only once instead of hundreds of times each time 
THIS.MESSAGE needs adjusting?


   UNDESIRABLES = CHAR(127)
   FOR CHARACTER = 128 TO 249
  UNDESIRABLES:= CHAR(CHARACTER)
   NEXT CHARACTER

or for better performance (maybe in a standard $INCLUDE, where it 
doesn't clutter and has no impact on any pgm not referencing UNDESIRABLES):


   EQU UNDESIRABLES TO 
CHAR(127):CHAR(128):CHAR(129):CHAR(130):CHAR(131):CHAR(132):CHAR(133):CHAR(134):CHAR(135):CHAR(136):CHAR(137):CHAR(138):CHAR(139):CHAR(140):CHAR(141):CHAR(142):CHAR(143):CHAR(144):CHAR(145):CHAR(146):CHAR(147):CHAR(148):CHAR(149):CHAR(150):CHAR(151):CHAR(152):CHAR(153):CHAR(154):CHAR(155):CHAR(156):CHAR(157):CHAR(158):CHAR(159):CHAR(160):CHAR(161):CHAR(162):CHAR(163):CHAR(164):CHAR(165):CHAR(166):CHAR(167):CHAR(168):CHAR(169):CHAR(170):CHAR(171):CHAR(172):CHAR(173):CHAR(174):CHAR(175):CHAR(176):CHAR(177):CHAR(178):CHAR(179):CHAR(180):CHAR(181):CHAR(182):CHAR(183):CHAR(184):CHAR(185):CHAR(186):CHAR(187):CHAR(188):CHAR(189):CHAR(190):CHAR(191):CHAR(192):CHAR(193):CHAR(194):CHAR(195):CHAR(196):CHAR(197):CHAR(198):CHAR(199):CHAR(200):CHAR(201):CHAR(202):CHAR(203):CHAR(204):CHAR(205):CHAR(206):CHAR(207):CHAR(208):CHAR(209):CHAR(210):CHAR(211):CHAR(212):CHAR(213):CHAR(214):CHAR(215):CHAR(216):CHAR(217):CHAR(218):CHAR(219):CHAR(210):CHAR(211):CHAR(212):CHAR(213):CHAR(214):CHAR(215):CHAR(216):CHAR(217):CHAR(218):CHAR(219):CHAR(220):CHAR(221):CHAR(222):CHAR(223):CHAR(224):CHAR(225):CHAR(226):CHAR(227):CHAR(228):CHAR(229):CHAR(230):CHAR(231):CHAR(232):CHAR(233):CHAR(234):CHAR(235):CHAR(236):CHAR(237):CHAR(238):CHAR(239):CHAR(240):CHAR(241):CHAR(242):CHAR(243):CHAR(244):CHAR(245):CHAR(246):CHAR(247)


(The EQU method has the added advantage of the constant string being 
built at compile, whereas CHAR(CHARACTER) happens at runtime.)



Then, whenever needed do a single:

  CONVERT UNDESIRABLES TO '' IN THIS.MESSAGE



On 4/26/2012 8:19 AM, Bob Witney wrote:

I use this :

Bit of a sledgehammer but it works and it's quick too

FOR CHARACTER = 127 TO 249
CONVERT CHAR(CHARACTER) TO '' IN THIS.MESSAGE
 NEXT CHARACTER

Gets rid of all sorts of nasty webby characters :-)

Bob



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


Re: [U2] YYMMDD easy way?

2012-04-25 Thread Charles Stevenson


On my UV10.2.10 it behaves properly only with [2'',2''], as Richard  
Perry describe.


   OCONV( 16187, DYMD['',''] )   = 2012425
   OCONV( 16187, DYMD[2'',2''] ) = 120425

Like Rick, I find flavor does not matter.
On 4/24/2012 7:38 PM, Rick Nuckolls wrote:

That was my thought, but the flavor does not seem to affect it on my version.

-Rick

On Apr 24, 2012, at 5:36 PM, Richard Lewis wrote:


Or maybe it's my Pick flavor.

Richard Lewis

On Tue, Apr 24, 2012 at 6:27 PM, Rick Nuckollsr...@lynden.com  wrote:


Hmmm,

That must be a change at UV 11.  10.2.x still produces 2 digit months and
days without the extra 2’s.

-Rick


On Apr 24, 2012, at 5:21 PM, Richard Lewis wrote:


On UV 11.1.3 this leaves single-digit months as a single digit.

OCONV(TODAY, 'DYMD[2,2,2]') does the job correctly.  The brackets

allow

format modifiers to the parameters that follow the D conversion code, in
this case, 'YMD'.  The 2's specifiy how many characters to display, and

the

empty quotes specify the 'text' with which to separate the elements.
There's about 80 lines that describe it when you do HELP CONV D at TCL.

Richard Lewis


On Tue, Apr 24, 2012 at 6:08 PM, Rick Nuckollsr...@lynden.com  wrote:


Or, a bit more simply:

OCONV(TODAY, D2YMD[‘’ , ’’]”)
On Apr 24, 2012, at 4:58 PM, Perry Taylor wrote:


OCONV(TODAY, 'DYMD[4,2,2]')


- Original Message -
From: Lunt, Bruce [mailto:bl...@shaklee.com]
Sent: Tuesday, April 24, 2012 07:55 PM
To: 'U2 Users List'u2-users@listserver.u2ug.org
Subject: Re: [U2] YYMMDD easy way?

On Unidata try: OCONV(TODAY,'DYMD')

-Original Message-
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Wjhonson
Sent: Tuesday, April 24, 2012 4:52 PM
To: u2-users@listserver.u2ug.org
Subject: [U2] YYMMDD easy way?



YYMMDD = OCONV(TODAY,'DY2'):OCONV(TODAY,'DM'):OCONV(TODAY,'DD')

easier way to do this? ___




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


Re: [U2] YYMMDD easy way?

2012-04-25 Thread Charles Stevenson

ICONV works, too!

ICONV( 120425, DYMD[2'',2''] ) --  16187
OCONV( 16187,  DYMD[2'',2''] ) -- 120425

If you ICONV an invalid date, e.g. April 34th:

   ICONV( 120434, DYMD[2'',2''] ) --   and  STATUS()=1


I believe mathemeticians would call those inverse transformations.
I was going to say reflexive but that would mean the very same 
transformation applied 2x gets back to the original place.


cds

On 4/24/2012 6:58 PM, Perry Taylor wrote:

OCONV(TODAY, 'DYMD[4,2,2]')


- Original Message -
From: Lunt, Bruce [mailto:bl...@shaklee.com]
Sent: Tuesday, April 24, 2012 07:55 PM
To: 'U2 Users List'u2-users@listserver.u2ug.org
Subject: Re: [U2] YYMMDD easy way?

On Unidata try: OCONV(TODAY,'DYMD')

-Original Message-
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Wjhonson
Sent: Tuesday, April 24, 2012 4:52 PM
To: u2-users@listserver.u2ug.org
Subject: [U2] YYMMDD easy way?



YYMMDD = OCONV(TODAY,'DY2'):OCONV(TODAY,'DM'):OCONV(TODAY,'DD')

easier way to do this? ___



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


Re: [U2] YYMMDD easy way?

2012-04-25 Thread Charles Stevenson
Yes.  Many people don't know you can stack conversion codes, separated 
by value marks (like in Pick dict 8 correlatives).


But in this instance the DYMD[2'',2'',2] conversion discussed elsewhere 
in the thread has the advantage of being able to be used in ICONV, too,  
to get from YYMMDD  to  an internal date:


   ICONV( 120425, DYMD[2'',2''] ) --  16187


On 4/24/2012 6:57 PM, Martin Braid wrote:

OCONV(DATE(),D2YMD:@VM:MCN)


-Original Message-
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Wjhonson
Sent: 25 April 2012 00:52
To: u2-users@listserver.u2ug.org
Subject: [U2] YYMMDD easy way?


YYMMDD = OCONV(TODAY,'DY2'):OCONV(TODAY,'DM'):OCONV(TODAY,'DD')

easier way to do this?
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


Click
https://www.mailcontrol.com/sr/wQw0zmjPoHdJTZGyOCrrhg==
2eKQFaw1sOoTA9gaOpFHJJo+VEWAxlvp7UeaPLWGci2!g==  to report this email as
spam.


Epicor Software (UK) is a limited company registered in England  Wales.
Registration Number: 2338274.   Registered Office:  6th Floor, One London Wall, 
London EC2Y 5EB
This e-mail is for the use of the intended recipient(s) only. If you have 
received this e-mail in error, please notify the sender immediately and then 
delete it. If you are not the intended recipient, you must not use, disclose or 
distribute this e-mail without the author's prior permission. We have taken 
precautions to minimize the risk of transmitting software viruses, but we 
advise you to carry out your own virus checks on any attachment to this 
message. We cannot accept liability for any loss or damage caused by software 
viruses. Any views and/or opinions expressed in this e-mail are of the author 
only and do not represent the views of Epicor Software (UK) Limited or any 
other company within its group.


This message has been scanned for malware by Websense. www.websense.com
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users
.



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


Re: [U2] YYMMDD easy way?

2012-04-25 Thread Charles Stevenson

OBTW, on UniVerse both concatenations:

   D2YMD:@VM:MCN

are done at compile-time because all elements are constant strings.  
(@VM isn't really a variable, more like an EQUate.)


So if you stick Martin's construct inside a loop, there no added burden.


On 4/24/2012 6:57 PM, Martin Braid wrote:

OCONV(DATE(),D2YMD:@VM:MCN)


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


Re: [U2] YYMMDD easy way?

2012-04-25 Thread Charles Stevenson

me:  Win 2003
Perry? 10.2? 10.3?  Redhat?

I'd sure like to know what makes the difference.
I'd hate to get bit - again! - in a migration or upgrade.
The worst fall-out I ever had in an upgrade was when they changed an 
obscure FMT code without telling anyone.


On 4/25/2012 9:07 AM, Rick Nuckolls wrote:

If not flavor, then hardware/os?

(Sparc/Solaris)

-Rick

On Apr 25, 2012, at 5:26 AM, Charles Stevenson wrote:


On my UV10.2.10 it behaves properly only with [2'',2''], as Richard
Perry describe.

OCONV( 16187, DYMD['',''] )   = 2012425
OCONV( 16187, DYMD[2'',2''] ) = 120425

Like Rick, I find flavor does not matter.
On 4/24/2012 7:38 PM, Rick Nuckolls wrote:

That was my thought, but the flavor does not seem to affect it on my version.

-Rick

On Apr 24, 2012, at 5:36 PM, Richard Lewis wrote:


Or maybe it's my Pick flavor.

Richard Lewis

On Tue, Apr 24, 2012 at 6:27 PM, Rick Nuckollsr...@lynden.com   wrote:


Hmmm,

That must be a change at UV 11.  10.2.x still produces 2 digit months and
days without the extra 2’s.

-Rick


On Apr 24, 2012, at 5:21 PM, Richard Lewis wrote:


On UV 11.1.3 this leaves single-digit months as a single digit.

OCONV(TODAY, 'DYMD[2,2,2]') does the job correctly.  The brackets

allow

format modifiers to the parameters that follow the D conversion code, in
this case, 'YMD'.  The 2's specifiy how many characters to display, and

the

empty quotes specify the 'text' with which to separate the elements.
There's about 80 lines that describe it when you do HELP CONV D at TCL.

Richard Lewis


On Tue, Apr 24, 2012 at 6:08 PM, Rick Nuckollsr...@lynden.com   wrote:


Or, a bit more simply:

OCONV(TODAY, D2YMD[‘’ , ’’]”)
On Apr 24, 2012, at 4:58 PM, Perry Taylor wrote:


OCONV(TODAY, 'DYMD[4,2,2]')


- Original Message -
From: Lunt, Bruce [mailto:bl...@shaklee.com]
Sent: Tuesday, April 24, 2012 07:55 PM
To: 'U2 Users List'u2-users@listserver.u2ug.org
Subject: Re: [U2] YYMMDD easy way?

On Unidata try: OCONV(TODAY,'DYMD')

-Original Message-
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Wjhonson
Sent: Tuesday, April 24, 2012 4:52 PM
To: u2-users@listserver.u2ug.org
Subject: [U2] YYMMDD easy way?



YYMMDD = OCONV(TODAY,'DY2'):OCONV(TODAY,'DM'):OCONV(TODAY,'DD')

easier way to do this? ___



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

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




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


Re: [U2] EXIT ; EXIT inside a loop

2012-04-22 Thread Charles Stevenson

Once more,  VLIST answers the question:

1:   FOR A1 = 1 TO X
1 0 : 0F8 move   0  = A1
1 6 : 098 forincrA1 X 1 00058:

2:  FOR A2 = 1 TO Y
2 00014 : 0F8 move   0  = A2
2 0001A : 098 forincrA2 Y 1 00050:

3: * little twisted logic

4: IF G = H THEN EXIT ; EXIT
4 00028 : 06E eq G H  = $R0
4 00030 : 2DE testfw $R0 00048:
4 00038 : 0C2 jump   00050: -   1st EXIT.
4 00040 : 0C2 jump   00050: -  2nd EXIST.  hey, same 
jump as 1st!


   (but would nexer be reached. we already jumped.)

5: * twisted little logic

6:  NEXT A2
6 00048 : 0C2 jump   0001A:

7:  * twisting little logic

8:   NEXT A1 --- 0050x where that exit takes us.
8 00050 : 0C2 jump   6:


9:   * little twisting logic
00010 00058 : 190 stop

On 4/19/2012 3:35 PM, Dave Laansma wrote:

Given:
FOR A1 = 1 TO X
   FOR A2 = 1 TO Y
 little twisted logic
 IF G = H THEN EXIT ; EXIT
 twisted little logic
   NEXT A2
   twisting little logic
NEXT A1
little twisting logic

The question is, if G = H, will the two EXIT commands drop out of both
loops, skipping BOTHtwisted little logic  andtwisting little logic,
and resume execution atlittle twisting logic  ?

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


Re: [U2] Case Statement with only two cases

2012-04-20 Thread Charles Stevenson

A respectful correction, Brian.

On 4/20/2012 4:50 AM, Brian Leach wrote:

it's all the same to the compiler.
-Original Message-
BEGIN CASE
   CASE A = TEST; GOSUB DO.SOMETHING
   CASE 1; GOSUB DO.SOMETHING.ELSE
END CASE
versus this
IF A = TEST THEN GOSUB DO.SOMETHING ELSE GOSUB DO.SOMETHING.ELSE

-

Since we seem to be finding every nit in the bottom of this empty 
barrel, here's one more.

There are 2 compiler difference as shown by VLIST (UV10.2):

1: BEGIN CASE

2:CASE A = TEST; GOSUB DO.SOMETHING
2 0 : 06E eq A TEST  = $R0
2 8 : 2DE testfw $R0 00020:
2 00010 : 0A4 gosub  00060:


3:CASE 1; GOSUB DO.SOMETHING.ELSE
3 00018 : 0C2 jump   00038:
3 00020 : 2DE testfw 1 00038: -- Extra 
worthless test

3 00028 : 0A4 gosub  00062:

4: END CASE
4 00030 : 0C2 jump   00038: -- Extra worthless 
jump (to next line)

  
(Source lineup is goofy.  This jump is really part

   of source line 3.   RAID is confusing, too.

   A 
discussion for a different thread.)

5: IF A = TEST THEN GOSUB DO.SOMETHING ELSE GOSUB DO.SOMETHING.ELSE
5 00038 : 06E eq A TEST  = $R0
5 00040 : 2DE testfw $R0 00058:
5 00048 : 0A4 gosub  00060:
5 00050 : 0C2 jump   00060:
5 00058 : 0A4 gosub  00062:

6: STOP
6 00060 : 190 stop


With the speed of today's machines it would be hard to find a place 
where that performance makes a difference.


Rocket could theoretically clean up both (or either independently) if 
the compiler was smart enough:


1. to know that a logical test outcome was predestined at compile time 
(It already does that sort of thing in other situations.).  Then it 
could  compile only 1 of the 2 paths the testfw takes.  (e.g. 0020x).  
Same for IF,  WHILE, or UNTIL constructs.


2. To recognize the final CASE before the END CASE never needs to jump 
(e.g., 0030x).


I wonder if we've already wasted more electrical  biological energy by 
me writing this email, dispersing it around the globe, and you reading 
it, than all the machine cycles wasted executing the 2 worthless tests 
in all the object scattered around the universe that Rocket could 
theoretically optimize.


cds


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


Re: [U2] Unwanted Duplicated

2012-04-06 Thread Charles Stevenson
If these are long lists, it may be best to save the list with its 
duplicates, shell out and execute unix command sort -u on  the saved lists.

No database  i/o.
Unless UD has some feature beyond UV's at this particular point.
Note that sort -u output is sorted, but not necessarily by the same 
algorithm as UD or UV uses.


cds

On 4/6/2012 8:32 AM, Greg Coelho wrote:

Thanks Jeff!



From:   Jeff Buterajbut...@hampshire.edu
To: u2-users@listserver.u2ug.org
Date:   04/06/2012 09:28 AM
Subject:Re: [U2] Unwanted Duplicated
Sent by:u2-users-boun...@listserver.u2ug.org



   On 04/06/12 09:10, Greg Coelho wrote:

John,

Thanks for the response.  I on UniData.  I was thinking that perhaps

this

was the result of a UDT.OPTION setting...  Oh!  I think I've just come
across the answer - please see below:

When performing a SELECT statement that employs the SAVING UNIQUE

keyword

against a multi-valued field - the resulting list will contain two
valuemarks on each line with a number in between after the saved value.

An

example is useful to demonstrate:

:SELECT STUDENT.TERMS SAVING UNIQUE STTR.STUDENT.ACAD.CRED SAMPLE 100
SAVE.LIST LIST.TEST
:AE SAVEDLISTS LIST.TEST000
Top of LIST.TEST000 in SAVEDLISTS, 345 lines, 4,093 characters.
001: ý1ý1
002: 1003926ý1ý1
003: 1003927ý2ý1
004: 1003928ý3ý1
005: 1024941ý1ý1
006: 1024942ý2ý1
007: 1024943ý3ý1
008: 1036527ý1ý1
009: 1036528ý2ý1
010: 1036529ý3ý1

Correct - this is normal behavior.  The way to remove these is to
GET.LIST and then perform a select against the file for which these are
keys and save it again.

We dealt with this years ago in a similar situation.

So you would followup with

GET.LIST LIST.TEST
SELECT STUDENT.ACAD.CRED
SAVE.LIST LIST.TEST

and your list will now be free of the @VM garbage.




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


Re: [U2] Universe: IF statements in parargraphs don't work anymore

2012-04-04 Thread Charles Stevenson
One way around the UPDATE.ACCOUNT problem that Brian mentions is to 
invent your own flavour (Your own sub-file under the Pick-style 
multi-level file under UV/NEWACC).
Massage that once per UV upgrade, then apply it to all VOCs that need 
protecting or customizing.


Personally,  I wish it was much easier  more practical to make a VOCs 
read-only.
Same for DICTs, where next.available records and EVAL typically make 
read-only difficult.


cds

On 4/4/2012 5:21 AM, Brian Leach wrote:

Jeff is right in theory though you would need to be careful whenever you run
an upgrade account.

If you really want to secure the VOC you would also need to lock out all
other forms of access such as UniObjects: you can easily create a little
VBScript to connect through with this and read/write/delete directly. And if
anyone can ever get to shell, you have the UVread, UVwrite and UVdelete
executables.

And if you make the account a SQL schema, the VOC is not a SQL table so you
can't use grant permissions.

Brian


-Original Message-
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Jeff Porterfield
Sent: 03 April 2012 23:04
To: u2-users@listserver.u2ug.org
Subject: Re: [U2] Universe: IF statements in parargraphs don't work anymore

Louie Bergsagellouiebergsagelat  gmail.com  writes:


No, that works fine.  You only need a label if you want to skip some

lines.

Turns out somebody had deleted the VOC equal sign record =.

Which brings up a good security question, how do you prevent someone
from deleting things?  Put shell around ED and DELETE?
It would be a bummer to have to make VOC read-only.

On Thu, Jun 5, 2008 at 12:53 PM, Ron Hutchingsron_hutchingsat
hotmail.com
wrote:


On Line 6 don't you need to go to a label to execute a command
instead of trying to directly execute it?
Check into the Security Subroutines section of the Administrators 
Guide. 1) Make a temporary copy of ED in your VOC, call it ED.BAK. 
This is your backdoor in case of problems. I would also have a 
separate account with a pointer to the main account's VOC. This 
account you can lock with a simple paragraph that says if @LOGNAME 
isn't you, LOGOUT. 2) Write a security subroutine that conforms to 
the specs given in Chapter 8 of the Administrators guide. Catalog it 
in the global catalog. 2) Copy the verbs you want to secure, 
including ED, into your VOCLIB. 3) Change the verbs in the VOC to 
Remote pointers to your VOCLIB, and add the name of your security 
routine to line 4. (I might suggest testing the R pointers before 
applying the security routine.) 4) Once you're sure your security is 
working as planned, and that you can use the ED program you've 
secured, then remove your back door ED.BAK. Remember, you can still 
fix the VOC from your other account if you manage to lock yourself out. 


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


Re: [U2] Record lock

2012-03-27 Thread Charles Stevenson

Nicholas ( any newbies listening in),

Just to make sure all bases are covered:

1. LIST.READU's EVERY keyword.
Besides showing group locks,  it will also, at the very end, show who is 
waiting on a lock.
If there are 2 lines where waiter  lock-holder are reversed on the 2nd 
line, you have a deadlock.


2. There is also a deadlock daemon that you can run or not run as you wish.
If you turn it off,  closely monitor it manually, you can find the 
offending code.  Both processes will hang until you find it  log one off.
PORT.STATUS can then tell you what code is being executed when the 
deadlock hit the 2 offending processes.

PORT.STATUS PID [pid] LAYER.STACK is especially useful.

2b. The deadlock daemon's log can give you a history of when deadlocks 
were found.

My last 2 entries were last June  August:
  Wed Jun 01 15:49:07 2011 - Deadlock detected (victim User 61023)
  Mon Aug 01 17:05:57 2011 - Deadlock detected (victim User 5380)

3. If you have writes without explicit readus preceding them, UV will 
wait for a readu lock behind the scenes, but it won't tell you about it 
in the LIST.READU waiter section.  You can change the default behaviour.

I think deadlock daemon handles this, but I don't recall for certain.


On 3/26/2012 2:19 AM, Namacha, N. (Nicholas) wrote:

  The issue here is to try and monitor for deadlocks.


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


Re: [U2] Turn a device and inode into file name

2012-03-17 Thread Charles Stevenson

Diane -

Here's a short LIST.READU envelope that replaces dev/inode with filenames.

Look up these UV-supplied tools that tie device  Inode to the filename:
   ACCOUNT.FILE.STATS
   LIST.FILE.STATS
   STAT.FILE
   UNIVERSE.STAT.FILE

It relies on regularly running ACCOUNT.FILE.STATS to keep STAT.FILE up 
to date.
I added an index to UV's vanilla STAT.FILE and use it to extract the 
filename.

See lines 3  30:

01:   PROGRAM SHOW.READU
02: * Abbreviated LIST.READU, but with filenames replacing device/inode.
03: * Relies on indexed I-desc DICT STAT.FILE INODE.DEV: 
FILEINODE:.:FILEDEV

04:
05: $COPYRIGHT (c) 2012 Charles D. Stevenson. Permission to use with 
attribution granted.

06: $OPTIONS DEFAULT
07:
08:   SENTENCE.OPTS = @SENTENCE[' ',2, 999 ]
09:   BEGIN CASE
10:  CASE NOT( LEN( SENTENCE.OPTS ))   ; * usual case
11: EXECUTE 'LIST.READU EVERY' CAPTURING LRDU
12: LOOP ; * ignore Group lock section
13: UNTIL REMOVE( LRDU, MORE) = Active Record Locks:
14: WHILE MORE
15: REPEAT
16: CRT Active Record Locks:
17:  CASE SENTENCE.OPTS = SIMPLE   ; * LIST.READU's default
18: EXECUTE 'LIST.READU' CAPTURING LRDU
19:  CASE @TRUE ; l * any valid LIST.READU syntax
20: EXECUTE 'LIST.READU ': SENTENCE.OPTS CAPTURING LRDU
21:   END CASE
22:   OPEN 'STAT.FILE' TO F.STAT ELSE STOP 201, 'STAT.FILE'
23:   MORE = @TRUE
24:   LOOP WHILE MORE
25:  LINE = REMOVE( LRDU, MORE )
26:  TRIMMED = TRIM( LINE )
27:  DEV = TRIMMED[ ' ', 1, 1 ]
28:  INODE = TRIMMED[ ' ', 2, 1 ]
29:  IF LEN( DEV ) ! LEN( INODE ) THEN
30: SELECTINDEX 'INODE.DEV', INODE:'.':DEV FROM F.STAT TO 9
31: READNEXT STAT.ID FROM 9 THEN
32:READV FILENAME FROM F.STAT, STAT.ID, 1 THEN
33:   LINE[1,29] = FILENAME '29.L#29'
34:END
35: END
36:  END
37:  CRT LINE
38:   REPEAT
39:   RETURN
40:END

Catalogue it  run as a verb.
Contact me if you have questions.

cds

On 3/16/2012 6:03 PM, dia...@aptron.com wrote:
I swear I wrote a new version of LIST.READU at one time where I dealt 
with this and listed the file where the item was locked, but I can't 
find it anywhere. And now, of course, I'm obsessed with finding it. If 
I find it I'll post it. -Dianne


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


Re: [U2] Turn a device and inode into file name

2012-03-17 Thread Charles Stevenson
Better yet,  write an i-descriptor-friendly function to extract STATUS  
FILEINFO info, then use it in DICT VOC I-descripters to  use with SELECT 
 LIST directly.


On 3/16/2012 5:00 PM, LeRoy Dreyfuss wrote:

A program that uses either the FILEINFO() function or the STATUS statement will 
produce what you need, and should work cross-platform. Select against the VOC 
and filter out what you don't need, i.e. remote files, Q-pointers etc.

Regards,

LeRoy


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


Re: [U2] Global Catalog: Universe vs. Unidata

2012-03-09 Thread Charles Stevenson

The concept is similar,  but there's an additional step.

See UV 11.1 Administering Universe pdF,  Chapter 18,
 UniAdmin pdf, Chapter 16,  Managing Catalog Shared Menu.
Most UV shops in my experience don't bother with it, but I think it's a 
good tool and not difficult to master.


cds

On 3/9/2012 6:02 PM, Kevin King wrote:

On Unidata, globally cataloguing a program causes it to run in a separate
memory space so that if 10 users are running the program, only one copy of
the routine is loaded into memory.  From the docs: Multiple users can run
globally cataloged programs simultaneously — UniData brings one copy of the
program into shared memory.

Is the same true for globally cataloguing on Universe?
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users




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


Re: [U2] I-Type question in PH

2011-11-29 Thread Charles Stevenson
You can also get elapsed time by subtracting that ID date-time stamp 
from the os's date-time-modified stamp, which is when the job ended. (if 
the job writes to the PH log as it ends.)


On 11/29/2011 4:01 PM, John Thompson wrote:

Yep... need more sleep.  Thanks.

On Tue, Nov 29, 2011 at 4:58 PM, Wjhonsonwjhon...@aol.com  wrote:


Third field, not second field
FIELD(@ID,'_',3)









-Original Message-
From: John Thompsonjthompson...@gmail.com
To: U2 Users Listu2-users@listserver.u2ug.org
Sent: Tue, Nov 29, 2011 1:54 pm
Subject: [U2] I-Type question inPH


So I thought I would build an I-type to get the date of thePH  items in
niverse so I could more easily purge them...
The item id looks like so:
AUTOMATED.UPDATE.REO_23400_15641
The friendly manual says that the item id is:
hantomverb_time_date
So my I-type looks like so:
001 I
02 FIELD(@ID,'_',2)
03
04 Date
05 10
06 R
And of course, I have not put in the conversion code yet...
The output of the I-type is this:
ID..
Date..
AUTOMATED.UPDATE.REO_23400_15641 23400.0
What am I missing?
Shouldn't Date be 15641?
--
ohn Thompson
__
2-Users mailing list
2-us...@listserver.u2ug.org
ttp://listserver.u2ug.org/mailman/listinfo/u2-users

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






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


Re: [U2] [UV] Suppress not found in RetrieVe

2011-11-16 Thread Charles Stevenson

That has been a longstanding UV enhancement request.
I don't understand what their aversion is.

You can surround the select with HUSH ON, HUSH OFF.

Make sure VOC HUSH 4 contains a K for Keep select list active.
Example:

   PA  or in a pgm:
   SELECT VOC  CMDS = SELECT VOC
   HUSH ON CMDS-1= HUSH ON
   SELECT NEWACC   CMDS-1 = SELECT NEWACC NOPAGE
   HUSH OFFCMDS-1 = HUSH OFF
   COUNT NEWACCCMDS-1 = COUNT NEWACC
   EXECUTE CMDS

Tony  David,

There are plenty of reasons you might have this situation besides 
unstable data that shouldbe be held constant for the duration of a report.


And even with unstable data, there are plenty of reas
An example:
   SELECT FILE1 SAVING FOREIGN.KEY
   SELECT FILE2 REQUIRE.SELECT

Or a select list built one month and processed the next.
Or say you have a fast moving, volatile file where you have multiple 
phantoms processing the same inbox.


The fact that some records appear  disappear is just fine, and doesn't 
necessarily warrant a panic screenS full of messages about not being 
able to find things in a select list.


UD figured that out.  I wish they'd do the same with UV.



On 11/15/2011 1:52 PM, Perry Taylor wrote:

That's the idea.  The problem I have is records are being deleted from the file 
at all times of the day.  What happens is the initial select picks up records 
that get deleted before they are output.  I was hoping there was some option 
that would suppress these messages.  If there is not I'll probably have to 
rewrite this query in BASIC where I have control.

Perry

-Original Message-
From: u2-users-boun...@listserver.u2ug.org 
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Wjhonson
Sent: Tuesday, November 15, 2011 2:01 PM
To: u2-users@listserver.u2ug.org
Subject: Re: [U2] [UV] Suppress not found in RetrieVe


I think he means as in

SELECT VOC SAMPLE 100
LIST CUSTOMER
'A' not found
'F2' not found


And I don't know a way to suppress the messages, but I know a way to not GET 
the messages :)
Try this

SELECT VOC SAMPLE 100
SELECT CUSTOMER
do other selects or other processing now and you won't get that message




-Original Message-
From: John Thompsonjthompson...@gmail.com
To: U2 Users Listu2-users@listserver.u2ug.org
Sent: Tue, Nov 15, 2011 10:57 am
Subject: Re: [U2] [UV] Suppress not found in RetrieVe


Do you mean on a SELECT or LIST?  (Maybe I'm asking the obvious)
On Tue, Nov 15, 2011 at 1:43 PM, Perry Taylorperry.tay...@zirmed.comwrote:

Does anyone know of a RetrieVe option that will suppress the ' not

  found' messages?

  Thanks.

  Perry

  Perry Taylor
  Senior MV Architect
  ZirMed
  888 West Market Street, Suite 400
  Louisville, KY 40202
  www.zirmed.comhttp://www.zirmed.com/





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


  1   2   >