Re: [U2] Trouble sending reply emails

2010-03-25 Thread Mats Carlid

Dianne

are You sure that the bounce comes from the listserver?

( To check that select show all headers and look for
 @listserver.u2ug.org  in any of the Received - headers.)

If they bounce eralier ask Your mail admin.

-- mats


Dianne Ackerman skrev:
Does anyone have any idea why I would be getting the following error 
message bounced to me when I reply to a message on the list?  To send 
a message to the list, I have to initiate the message, I can't seem to 
reply.  Thanks.

-Dianne


The message's content type was not explicitly allowed


___
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] Mapping files.

2009-11-30 Thread Mats Carlid


To bad,  I used the same method long time ago.
'The only difference'  was  that it was universe files
on two unix machines   ;-)

If the gotcha got me ? Sure.

-- mats


Paul Parkinson skrev:

Thanks Mas, tried that didn't work

Kind Regards
Paul Parkinson
Director, Ideal Business Services Ltd
mob: +1 758 721 4487 (Caribbean)
skype: 0161 408 2098
eml: pparkin...@idealnet.co.uk 
-Original Message-

From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Mats Carlid
Sent: 30 November 2009 11:46
To: U2 Users List
Subject: Re: [U2] Mapping files.


Mount  \\serverB\unidata  as disk Z say
and make the voc entry:

F
Z:filenamn
Z:D_filename


BUT  there is a real  gotcha:
Don't even think about updating that file from server A
as there's no common lock mechanism.

-- mats



Paul Parkinson skrev:
  

I have 2 servers both running Unidata 7.1 on Windows 2003.  In an
application on server A I want to access data held in an application on
server B

 


I have tried the voc entry in the application on serverA

 


001: F

002: \\serverB\unidata\filename file:///\\serverB\unidata\filename 

003: \\serverB\unidata\D_filename file:///\\serverB\unidata\D_filename 

 


I have also tried replacing serverB in the above with the IP address

 


But I get the error open file error no such file.

 


Anyone know what I should be doing?

 


Paul Parkinson

 

 

 


___
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



  


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


Re: [U2] Universe web connectivity

2009-09-24 Thread Mats Carlid


We let  Apache (inearlier days Netscape web server)  use the 
CGI-interface to call
a tiny ksh  that calls universe with the POST-ed form in raw format - 
works with GET too, today.
There a relatively small basic routine parses it and places the info in 
named common.
One always present form field tells it what routine to call. All output 
is collected in

a string that is returned to the ksh and apache, and there it is.

Has worked flawlessly for over 10 years.

And of course there is a fair number of helper functions
e.g.  make the html for an input field from the info in the uv dictionary
with some options.

Why our own?  AFAIK there wasn't anything usefull out there in1998
when we started programming seriously.
Maybe there was but AFAIKThen there wasn't.

Drawbacks?
It starts a universe process for each call.

--mats


Matthew Day skrev:

Hi,

We currently have a system with a VB6 front end and use Universe for the 
database and business logic. We are looking to develop a web solution for our 
product.

What are people using to inteface universe with the web, and what are your 
experiences ( both good and bad ) with the route you have chosen.

Thanks,
Matt



  
___

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] Automatic Invoice - PO Matching Software

2008-11-17 Thread Mats Carlid
Tony,

obvious or not - I think You missed something.

Electronic invoices  are common goods in some coutnries.
Here in Sweden even for personal invoices - e.g. I get
my electricity bill as a message when i log in to my bank.

Business is moving on and some large companies will not
accept invoices on paper beginning  this new year.

and now it's coming down under...

-- mats

Tony G skrev:
 From: Hans Morawa
 We are looking for a electronic invoice processing system that
 
 matches
   
 invoice with purchase orders automatically and works on/or with
 
 a
   
 UniVerse platform and is available in Australia.
 

 ( Really hoping I'm not missing something obvious. *gulp* )

 Hans, I don't understand the request.  Are you looking for bar
 coding or image processing so that you can scan documents and
 have them match up with other documents?  Can you give us an
 example of your business flow so that we can recommend something
 that fits?

 Tony Gravagno
 Nebula Research and Development
 TG@ remove.pleaseNebula-RnD.com
 Nebula RD sells mv.NET and other Pick/MultiValue products
 worldwide,
 and provides related development and training services
 ---
 u2-users mailing list
 u2-users@listserver.u2ug.org
 To unsubscribe please visit http://listserver.u2ug.org/
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] Normal SELECT behavior? [UD]

2008-11-05 Thread Mats Carlid

A possible solution :
LIST POH F1 WITH  EVAL '*':F1 = '*000700'

works in universe that has no udt.options to set.
( unidata has EVAL hasn't it ?)

-- mats



David A. Green skrev:

Is this normal SELECT behavior?  I get the same results when I use NO.INDEX.
Is there an UDT.OPTIONS I can use?  I also noticed using  700 selected the
same records when the F1 was Right Justified but not when it was Left
Justified.  But the leading zeros were an issue either way.

LIST POH F1 WITH F1 = 000700 19:26:49 Nov 03 2008 1
POH... 01 Vendor Number
   
7110  00700

7120   0700
7130700
9262700
4 records listed

Thanks,
David A. Green
www.dagconsulting.com
(480) 813-1725
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/

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


Re: [U2] UV 10.1 catdir problems

2008-09-03 Thread Mats Carlid

Kevin King skrev:

I have a client running UV 10.1 on a SuSE Linux box.  Every now and again,
for no apparent reason, one of the items gets removed or hammered from the
uv/catdir directory.  I don't specifically know whether it's being removed
or hammered because when it happens people are usually pretty freaked out
and getting it fixed (via recataloguing) is more the issue than determining
why it's happening.  But here, on the backside of the most recent call on
this issue, I see something interesting... the time stamps are changing on
selected items in the catdir, and specfiically on the items that have
historically manifested this problem!

Is this normal?  Does Universe change the ls -l time on the catdir items or
should I be on the lookout for some program doing this?


uv  does maintain a usage count in the catdir files.

-- mats

  A couple of
examples: $50BB, modified a second ago.  -EXPAND, modified right around the
same time.  Another ls -l and ... yep, the times are different.  I'd say it
could be a user, but the user associated with these items is me and I've
verified that I'm the only me on this box right now and I'm not doing it.

This particular application was home grown over the past 20 some years and
very little of it is catalogued.  Instead Most of it is run via RUN BP
.  Not sure why these catdir records are disappearing or getting horked,
but it's definitely upsetting the user.  Is this time stamp thing possibly a
clue or maybe only a red herring?

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

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


Re: [U2] UV 10.1 catdir problems

2008-09-03 Thread Mats Carlid

Kevin King skrev:

I have a client running UV 10.1 on a SuSE Linux box.  Every now and again,
for no apparent reason, one of the items gets removed or hammered from the
uv/catdir directory.  I don't specifically know whether it's being removed
or hammered because when it happens people are usually pretty freaked out
and getting it fixed (via recataloguing) is more the issue than determining
why it's happening.  But here, on the backside of the most recent call on
this issue, I see something interesting... the time stamps are changing on
selected items in the catdir, and specfiically on the items that have
historically manifested this problem!

Is this normal?  Does Universe change the ls -l time on the catdir items or
should I be on the lookout for some program doing this?


uv  does maintain a usage count in the catdir files,

that is shown as number of calls in the MAP file.


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


Re: [U2] call mysub vs. call @mysub

2008-08-27 Thread Mats Carlid

The catalog is quite different in univers vs unidata.

As for universe you need to place the cataloged
routine in shared memory  to get better speed.
Then there's no need to read it from disk  - not even at the
initial call. Also all users share one copy of it
thus saving memory - if that's worth anything
given todays memory sizes.

Global and 'normal' cataloging both places the
routines in the same  ../uc/catdir  driectory to be
read when needed, globals as *routine mormal ones
as *account*routine.
As opposed to local cataloging that only makes
a VOC entry to the file where the routine resides.
( You may also use  $  instead of  (the first only?) * )

In unidata  ( I think)  global cataloging places the
routine in shared memory and thus will be faster
on first call.

-- mats



Ross Ferris skrev:


Does this hold true across U2? And/or do you get same sort of benefit
from global catalog?

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


Re: [!! SPAM] Re: [U2] RE:french characters

2008-08-26 Thread Mats Carlid

Irina,


the problem I think You have is that the file has characters like
char(233)  for e-acute  but Your terminal(emulator) or port strips
the leading bit making it the 7bit character  char(105)  = i  on the 
display.

( 105 = 233-128)
((  the 233=i  is for the iso-8859-1 we use  - french may be different ))

Thus  check Your PTERM settings by
PTERM DISPLAY

make sure it has  DATA=8 and  NONE  and  -STRIP on the protocol line.
( wich means 8bit characters,  no  check digit and dond' strip  bit 0 )
If  this doesn't help You'll have to


To verify what the characters aren't destroyed in the file.
In unix  use
od -cx filename |  more

in universe  ED  in up-arrow mode will show the decimal value of each
character  127.

When You have identified the value of each character used
use  CHAR(nnn) in Your program  when You build your
search pattern.
( You may find the iso encoding schemes on the web too ...
if You can weed out what they used... )

HTH

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


Re: [U2] RE:french characters

2008-08-25 Thread Mats Carlid

Hi Irina,

AFAIK readseq does not change any characters  ( at least for universe ).

But Your terminal(emulator) will - unless You specify the same character 
mapping

as the original data.

If on unix check that Your stty ( or PTERM if in uv ) settings speicify 
8-bit.


Also  whatever You do You'll always have a problem with
char(253) through char(255) that universe use as subvalue,value,field 
and item  marks.


If You don't know the encoding   try ISO-8859-1.


((   I have no experience with french data - only swedish wich have
other but fewer accented and umlaut letters.
  ))

HTH
-- mats


Irina Lissok skrev:

 We have a problem with FRENCH characters.

Using READSEQ to read the record from the file which contains FRENCH
characters.

It reads in  but French characters has been substituted with blanks or
with legitimate English characters.

When we are trying to load this data into xml file with WRITEBLK it puts
initial French characters in it and xml file can not be opened.

Our approach was to read data in and represent it in hex to be able to
recognize French characters, but it won't work because as a result from
READSEQ we've already had some kind of interpretation, not initial data.



Is anyone have met the same problem and knows how to deal with it.



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

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


Re: [U2] Dynamic Array oddity very useful

2008-08-19 Thread Mats Carlid

That is then flavour  dependent  -  in  information flavour there
is a zero element , that's  where the overflowing elements go
( if any)  in a matparse.

-- mats 


Martin Phillips skrev:

Hi Dennis,


So A0 = X  is a way quicker way of writing A = X : @fm : A


I'm not sure that this is a safe assumption. I have taken a quick look 
at the documentation for various mv products and they tend not to 
define what will happen.


Trying your example with UV does not produce the result that you quote.

I think that the real issue here is that there is no field zero. It is 
up to the different products to determine what they do in this case as 
there doesn't appear to be an agreed behaviour.

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


Re: [U2] Dynamic Array oddity very useful

2008-08-19 Thread Mats Carlid
Anthony Youngman skrev:
 I think you're muddling dynamic and dimensioned arrays - a dynamic array 
 can't have an element 0 :-)
   
Blushing:yes I did.
-- mats
 Sounds like somebody, when writing jBase, saw the feature of -1 and 
 thought they'd be clever with 0.

 Cheers,
 Wol

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Mats Carlid
 Sent: 19 August 2008 14:53
 To: u2-users@listserver.u2ug.org
 Subject: Re: [U2] Dynamic Array oddity very useful

 That is then flavour  dependent  -  in  information flavour there
 is a zero element , that's  where the overflowing elements go
 ( if any)  in a matparse.

 -- mats

 Martin Phillips skrev:
   
 Hi Dennis,

 
 So A0 = X  is a way quicker way of writing A = X : @fm : A
   
 I'm not sure that this is a safe assumption. I have taken a quick look
 at the documentation for various mv products and they tend not to
 define what will happen.

 Trying your example with UV does not produce the result that you quote.

 I think that the real issue here is that there is no field zero. It is
 up to the different products to determine what they do in this case as
 there doesn't appear to be an agreed behaviour.
 
 ---
 u2-users mailing list
 u2-users@listserver.u2ug.org
 To unsubscribe please visit http://listserver.u2ug.org/
 ---
 u2-users mailing list
 u2-users@listserver.u2ug.org
 To unsubscribe please visit http://listserver.u2ug.org/
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] uniobjects help needed!

2008-08-06 Thread Mats Carlid

Doug Chanco skrev:

Hello all,
 I was joking about the voodoo chants when I first posted but several
days later and little progress made I am now seriously willing to consider
any chants anyone knows.

on a more serious note does anyone know if it's possible to talk directly
to a uvrpc daemon? (uniobjects)   I know you can with smtp and other socket
programs if you know the language/syntax, so I think it should be possible
with uvrpc (uniobjects).  Any suggestions/ideas on how (if possible) to do
this would be appreciated!

snipped


In general to talk to a server daemon You can connect with a
telnet client ( e.g. a terminal emulator)  giving it the  port number
of the service You want.

E.g.  (  in  solaris ):
telnet  IPAddressOfMyServer 80
GET  /index.html

would (normally) get You Your html  start page

The HTTP protocol is connectionless so the connection will be closed
after each request.  The same may be true for uvrpc as well.


Can't help with the uvrpc protocol syntax - sorry!

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


Re: [U2] File pointer question

2008-06-13 Thread Mats Carlid
Nice idea  -

but  change  @WHO  to  @PATH  to catch the situation that
you have two accounts with the same name under different paths.

When we were bit by this - as PI newbees in the early 80's
- we just banned logto's and never used'em since.

-- mats


[EMAIL PROTECTED] skrev:
 I was bit by that one a long while ago. 

 If that's the case, best to do something like the following to make sure the 
 info is relevant to the current account.

 COMMON /PGMNAME/ FILE.POINTER,PGMNAME.INIT
 IF NOT(ASSIGNED(PGMNAME.INIT)) THEN PGMNAME.INIT=''
 IF [EMAIL PROTECTED] THEN
  PGMNAME.INIT=''
  OPEN '',FILE.NAME TO FILE.POINTER ELSE WHATEVER
  [EMAIL PROTECTED]
 END


 -- Original message -- 
 From: Mats Carlid [EMAIL PROTECTED] 

   
 Another possibility is that You opened the file in the other 
 directory and then LOGTO'ed the current. 
 Especially watch out for file pointers kept in common - 
 if You use them the open and logto may have been done 
 outside the current program. 
 -- mats 

 Jeff Fitzgerald skrev: 
 
 If you are on a UNIX system the file may be a symbolic link to a file in 
 another account. If this is the case, it is a really bad idea in my 
 opinion. (1) It is very confusing! (2) It can cause problems, 
 especially on UniVerse, when the file is resized. If you find the file 
 is a symbolic link it would probably be worth your while to get rid of 
 the link and modify the F pointer to point to the real location. 

 HTH 

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


 -Original Message- 
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On Behalf Of T Stokes 
 Sent: Wednesday, June 11, 2008 4:22 PM 
 To: u2-users@listserver.u2ug.org 
 Subject: [U2] File pointer question 

 I have a file that is a F pointer in the VOC yet when a BASIC STATUS is 
 ran on the file it points to a file in another account. 
 Have not been able to locate the reason for this. I am sure it is 
 something simple. 
 The VOC entry look like this 
 F 
 FILENAME 
 D_FILENAME 

 The results from STATUS looks like this D:\directory other than the 
 directory I am current located\FILENAME 
   
 --- 
 u2-users mailing list 
 u2-users@listserver.u2ug.org 
 To unsubscribe please visit http://listserver.u2ug.org/ 
 
 ---
 u2-users mailing list
 u2-users@listserver.u2ug.org
 To unsubscribe please visit http://listserver.u2ug.org/
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] HP 4250dtn printer using PCL commands from Universe Basic program with hex conversion codes ... Tray 3 selection not working

2008-05-14 Thread Mats Carlid

You have nobanner in setptr don't You?

-- mats


Bob Utech skrev:

I am trying to send a report to the HP4250 printer to tray 3 using PCL
codes (hex = 1B266C3548), but is not working.
It always defaults to tray 2 when jobs are sent from host Universe no
matter what PCL tray code I use. Any Microsoft Office print jobs work
fine and select the correct trays. 
All 3 trays are setup : Default paper size = Letter   Tray behavior =
Use requested tray always 
  
  tray1: paper size

= Envelope
 paper type
= Preprinted
  tray2: paper size
= Letter
 paper type
= Plain
  tray3: paper size
= Letter
 paper type
= Bond  
I am on Universe 10.1.23 with Windows Server 2003

I have several cases with HP Support concerning this - but they haven't
been very helpful - just point me to links to PCL commands (which I
already have).

I am hoping someone in the U2UG has experience doing this ... Any help
would be appreciated.
Bob
  
Bob Utech, Senior I.T. Coordinator

Information Technology Department
(218) 879-3321 ext. 174
Visit RAM on the Web at www.rammutual.com 

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


Re: [U2] COMMON

2008-04-04 Thread Mats Carlid
  With file pointers, the trick is to set flags so that you know that 
they're open or closed.  


Actually there is a way to test if a variable is an open file-handle or 
not  ( at least in uv):


I have the following code in som subroutines that you can feed with a
open file handle or a file name in FN:

  IF FILEINFO( FN,0) THEN   ;* He gave us an open file-handle.
 FP.FN = FN
 FNAM = FILEINFO(FN,1)
  END ELSE
 OPEN FN TO FP.FN ELSE
ERR.M = Me:: Can't open :FN
RETURN
END
 FNAM = FN
 END


Every other test I've tried results in error messages.

This may be  universe only - don't know.


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


Re: [U2] COMMON

2008-04-03 Thread Mats Carlid

Sure You can
and You don't have to have the named common in any other routine.
The only gotcha I'm aware of is that the file stays open  until  you 
exit universe

or explicitely closes it
i.e. even if you LOGTO another acoount. It's  quite confusing and 
potentially dangerous

that the open file still points to the old account.

-- mats

Dennis Bartlett skrev:

Hi

I have a subroutine that WRITESEQ to a record in a type 1 file called
INTEGRITY. 


Is there anyway I can open the file once (in the subroutine) and thereafter
use the same file handle (to avoid opening the file each time the subroutine
is called) ?

All the code on this site opens the file in the calling routine and passes
the handle to the subroutine.

I want to rather make the subroutine a stand-alone, not requiring more than
the subroutine call added to the calling programs.

I have a suspicion I can use named common - if so, does this have to be
declared in the calling routine (which would negate my purpose!). 


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

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


Re: [U2] blank lines in code / mixed case

2008-03-10 Thread Mats Carlid

Mike Farrant skrev:

snip---

PS I find unix irritating that it does not recognise LS when I mean ls
or CP when I mean cp - how hard can it be to have both cases valid for
such a small command set?

  


Not hard at all really:  Put the following commands in Your environment 
file file:


alias LS=ls
alias CP=cp

and You're done
.
(Assuming Korn shell )

If You don't have an environment file   add one line in Your .profile:
ENV=~mike/environment.sh
( substitute your login name and create the file in your login directory)

Cheers

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


Re: [U2] INCLUDE weirdo

2008-03-05 Thread Mats Carlid

Womack, Adrian skrev:

Does anyone else think it's bad practice to have code in INCLUDES?
  

I do !Warning this is a classical religious war issue!


Surely it would be much better to have the INITIATE.FEEDBACK 
GIVE.FEEDBACK routines written as subroutines, and then simply call them
from the appropriate spots.

If the code in either of those routines needs to be changed, you'll need
to also recompile all the programs using the include. But as subroutines
all you need to do is recompile the subroutine in question.
  


And what's worse: Every time you add a variable in the include you must
search all routines that use the include to check that they do not use 
that name ..

unless you have a rigid naming convention to prevent such name reuse.

Although, INCLUDES are fantastic for things like common  equate
definitions.

  

Well - the same argument applies here, but the naming convention
often comes quite naturally - at least  in my experience.

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


Re: [U2] Piping to a unix command with echo

2008-02-15 Thread Mats Carlid

Unix is supposed to not process any special characters inside single quotes
so drop the change commands and use  SQUOTE .

-- mats



Marco Manyevere skrev:

Im trying to process the contents of a string generated in Universe with an
external program by shelling out to the OS as follows:

CHANGE '\' TO '\\' IN
STR1
CHANGE '' TO '\' IN STR1
SH.CMD = 'SH -c echo ':QUOTE(STR1):' |
./myscript'
EXECUTE SH.CMD CAPTURING RESULT

STR1 can contain any characters
so to avoid interpratation by the shell I put the two CHANGE statements but it
seems some situations are still not covered, for example when STR1 contains
\008, the output is wrong. Does anyone know how I can make this foolproof or
an alternate method? I am able to get consistent results by writing STR1 to a
temp file then running my script with input and output redirection but I want
to cut down on unnecessary disk IO.

Another question: While STR1 is
guaranteed not to exceed 4k, does anyone know the maximum size of the command
I can run in this way? Im on AIX.

Marco.
__
Sent from Yahoo!
Mail - a smarter inbox http://uk.mail.yahoo.com
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/

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


Re: [U2] Piping to a unix command with echo

2008-02-15 Thread Mats Carlid

Yes You're right - but anyway You should be better off
with single quotes.

-- mats


Marco Manyevere skrev:

Problem is STR1 may contain a ', then echo will not know where the string
ends, hence the need to escape it.


- Original Message 
From: Mats
Carlid [EMAIL PROTECTED]
To: u2-users@listserver.u2ug.org
Sent: Friday, 15
February, 2008 3:02:59 PM
Subject: Re: [U2] Piping to a unix command with echo
Unix is supposed to not process any special characters inside single quotes
so
drop the change commands and use  SQUOTE .

-- mats

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


Re: [U2] UniVerse 10.2 Error code: 2 2 on OpenSUSE

2008-02-14 Thread Mats Carlid

Universe comes with a bootscript to be placed in the startup scripts folder
that is not executed  - sthg like  uv.rc.

HTH

-- mats



DeanNapper skrev:

Hi.  I have installed UniVerse 10.2 onto OpenSUSE and all was well until I
restarted the host, now UniVerse reports the following when starting:

   An error has occurred during uniVerse initialization
   Please contact the system administrator 
   Error code:  2   2  


I can't seem to find any info about this error, please help!

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


Re: [U2] A few simple questions

2007-12-07 Thread Mats Carlid

I'd just
chmod g+x master
and add uvadm to the guest list of the group
that owns the master file by editing the /etc/group file.

We run root as the uv admin here - don't know if it's typical or not...
-- mats


Oaks, Harold skrev:

snip
However, in ...ibm/uv/bin the file 'master' which is
executed by this command has owner root and permissions are set to
rwx--.  In other words, only root can execute this command on our
system and logging in as uvadm is not good enough.  Is this typical for
you Universe users?  Or did you change the permissions on this
executable?  Is there some other way uvadm can log out users?

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


Re: [U2][UV] Dynamic File MINIMUM.MODULUS Calculation

2007-12-03 Thread Mats Carlid
A first adjustment is to allow for the overhead that
page and record headers and other administrative information uses

e.g.  divide by 2000 instead of 2048.

 Each page has d page header, each record as a record header
there will be an 'end of item'-character at the end of each key and each 
record
( if not there will be pointers and/or lengths instead )
and there will be some unused characters where no record fits at the end
of  the page.
I don't know the sizes of these things but I'd feel lucky  if I had a file
where they totalled less than 48bytes per page.

-- mats





Perry Taylor skrev:
 That's approximately what I did when calculating how big I needed this
 file, although I used the average record size rather than the total
 bytes since the majority of the records are less than 75 bytes with a
 few large records.

 Let's assume for argument's sake that I took the sum of the record and
 ID sizes and divided by 2048.  The problem is I came up way short.  If I
 query that data from the existing table here's what I get...

   
 SUM CLM.RUN.STRIP.PROVDATA  EVAL LEN(@ID) AS ID BYTES FMT 10R
 
 EVAL LEN(@RECORD) AS REC BYTES FMT 10R EVAL LEN(@ID) +
 LEN(@RECORD) AS BYTES FMT 10R

 CLM.RUN.STRIP.PROVDATA ID BYTES.. REC BYTES. BYTES.


== == ==
 TOTALS5035139   17035963   22071102


 719305 records summed.

   
 DIVD 22071102 2048
 
 Decimal 10776 remainder 1854

 See this is where I get into trouble.  10776 is still a far cry from
 19618.  What is also confusing is why ANALYZE.FILE reports such larger
 totals for the record and ID bytes than I get from my query.  See the
 confusion?

 Thanks.

 Perry

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of Dan Fitzgerald
 Sent: Thursday, November 29, 2007 12:19 PM
 To: u2-users@listserver.u2ug.org
 Subject: RE: [U2][UV] Dynamic File MINIMUM.MODULUS Calculation

 This is a very rough cut, but if you divide data+id bytes by 2048,
 you'll be
 in the ballpark.

 so...

 46Mb + 5Mb = 51Mb/2048=24902

 I'd pad that a bit (you don't need tightly packed files), possibly as
 much as
 50%  maybe go up to a MIN MOD of a prime near 36K. I'm assuming that
 disk
 space isn't a constraint as we're dealing with a few Mb.

 If you don't know what the data size will be, my admittedly subjective
 formula
 would be to divide the anticipated number of records by 10  go with a
 number
 in that range, assuming no other issues (like the # of id's is going to
 be 40
 Billion  it's a 32-bit file). In this case, you'd end up with an
 oversized
 file (MIN MOD around 72K) , but you can always adjust that if it's a
 problem.
 I don't mind oversizing nearly as much as undersizing. Subject:
 [U2][UV]
 Dynamic File MINIMUM.MODULUS Calculation Date: Thu, 29 Nov 2007
 10:13:53
 -0500 From: [EMAIL PROTECTED] To: u2-users@listserver.u2ug.org
   
 I
 
 continue to struggle with accurate calculation of MINIMUM.MODULUS
 values for
 dynamic files. Static hashed files do not seem to be such a challenge
 for me.
   
 Here is an example where, once again, I was woefully shy... 
   
 ---
 File
 name .. CLM.RUN.STRIP.PROVDATA Pathname
 ...
 CLM.RUN.STRIP.PROVDATA File type .. DYNAMIC Hashing
 Algorithm .. GENERAL No. of groups (modulus)  19618 current
 (
 minimum 7867, 0 empty, 8869 overflowed, 4612 badly ) Number of
 records
 .. 719305 Large record size .. 75 bytes Number of
 large
 records  6614 Group size . 2048 bytes Load factors
 ... 80% (split), 50% (merge) and 80% (actual) Total size
 . 69978112 bytes Total size of record data .. 46331730
 bytes
 Total size of record IDs ... 5114218 bytes Unused space ...
 18528068 bytes Total space for records  69974016 bytes  File name
 .. CLM.RUN.STRIP.PROVDATA Number per group ( total of
 19618
 groups ) Average Minimum Maximum StdDev Group buffers ..
 1.74 1
 15 1.19 Records  36.67 10 68 12.15 Large records
 .. 0.34 1 4 0.58 Data bytes . 2361.69 350
 30359
 2270.12 Record ID bytes  260.69 70 491 86.71 Unused bytes
 ... 944.44 24 2068 650.69 Total bytes 
 3566.83
 2048 30720 0.00   Number per record ( total of 719305 records )
 Average
 Minimum Maximum StdDev Data bytes . 64.41 34 28700
 353.25
 Record ID bytes  7.11 2 20 1.14 Total bytes
 
 71.52 36 28720 354.13
 ---
   
 I
 
 cannot seem to figure out the relationship of the current modulus to
 the
 record sizes/counts/group size factors. When I do the math I always
 come up
 short.  Can someone offer some suggestions for accurate calculation
 of
 

Re: [U2] Universe and triggers

2007-09-12 Thread Mats Carlid

Clifton Oliver skrev:
Since 10.0. Yes, it works on all file types except 1 and 19. Being 
directories, they don't have file headers, thus no place to put the SICA.





It would be possible placing the SICA in  a separate file .sica
or in the .Type1 / .Type19 files wouldn't it?

And it would really be nice and usefull to have triggers in directories too.

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


Re: [U2] Binary data corruption on copy

2007-08-24 Thread Mats Carlid

Louie Bergsagel skrev:

What do you mean by 50 different filesystems?  50 directory / Type 19 files?
  
On unix machines you split each disk into up to a handfull partitions 
called filesystems

wich may be mounted ( made accessible) individually.

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


Re: [U2] RE: Cleaner Case Statement

2007-07-30 Thread Mats Carlid

MAJ Programming skrev:

...
  



I've inherited code from an idiot programmer that looks like this:

OPEN FILE1 TO F1 THEN
OPEN FILE2 TO F2 THEN
OPEN FILE3 TO F3 THEN
LOOP WHILE READNEXT ID DO
READ REC FROM F1, ID THEN
WRITE REC ON F2, ID
WRITE REC ON F3, ID
END
REPEAT
END ELSE
CANNOT OPEN FILE3
   END ELSE
CANNOT OPEN FILE2
END ELSE
CANNOT OPEN FILE1
END

C'mon. Just because something can be done differently doesn't mean it's
worth a hill of beans.

  




Don't judge him/her to fast or hard -  notice that this is THE ONLY WAY 
to write this

according to the strucutural programming school ...

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


Re: [U2] UniData 7.1 vs. MS SQL 2005 performance

2007-07-19 Thread Mats Carlid

Anthony W. Youngman skrev:

In message [EMAIL PROTECTED], Mats Carlid [EMAIL PROTECTED] writes

Anthony W. Youngman skrev:


At which point, you hit my hobbyhorse ... In the real world ... - 
relational database theory has ABSOLUTELY NOTHING whatsoever to do 
with the real world. It's an exercise in pure maths.





And You hit my hobbyhorse or rather  one of them :-) ...

RDMS theory is absolutely not pure maths!


So you'd say it's applied maths? Getting off-topic, but I've never 
really understood the difference (as in how it is defined) between 
pure and applied. I know you can look at a problem and know which is 
which, but how do you define it?
No I don't have a definition of pure math's.  Maybe high abstraction 
leval  mathematics 
is a better word for it.


digressing
A very narrow defintion could be  maths so abstract that it will never 
find an application  ?
But no -  remember the 19century guys develloping the  theory  for  
non-linear multidimensional
spaces ( Riemann et. al. ) and tensors  - they thought they had a 
absolutely pure theory wich would

never find an application and so did others until Eistein published
the general theory of relatlivity only a few decades later ...
/digressing

I really wanted to express two opinions :
1. RDBMS is not more pure maths than Pick.is.
  It's  just a heavily restricted special case of abstract relation theory.
  It's  more restricted than Pick.
  The restirctions are from a 'pure' mathematical point of view
  totally arbitrary -  but  justifiable from an engineering standpoint
  - except the 1NF of course :-)
2. RDBMS is not anywhere near the abstraction level
of the general theory of relations and certainly is not
the  mathematical relation theory - as sometimes advocated.


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


Re: [U2] [UV] Conversion code for week number

2007-07-18 Thread Mats Carlid

Please disregard and forget what I wrote below.
It just isn't true.

The formula will  fail on some odd dates.
The reason is that the average lenth of a calendar year is not constant
but depends on the year interval used . E.g. 2000-2099 has an average 
year of 365.25

but 2000-2399 has 365.247525

Sorry.

-- mats


Mats Carlid skrev:

A final (?) note on  year calculation shortcuts:

Had Dick chosen jan 1 in a year divisible by 400 as day 1 then

INT(DAY / 365.247525 )

  would have worked all the time.

But selecting a '400-year' starting on a sunday would result in quite
long internal dates unless year 2000 started on a sunday ( it didn't).


365.25 can only work for a limited time as it doesn't observe
the 100 and 400 year rules ...


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

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


Re: [U2] [UV] Conversion code for week number

2007-07-17 Thread Mats Carlid

A final (?) note on  year calculation shortcuts:

Had Dick chosen jan 1 in a year divisible by 400 as day 1 then

INT(DAY / 365.247525 )

  would have worked all the time.

But selecting a '400-year' starting on a sunday would result in quite
long internal dates unless year 2000 started on a sunday ( it didn't).


365.25 can only work for a limited time as it doesn't observe
the 100 and 400 year rules ...


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


Re: [U2] UniData 7.1 vs. MS SQL 2005 performance

2007-07-17 Thread Mats Carlid

Anthony W. Youngman skrev:


At which point, you hit my hobbyhorse ... In the real world ... - 
relational database theory has ABSOLUTELY NOTHING whatsoever to do 
with the real world. It's an exercise in pure maths.





And You hit my hobbyhorse or rather  one of them :-) ...

RDMS theory is absolutely not pure maths!

In pure maths a relation is the set of tuples (ordered lists of n 
elements  {e1,e2,e3...en } 
where the first element e1 belongs to  a set S1 and e2 to set S2 etc.

and there are no limitations on the nature of theses sets.
Not even that the elements must be atomic - in contrary they may be sets 
themselves
or lists ( like our multivalues ) or even relations ( like our 
associations ).


Pure maths doesn't limit the nature of the defining sets at all -
a set consisiting of my car, the north pole,the number pi and the set of 
all real numbers is valid.


Thats a long way from  rdbms  integers,date, fixed length strings etc..
.
The explicit goal of Codds rules ( at least in the paper where I read them)
is to limit this to something that is possible to handle on
computer  hardware  (of the 70-ies!?) as well as  allowing  a relative 
easy formulation of select criteria,

constraints etc.

From an u2 or pick view Codd choose to include unecessary contraints on 
relations

for the RDBMS,
But that doesnt make it more or less mathematical than the pick model..

In my maths class we only had this definiton of an relation and then 
emediately
went on to study relations  where the all the attributes where real 
numbers so the

general defintion may be to much even for mathematicians to cope with

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


Re: [U2] create a select list

2007-05-22 Thread Mats Carlid

pam skrev:

thanks for you help, and i was working on it and i finally can read with
ic_readnext but... (always there is a but) ... I can4t receive all the data
from a multivalue column, I just receive the first only. I don`t know if I
must do something more to get all the data. I will investigate more but I
you have any idea i will apreciate it!!
Thanks again you give me a great idea.
Pam
  


Privided  You can read an I-descriptor  write one that
converts @vm to  .. say '|'and read  it instead of the  attribute.


Or do the conversion in a synonym dict item.
I don't think there's an conversion code for this
so You may have to write an user exit for that

And of course there may be a proper way to handle
it in inteconnect too...

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


Re: [U2] Using all attributes in a record

2007-05-02 Thread Mats Carlid

Jef Lee skrev:

Some time ago, someone posted code showing a very fast way to process
all the attributes in a record.  I think it involved deleting the first
attribute after processing it, but I'm not sure.

I searched the digests I have kept and probably haven't got that one or
don't know what words to search for.  I also tried the user group's
website search but it's currently a broken link.

Please tell me where to go or reply with the method you used.

Thanks.

Jeffrey Lee
Senior Analyst/Programmer

  

You're mention of deleting the first attibute leads me to think that that
it's a trick for building a mv array quickly You're thinking about:


arr  = 

loop
   code to calc next.value
   while  more.values
   arr := @AM:next.value
   repeat
del arr1


HTH

-- mats 
---

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


Re: [U2] Using all attributes in a record

2007-05-02 Thread Mats Carlid

Jef Lee skrev:

Mats,

I think (foggy recollection) that it was the difference between
  DUMMY=''
  CHK=1
  ARR=''
  FOR I = 1 TO 1
 ARRI=CHAR(MOD((I-1),26)+65)
  NEXT I
  * Check time here
  FOR I = 1 TO 1
 DUMMY=ARRI
  NEXT I
  * Check time here
  FOR I = 1 TO 1 UNTIL CHK = 0
 DUMMY=REMOVE(ARR, CHK)
  NEXT I
  * Check time here

I think I remember using the REMOVE was faster because of the way UV
walks along a dynamic array to get attributes past the first one.  I was
told UV starts at the beginning each time because the position of each
attribute mark is only determined by the field's contents.

  



That's true but since release 7 or thereabout  uv maintains a  pointer 
to the attribute last

accessed in each array so don't expect large differences.
But if you change   ARRI  to ARR1,I  you'll see a substantial gain 
by using remove

- as there are no pointers to last accesssed subvalues.
And AFAIK ud don't have these pointers so it's a good idea to keep to 
remove.



( I only ment to point out that the  ...then remove attribute 1...  
thing comes from
a slightly different discussion namely how to build a large mv-array as 
fast as possible.)


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


Re: [U2] Multivalue Column

2007-04-18 Thread Mats Carlid

Q2:Use matparse  cf.  basic manual - has examples.
-- mats


Sanjeebkumar Sarangi skrev:
Hi, 

Suppose, I have a multivalue column. How can I get the sum of all 
the values ? If I want to create an array of the elements present in the 
multivalue column, then how can I do it ? Please give me some examples.

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


Re: [U2] PATHNAME and DIRECTORY

2007-04-04 Thread Mats Carlid

Anita Panda skrev:
I want to store a file within a directory from universe basic say 
C:\DIRNAME\FILENAME.
  

  You may create a VOC entry type F that points to DIRNAME
  F
  C:\DIRNAME
  D_VOCLIB( for example )

 and then use ordinary  OPEN/ READ/WRITE to it .
Can i give the DIRNAME AND FILE NAME during run time .How do I give the 
Directory and file name.
  
   You can use   OPENSEQ ( pathname    ) 
  and WRITESEQ, READSEQ, CLOSESEQ  see the BASIC manual.

 ( This is also an alternative answer to the first question  )

How do I give the path name so that any XL or XML file created gets stored 
within it.


  

 The answer may depend on what You use to create them 

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


Re: Spam:[U2] Universe I-descriptor help

2007-03-27 Thread Mats Carlid

But there is a  !INTS  - function.

-- mats


IT-Laure Hansen skrev:

Thanks everyone for the formula. I should have waited until the caffeine
kicked in.

But I'm still having problems, and this I am guessing is strictly a
Universe I-descriptor question. Looks like the system is not treating
things value by value on calculating INT. I am getting a non numeric
data when required error. As soon as I get rid of INT, the I-descriptor
is capable of using value by value properly. There is no INTS (just like
there is a OCONVS etc). Does anyone know how to handle this in
multi-value fields?

Thanks again.

Laure Hansen,

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


Re: [U2] @Variables

2007-03-22 Thread Mats Carlid

Brutzman, Bill skrev:

What terminal emulator is in use there... Dynamic Connect, AccuTerm...?
  


That _should_ not matter.  The @-function  picks the relevant code from the
terminfo database using you  TERMINAL.TYPE setting.

If  ( or rather when )  the emulated terminal doesn't quite agree with the
original terminal  as it  is stored there  you  have to  either
- change  the terminfo entry
- make up an terminfo entry of your own
- or live with the crippled functionality.

Making/changing terminfo is well documented in the docs.!
(  System administration appendix B  - at least when I last  needed it)

-- mats 

Please advise.

--Bill

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Buffington,
Wyatt
Sent: Thursday, March 22, 2007 9:56 AM
To: u2-users@listserver.u2ug.org
Subject: RE: [U2] @VARIABLES


We define variables for the various @ statements

**Screen clearing options
  CS   = @(-1)   ;**Clear Screen
  EOS  = @(-3)   ;**Clear to End Of Screen
  EOL  = @(-4)   ;**Clear to End Of Line

**Define various ways to emphasize certain data/labels
  SBV  = @(-5)   ;**Start Blink Video
  EBV  = @(-6)   ;**End Blink Video
  SRV  = @(-13)  ;**Start Reverse Video
  ERV  = @(-14)  ;**End Reverse Video
  SUL  = @(-15)  ;**Start UnderLine video
  EUL  = @(-16)  ;**End UnderLine video

**Useful for placing boxes around information
  SGM  = @(-27)  ;**Start Graphics Mode
  EGM  = @(-28)  ;**End Graphics Mode

**Cursor movements
  CUB  = @(-9)   ;**CUrsor Backward
  CUU  = @(-10)  ;**CUrsor Up a line
  CUD  = @(-33)  ;**CUrsor Down a line
  CUF  = @(-34)  ;**CUrsor Foreward

**Use the following to indicate text input fields
  SRT.BOLD = @(-81)  ;**Start BOLD font
  END.BOLD = @(-82)  ;**End BOLD font 


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Sanjeebkumar
Sarangi
Sent: Thursday, March 22, 2007 7:52 AM
To: u2-users@listserver.u2ug.org
Subject: [U2] @VARIABLES

Hi

CRT @(2,15):@(-4):@(2,15):
Basically when we use @(-4) ,it should go to the end of line...but when
I tried the above statement I could not understand what it exactly
did...I also tried by giving different x and y coordinate values ..ie
CRT @(23,45):@(-4):@(23,45)..but the result seemed similar.I could
not find the difference.Please help in this regard.
Thanks,
Sanjeeb

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


Re: [U2] Upper Case Only

2007-03-16 Thread Mats Carlid

One reason for why the upper case only thing started that has been mentioned
in this thread is that some early terminals didn't have lower case.

This is indeed true but it used to be much worse than that !

The early days computers themselves didn't  handle lowercase as they had
6bit characters allowing  for a 64 character alphabet only.

I've only used two such machines the IBM 7044 and CDC 6600
but before the  IBM360 arrived in the mid  60's
it was the general rule for mainframes to have 6bit chars.

(  There were exceptions.
IIRC  british Orion and swedish  Facit and Saab had 8bit bytes,
and the minis. )

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


Re: [U2] [UD] CALL @progname

2007-03-16 Thread Mats Carlid

The 'extra' time when calling as a function is likely due to
the assignment of the result to a variable. Doing that
a million times has to trigger a significant number of
garbage collects.

Perhaps You could modify the test to call the routine
and 'copy' the result argument to a variable -
it should IMHO result in a time about the same
as the function call...

-- mats


David Wolverton skrev:

Actually - I just ran a test, and was surprised somewhat:

1,000,000 Iterations of ways to do a call...

CALL PROGNAME  (direct)7047
CALL *PROGNAME (global)7766
CALL @PROGNAME (indirect)  6984
GOSUB (logic contained in-line)1531
Call as Function  10203

I've rearranged the order the routines are called in, and run the test suite
over and over... The Indirect calls are CLEARLY faster, with all numbers
moving +/- 50, EXCEPT the indirect, which only moved +/- 25 or so.

Note that I set the @PROGNAME outside of the call loop - this was not
testing how fast the system could set variables - just the difference on the
'calls'.  If I include the setting of the name WITHIN the loop, the indirect
call went to 7290 or so -- the difference in the 'direct' call vs the
'indirect' call efficiency appears to be in the Variable handling!  But both
are still faster than use of Global catalogs.

Anyone have a clue why the indirects are a hair faster? Or am I just getting
lucky over and over? I always thought they were slower as well!

DW

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


Re: [U2] Error in report generation.

2007-03-13 Thread Mats Carlid

Perhaps a little explanation is in order here.

There are no global variables in u2.
Thus the need to pass the variables to the subroutine.

If you have truly global variables - used in many subroutines - you could
put them in a common block.
(  add a line
  COMMON  /name/  REC, VAR
  in every program that use them )


If the program stays as simple (small)  as it is now a gosub is neater 
than an external

routine:

   ...
  read  x from y else null
 gosub sub
 ...

 sub:
print ...
return

...
end


hth
--  mats


Hi

You need to pass  REC as a parameter to the subroutine see below:
-- mats

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


Re: [U2] Error in report generation.

2007-03-13 Thread Mats Carlid
Hi

You need to pass  REC as a parameter to the subroutine see below:
-- mats

Sanjeebkumar Sarangi skrev:
 Hi
 I tried to generate a report by writing a small program. But I got an error
 as below.

 ERROR:

   
 RUN TEST.BP MAIN
 
 MAIN

 45 record(s) selected to SELECT list #0.
 Program SUB: Line 3, Variable REC previously undefined.  Empty string
 used.
 Program SUB: Line 3, Printer name UVDEFAULT is not recognized by the
 system.

 CODE:

   
 ED TEST.BP
 
 Record name = MAIN
 15 lines long.

 : P
 0001: CRT 'MAIN'
 0002: OPEN 'INVENTORY.T' TO INEVNTORY ELSE STOP
 0003: SENT = 'SSELECT INVENTORY.T BY ITEM_CODE'
 0004: EXECUTE SENT
 0005: EOF = 0
 0006: LOOP
 0007: READNEXT ITEM_CODE ELSE
 0008: EOF = 1
 0009: END
 0010: UNTIL EOF DO
 0011: READ  REC FROM INEVNTORY ,ITEM_CODE THEN
 0012: CALL SUB(REC);!!
   
 0013: END
 0014: REPEAT
 0015: STOP
 Bottom at line 15.
 : Q

 File name= TEST.BP
 Record name = SUB
 6 lines long.

 : P
   
   SUBROUTINE SUB(REC) ;!!!
 0001:CRT 'SUB'
 0002: PRINTER ON
 0003: PRINT ITEM_CODE  L#16:REC1
 0004: PRINT DESCRIPTION  L#16: REC2
 0005: PRINT TYPE  L#16:REC3
 0006: PRINTER OFF
 0007: RETURN
 Bottom at line 7.
 :
 How do I resolve this?


 Thanks
 Sanjeeb
 =-=-=
 Notice: The information contained in this e-mail
 message and/or attachments to it may contain 
 confidential or privileged information. If you are 
 not the intended recipient, any dissemination, use, 
 review, distribution, printing or copying of the 
 information contained in this e-mail message 
 and/or attachments to it are strictly prohibited. If 
 you have received this communication in error, 
 please notify us by reply e-mail or telephone and 
 immediately and permanently delete the message 
 and any attachments. Thank you
 ---
 u2-users mailing list
 u2-users@listserver.u2ug.org
 To unsubscribe please visit http://listserver.u2ug.org/
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] Universe vs. Unidata

2007-02-28 Thread Mats Carlid


Drew Henderson skrev:

Hello, all.

We are in the process of moving to a new ERP solution which runs on 
Unidata.  Our legacy system runs on Universe.  In running some 
processes on each system, we are seeing some performance differences; 
in particular, running programs which make liberal - though not 
particularly efficient - use of dynamic arrays on our legacy (Universe 
on Linux) system run orders of magnitude faster than the same programs 
on a much larger system (Unidata on AIX).


In the process of determining the origins of these problems, I want to 
rule out any Universe vs. Unidata issues.  My question is this: does 
Universe handle the random searching of dynamic arrays (such as VAR1 = 
VAR2x) better than Unidata?


Thanks,
Drew



Hi Drew,

it might be an uv vs ud issue,  I can't speek for ud but
uv  optimizes the access to dynarrays by keeping track of
the last field accessed and using that info at the next access
when deemed to be more efficient than a linear scan.

A test case might be to  simply concatenate a short string to the end
of an evergrowing dynarray   say 50K times.

The effect of the optimization when it was introduced (in uv7? )
was a factor over 1000.

Try it on both setups and You'll know ...


HTH
-- mats


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


Re: [U2] [UV] SPOOLER

2007-01-26 Thread Mats Carlid

A simple  su  $1  in the spooler driver before lp
should  make the user the owner of the print job
and allow 'm to cancel the job.

Disclaimer: Not tested.


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


Re: [U2] [UV] SPOOLER

2007-01-26 Thread Mats Carlid

Maybe in hpux - I don't know - but in some unixes
root  su's without password and the drivers do run as root.
-- mats

Barry Rogen skrev:

Would have to include the user password in the feed to satisdy
the 'su' command however.

Barry  Rogen
PNY Technologies, Inc.
Senior  Programmer/Analyst
(973)  515 - 9700  ext 5327
[EMAIL PROTECTED]

-
Far better it is to dare mighty things, to win 
glorious triumphs even though checkered by

failure, than to rank with those poor spirits who
neither enjoy nor suffer much because they live
in the gray twilight that knows neither victory
nor defeat.t. roosevelt



-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Mats Carlid
Sent: Friday, January 26, 2007 3:42 AM
To: u2-users@listserver.u2ug.org
Subject: Re: [U2] [UV] SPOOLER

A simple  su  $1  in the spooler driver before lp
should  make the user the owner of the print job
and allow 'm to cancel the job.

Disclaimer: Not tested.


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

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


Re: [U2] [UV] globally catalogued program

2006-12-13 Thread Mats Carlid

Boydell, Stuart skrev:

I was just trying to track down where a particular program in
GLOBAL.CATDIR came from and I'm wondering how others manage Globally
Catalogued verbs?
Are there normal tools like VLIST for them - and how can you easily
determine which program file and account a globally catalogued verb
emanates from?
  

 Yes and no,

MAKE.MAP.FILE   ( takes an awful lot of time )

and then list MAP

The  WHO column is the origin account ( first 8 chars only )
- or whatever IAM that might have been in effect.

The source file can be found in the GLOBAL.CATDIR *program record,
the last line shows the complete path to the file.
( It seems to be the source file from compile time.)


BTW even for 'normally' cataloged programs you need
to use the above technique to determine the source account
as you may catalog a program into another account by:

catalog  file  *otheraccount*program  programsource

The result of this is identical to a normal catalog in otheraccount
except for what shows up in the origin column in the MAP file
and that no verb is created in any account.

The VLIST  command doesn't work on GLOBAL.CATDIR
not even after you make a GLOBAL.CATDIR.O  pointer to the
catalog directory.

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


Re: [U2] Somewhere other than HOLD

2006-10-27 Thread Mats Carlid
When in universe use the relatively new option of setptr 'USEROPTS'
to pass your options to the pritner driver script -
then You may continue to use FORM and BANNER  for what they are
intended for.

my 2 vre 
-- mats


Charlie Rubeor skrev:
 Don't know if this will help, but here is what I did to solve a similar 
 problem in Unidata.  The first step we took was to start using the BANNER 
 UNIQUE (string) setptr option.  Hopefully, that option is available in 
 Universe.  So, the setptr command would contain something like BANNER 
 UNIQUE FRED or BANNER UNIQUE BARNEY.  This causes the files in the 
 _HOLD_ file to start with FRED or BARNEY.  The rest of the _HOLD_ key is a 
 sequential number, which is stored in the Dictionary of _HOLD_.

 The next step is to have a separate program that checks the _HOLD_ file 
 every five minutes and takes some action, based on the filename.  e.g., if 
 it starts with FRED, do this.  If it starts with BARNEY, do something 
 else.

 Some other things that I tried, which did not work on Unidata, but may 
 work on Universe:

 1) Put a trigger on the _HOLD_ file.  Unidata cannot do this, since _HOLD_ 
 is a DIR type file.

 2) Delete the _HOLD_ file and recreate it as a hashed file, which would 
 allow a trigger to be used.  Unidata really did not like this at all.

 hth


 Charlie Rubeor
 [EMAIL PROTECTED]

 [EMAIL PROTECTED] wrote on 10/26/2006 11:49:59 AM:

   
 Is there a way in UV to direct a printjob to another file
 besides HOLD using the SETPTR (more precisely
 the !SET.PTR command?

 I Just want to re-direct specific jobs, but keep HOLD

 My workaround is is READ/WRITE/DELETE the job from HOLD to
where I want it after the job is completed. But I'd rather not have
to open 2 more files if it can be done via the setptr.

 George

 George Gallen
 Senior Programmer/Analyst
 Accounting/Data Division
 [EMAIL PROTECTED]
 ph:856.848.1000 Ext 220

 SLACK Incorporated - Delivering the best in health care information and
 education worldwide.
 http://www.slackinc.com
 ---
 u2-users mailing list
 u2-users@listserver.u2ug.org
 To unsubscribe please visit http://listserver.u2ug.org/
 
 ---
 u2-users mailing list
 u2-users@listserver.u2ug.org
 To unsubscribe please visit http://listserver.u2ug.org/
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] Need help - UV intermittent roving file open error

2006-08-25 Thread Mats Carlid
In infomation flavour (and probably in ideal flavour)  you can resize 
dimensioned arrays.


-- mats


Womack, Adrian wrote:


Dimensioned arrays can be resized - BUT arrays defined in common
can't.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
[EMAIL PROTECTED]
Sent: Friday, 25 August 2006 9:28 AM
To: u2-users@listserver.u2ug.org
Subject: RE: [U2] Need help - UV intermittent  roving file open error

Do you check/change accounts when you open files? Changing accts will
probably cause issues. Check FILEINFO(). Also, dimensioned arrays can be
dynamically resized b might also be helpful?


DISCLAIMER:
Disclaimer.  This e-mail is private and confidential. If you are not the 
intended recipient, please advise us by return e-mail immediately, and delete 
the e-mail and any attachments without using or disclosing the contents in any 
way. The views expressed in this e-mail are those of the author, and do not 
represent those of this company unless this is clearly indicated. You should 
scan this e-mail and any attachments for viruses. This company accepts no 
liability for any direct or indirect damage or loss resulting from the use of 
any attachments to this e-mail.
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/

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


Re: [U2] [UV] FIND vs LOCATE- speed?

2006-08-03 Thread Mats Carlid

Never checked but FIND and LOCATE could be the same subroutine.

Lookup in a sorted string is definitely faster - with randomly distributed
search strings the expected number of comparisons are halfed.

If the strings to lookup tend to be early in the sort order the performance
is even better.

But You need a good number of searches to pay for the time used to sort.

-- mats


Barry Brevik wrote:


When using FIND or LOCATE on a dynamic array, is one faster than the other, and 
is there any reason to sort the array to (hopefully) improve the speed of FIND 
or LOCATE?

I don't need to use LOCATE... BY... SETTING, I'm just doing a raw FIND or 
LOCATE.

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

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


Re: [U2] A Generous Offer

2006-06-28 Thread Mats Carlid

Oh no - not again -  no meeting in Sundbyberg, Sweden !   ;^)

-- mats



Results wrote:


George:
Full(er) details at http://www.Intl-Spectrum.com. Here's the list:

Cincinnati, OH
Sept. 25 - 26
Kings Island Resort
Sponsor: Ashwood Computer Services http://www.ashwoodcomputer.com/

Seattle, WA
Oct. 11 - 12
Holiday InnSeattle SeaTac Airport
Sponsor: Seattle Pick Users Group http://www.sapug.org/

Sydney, AUS
Nov. 1 - 2
Star City Hotel  Casino

New Jersey
Nov. 14 - 15
Sheraton at Woodbridge Place



George Gallen wrote:

 


besides, NJ doesn't smell anymoreat least not that much :)
I didn't follow the link, but where in NJ is the spectrum being held at?
   


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

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


Re: [U2] Universe Java

2006-05-30 Thread Mats Carlid

Are there plugins available for u2 Basic in JEdit?

Such as  keyword colouring, syntax check or autoindent..
Can't see any on the JEdit site.

-- mats


Wendy Smoak wrote:


On 5/29/06, Anthony Dzikiewicz [EMAIL PROTECTED] wrote:


So, all of you Java guys and gals what do you use to develop in
Universe/Java ?



IntelliJ IDEA and JEdit.  And Maven 2, though you weren't asking about
project management and build tools. :)

http://www.jetbrains.com/idea/
http://www.jedit.org/
http://maven.apache.org/

If IDEA isn't an option (it's not free, but worth every penny,) then
Eclipse and NetBeans have similar features.  With the right
combination of plugins, JEdit can get pretty close to a full IDE.

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


Re: [U2] OPEN Statement DICT Default

2006-05-09 Thread Mats Carlid
You mean sthg like:

FOR I=31 TO 365 STEP 28
   PRINT  (I,'DMAL')[1,3] 
   NEXT I

Tried  'DMBL'  but the abbreviations were only two characters.
But printing the actual string is somewhat shorter ...

-- mats


Mark Johnson wrote:

I specifically remember being taught
X=STR(0,5-LEN(X)):X
for the 1 concept.
Before the % was allowed, a shorter form was
X=(0:X)R#5
which I recall using until % came about.

On that note, I stole R-10 and C#10 from UD and offered it to D3
hopefully for their next release.

Thanks
Mark Johnson

P.S. Many use OCONV(DATE(),D2/)[7,2] for the month. I think DATE()DM is
the shortest way.
Puzzle: Illustrate the simplest way to generate Jan thru Dec.


- Original Message -
From: Roger Glenfield [EMAIL PROTECTED]
To: u2-users@listserver.u2ug.org
Sent: Monday, May 08, 2006 9:42 AM
Subject: Re: [U2] OPEN Statement DICT Default


  

The same programmer that doesn't read the manual does an

EXECUTE instead of a SELECTINDEX, and yes, the index already existed

or
A=STR('0',20-LEN(B)):B
instead of
A=FMT(B,'L%20')   or for the Universe Pick/Ideal flavor people in the
crowd  A= B'L%20'

or
TODAY=OCONV(DATE(),'D2/')
CONVERT '/' TO @VM IN TODAY
MONTH=TODAY1,2
instead of
MONTH=OCONV(DATE(),'DM')


And yes, I have observed all of the above recently.

;)  Just 15 minutes a week to look through the current manuals to find
out about a new option that you might not know existed?

Roger

Louie Bergsagel wrote:


I've never used the null dict indicator. Who ever reads the syntax book
unless a command doesn't work?

*:)*
-- Louie Bergsagel


On 5/5/06, Mark Johnson [EMAIL PROTECTED] wrote:

  

To All:

Was there ever a real requirement on any prior flavor to have the
typically
non-used DICT portion of the OPEN statement be the set of quotes and a
comma.

I accidentally forgot it in 1978 on a Microdata and it still compiled.


To
  

this
day I have not seen a reason for the OPEN ,FILE null dict indicator
and
have not used it since unless I actually want the DICT level.

Just wondering.

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


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


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


Re: [U2] [UV] Forcing Subroutine to be Re-read

2006-05-03 Thread Mats Carlid

Are You calling them indirectly ?

I.e. like :

subr = nameOfSubroutine

call @subr( args )

This technique will 'force' the subs 'in memory'
whereas

call nameOfSubroutine(args)

should start a search for the subroutine.

How this search is done and especially if it will
force a fresh copy I don't know but it
could be worth to try.

-- mats.



[EMAIL PROTECTED] wrote:


Hi all,

UV9.6.1.14
HPUX 11

I have a background processor that calls a number of subroutines.  Everytime I 
make a change to any of the subroutines, I have to shutdown the job and restart 
it because the subroutine is still in memory.  Does anyone know of a way that I 
can force the background job to reread the subroutine?

Thanks in advance,

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

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


Re: [U2] survey

2006-04-11 Thread Mats Carlid
We solely use  the  information and ideal flavours -  information for 
legacy systems originating

from prime information and ideal for newer applications.

Running   uv10.1  on Solaris 8 and 10.

-- mats


[EMAIL PROTECTED] wrote:


What flavors of universe are people using? I've only ever seen
applications running on universe in pick flavor, but there must be loads
of systems using information or pi/open, right?

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


Re: [U2] Unix Device Number

2006-03-17 Thread Mats Carlid

df  shows all currently used mount points in its last columns
and the device in column 1.

HTH
-- mats


phil walker wrote:


Hi,

The output of list.readu returns the device and inode number of a
Universe file. I can resolve the inode number by using find . -inum
xx, but if I am positioned at / then it is possible that 1 or more
files may have that same inode number, so I want to restrict the find to
the corresponding device.

Is there a way of determining the mount point for a file system device
id in UNIX?

Cheers,

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

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


Re: [U2] Unix Device Number

2006-03-17 Thread Mats Carlid

df  shows all currently used mount points in its last columns
and the device in column 1.


oops ...   I have an alias on df  to  df -k
plain df gives the info too but in a different format.

HTH
-- mats


phil walker wrote:


Hi,

The output of list.readu returns the device and inode number of a
Universe file. I can resolve the inode number by using find . -inum
xx, but if I am positioned at / then it is possible that 1 or more
files may have that same inode number, so I want to restrict the find to
the corresponding device.

Is there a way of determining the mount point for a file system device
id in UNIX?

Cheers,

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

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


Re: [U2] [UV] GOSUB variable-name?

2006-02-15 Thread Mats Carlid

Yes

that's what  was so fascinating 'bout simula when I got
aquainted with it back in '70

but it wasn't called OO by then ...

-- mats


Serguei wrote:


You not an OOP expect, are you?

I have been using OOP since it appeared in Turbo Pascal long before and
windows tools appeared and our current Java code calling Universe programs
has nothing to do with windows tools (our application has an HTML browser
interface). Only those who do not know anything about OOP think that it has
anything to do with Windows.

- Original Message - 
From: Jerry Banker [EMAIL PROTECTED]

To: u2-users@listserver.u2ug.org
Sent: Tuesday, February 14, 2006 5:45 PM
Subject: Re: [U2] [UV] GOSUB variable-name?


 


Not a limitation, you build your own objects. Objects after all are
   


nothing
 


more than subroutines that perform a specific task. You may even say that
   


it
 


is an advantage because you are not tied into doing what someone else has
decided how something should work. You create your own. Almost every
   


company
 


I have worked for has had a different way of display and storing
information. It's only when using windows tools that they will settle for
what they get because they have no choice.

- Original Message - 
From: Serguei [EMAIL PROTECTED]


   


One of those limitation - no OOP.
 


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


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

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


Re: [U2] CAll Stack

2006-02-07 Thread Mats Carlid

In universe I get it like this:

CMD =  'PORT.STATUS PORT ':@USER.NO:' LAYER.STACK ' 
EXECUTE CMD  CAPTURING TEXT 


-- mats


Andrew Lakeland wrote:


It's possible to access the call stack from debugger using the T command,
anybody know if it's also possible to access it from a basic program.

Searched the manuals for call stack but all references point to the
debugger.



Ta

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


Re: [U2] [UD] Best practices

2006-01-30 Thread Mats Carlid

??
Apologies if I've missunderstood the question:

You need to index on the same name that's You use
in your SELECT's  or SELECTINDEXes to have an effect !

If You haven't written them yet use the meaningfull PRODUCT.

-- mats

Arnold Bosch wrote:


I have a question / concern regarding the D and I types:

If a D type is created (F1 below)  and an I type added to the dictionary
referencing this D type directly (PRODUCT below), what is the impact on
indexing?

For example, if an index is created on the D type, will UNIBASIC code using
the I type benefit from this index?
The reason I am asking this, is that we have a system with all the data
tables created with D types called F1, F2, F3 etc, and all the coding is
using the I types for data access.  The system has NO indexes created, and
even simple queries take ages to execute because of this...
I know from previous posts that it is not a good idea to create indexes on
fields that are TRANSed from other tables, but we can definitely benefit
from indexing on some of the more-used fields in our tables.  My problem is
on which fields to create these indexes

  Type 
Field. Field. Field Conversion.. Column. Output
Depth 
Name.. Number Definition... Code Heading Format
Assoc..
F1 D1Product Code20LS
PRODUCTI  F1 Product 20LS

Thanks  regards

Arnold Bosch
IT Administrator
Taeuber  Corssen SWA (Pty) Ltd
Email: [EMAIL PROTECTED]

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


Re: [U2] UniVerse:ED:Query

2006-01-23 Thread Mats Carlid

Simple

use another delimiter  any special character will do...


hth

--mats



Hari T. K. Varma wrote:


Hi All,

In ED I would like how can I change/replace a text containing
the delimiter itself i.e. \ as part of the text to be replaced

e.g.

0001: FIRST^253HARI/PROG

In the above line I would like to delete ^253HARI/PROG

Thanks in Advance,

-Hari

 CAUTION - Disclaimer *
This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely 
for the use of the addressee(s). If you are not the intended recipient, please 
notify the sender by e-mail and delete the original message. Further, you are 
not to copy, disclose, or distribute this e-mail or its contents to any other 
person and any such actions are unlawful. This e-mail may contain viruses. 
Infosys has taken every reasonable precaution to minimize this risk, but is not 
liable for any damage you may sustain as a result of any virus in this e-mail. 
You should carry out your own virus checks before opening the e-mail or 
attachment. Infosys reserves the right to monitor and review the content of all 
messages sent to or from this e-mail address. Messages sent to or from this 
e-mail address may be stored on the Infosys e-mail system.
***INFOSYS End of Disclaimer INFOSYS***
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/

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


Re: [U2] Difference between IBM Universe and IBM UniData

2006-01-23 Thread Mats Carlid

[EMAIL PROTECTED] wrote:


Brian, in Number 3 you state,
Variable[2,3] is supported but not Variable[3]
On UniData,Variable[3] will give you the last 3 bytes of the variable.
What does UniVerse do? 

 

The very same...  
Although I consider it relatively new behaviour,  it goes back

at least to release 9, probably way earlier...

-- mats


Bruce M Neylon
Health Care Management Group 
---

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

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


Re: [U2] records with unprintable characters

2005-12-14 Thread Mats Carlid

Sometimes great minds think the same thought;-)

-- mats

Scott Ballinger wrote:


Sorry Mats, I should read deeper into the stack before jumping in...
Didn't notice that you had already suggested the same convert bad.chars
to null solution.

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

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


Re: [U2] records with unprintable characters

2005-12-13 Thread Mats Carlid

ED   in up arrow mode  will do it for a few records.

If there are quite a few records but only a few possible characters
I'd explore the stored commands feature of  ED.

Else  I'd program:

listOfChars = char(128):char(129)CHAR(251)  
loop

   read record  ...
   convert listOfChars  to '' in record
   write record ...
   repeat



HTH
--mats



Carl Sadlier wrote:


Does anyone have a program or suggestions on how to clean up a file that
has control characters and unprintable characters that are not
Subvalue,Value or Field markers?

Thanks,

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

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


Re: [U2] Comparing object code [Was: Deciphering Pick UniBasic statement]

2005-12-12 Thread Mats Carlid

---snip--


You can also know when the files were last compiled by
looking at the dates with ls -al on the binary.  
   



That works as long as the files have not been touched.

 


That's a too innocent formulation - actually you can easily backdate
the unix modification timestamp  -  at least in solaris
-  all that's needed is write permission in the directory.

-- mats


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


Re: [U2] [UV] is there an equivalent to the UD ALL UniQuery keyword?

2005-12-04 Thread Mats Carlid

Yes I know
that's why I asked if it would do.
It was by no means clear if formatting and headings
were required...

BTW  what does ud  LIST ... ALL  do when there are multiple
dict entries for the same field?  Does it list all of them
and if not - how does it select wich one to use ?

--mats


Scott Ballinger wrote:


Unfortunately, LIST-ITEM is just a raw record dump and does not display
field names (just numbers) and does not apply the appropriate
conversions for numbers, dates, times, etc.

I like letting REVISE build the @REVISE item- why not call it from a
trigger whenever the dict is updated?  Or you could probably make an
I-type VOC item called ALL or @ALL that parsed the dict and displayed
all the fields in a pretty way- but that's still a lot of work to
re-create something that UD already does for you.

/Scott Ballinger
Pareto Corporation
Edmonds WA USA
206 713 6006


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Mats Carlid
Sent: Friday, December 02, 2005 12:43 AM
To: u2-users@listserver.u2ug.org
Subject: Re: [U2] [UV] is there an equivalent to the UD ALL UniQuery
keyword?

Would LIST.ITEM be an answer ?

At least it lists all the fields...

-- mats

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


Re: [U2] [UV] is there an equivalent to the UD ALL UniQuery keyword?

2005-12-02 Thread Mats Carlid

Would LIST.ITEM be an answer ?

At least it lists all the fields...

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


Re: [U2] Associated MVs

2005-12-01 Thread Mats Carlid

No problem.

Set up the 'D' dict records of  ADATE ACTIONS OACTIONS and BYS
to have the same  assoc field  say 'X'  and keep your  PH-records.

The you may think of the 'X' as the 'Controlling association code'  and
the  AS_4 and AS_4A as the 'Dependent association codes'

The 'X' describes the 1-1 relation between the values in the fields and
the  PH entries  are not much more than a shorthand  notation for listings.

HTH

-- mats



Bill_H wrote:


Is it possible to assocate the same dictionary item (field definition) to
more than one association phrase?  I'm doing some conversion work and there
are several associations that include some of the same dictionaries.

For example, the following association phrases were created:

Dict Name... Type # Col-Heading Field-Definition

AS_10PH IMPDATE IMPVERSION

AS_4 PH ADATE ACTIONS BYS

AS_4APH ADATE OACTIONS BYS

In a Pick style dictionary this is no problem with the [D]ependent and
[C]ontrolling association codes.  But I can't figure out how to do it here
without creating two new synonym dictionaries for both 'ADATE' and 'BYS'.

Thanks,

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

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


Re: [U2] Shell Dispatch Quoting

2005-11-10 Thread Mats Carlid

Thanks Charles,

I  jumped to using Your U routine and came up with two enhancements.

1)  Print a warning  when  the command supplied uses  all three of  \,' 
and  .

Can anyone dream up a way of handling it instead ?

2)  Add some hardcoded command aliases
  ( It's sooo irritating to shell out from uv to find that your
unix aliases don't work ! )

and in the spirit of open source  the enhanced program is here:



 CMD = TRIMF( @SENTENCE )[' ',2,999] 
 
 IF CMD = OCONV( CMD,'MCU') THEN CMD = OCONV( CMD,'MCL' )
 
 UC = CMD[' ',1,1]   
 **  Some aliases,  change and/or add Your own:
 BEGIN CASE  
 CASE UC = 'll'; CMD = '/usr/ucb/ls -ls ':CMD[' ',2,999]  
 CASE UC = 'ps'; CMD = '/usr/ucb/':CMD   
 END CASE
  
 
 IF INDEX(CMD,'',1) THEN
IF INDEX(CMD,',1) THEN 
   IF INDEX(CMD,'\',1) THEN  
  CRT Sorry, but you've used all quotes!   
  END
   ELSE  
  CMD = '\':CMD:'\'  
  END
   END   
ELSE 
   CMD = SQUOTE(CMD) 
   END   
END  
 ELSE
CMD = DQUOTE(CMD)
END  
 
 EXECUTE sh -c :CMD
 
 STOP
 END 
- 
 

((  For the curious:  /usr/ucb is where the Berkely command versions are 
kept on solaris ))


-- mats

   Intentional overquoting  to faciliate comparisons.   



Stevenson, Charles wrote:


For working at TCL, typing SH -c and proper quote marks, too, is just
way too hard for me.
So I have a little utility verb, U, that just takes everything after
the first word, and dispatches it.
Furthermore, if the entire line is Uppercase (the usual for TCL), then
it figures you probably meant Lowercase (the usual for Unix), so it
flips it before handing it to sh.

  U PWD; LS -L
  U ls -l \SAVEDLISTS\ | grep Nov  9

get executed as

  SH -cpwd; ls -l
  SH -c'u ls -l \SAVEDLISTS\ | grep Nov  9'

respectively.
If you insist on using all 3 (',, and \), you're on your own.

---

PROGRAM U
* Author: Charles Stevenson
* Date  : Jan. 1999
* Type  : General Utility verb
* Desc. : Shells to unix  executes what's on the command line.
* If entire command line is uppercase, converts everything to
* lowercase, first.
CMD = TRIMF( @SENTENCE )[' ',2,999]
IF CMD = OCONV( CMD, 'MCU' ) THEN CMD = OCONV( CMD, 'MCL' )
IF INDEX( CMD, '', 1 ) THEN
 IF INDEX( CMD, ', 1 ) THEN
   CMD = '\':CMD:'\'
 END ELSE
   CMD = SQUOTE( CMD )
 END
END ELSE
 CMD = DQUOTE( CMD )
END
EXECUTE 'SH -c':CMD 
STOP

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

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


Re: [U2] Strange $INCLUDE behavior

2005-10-19 Thread Mats Carlid

Bob Woodward wrote:


I just wanted to report back to everyone that the problem seems to have
disappeared.  I wanted to go back and try some suggestions but I now
can't seem to duplicate the problem.  Everything is back to the way it
was, including the OKAY$ variable, and it all compiles without a hitch.
shoulder shrug



muttering as I walk away, shaking my head  Maybe I should ask them to
increase the dosage of my medicine


 


Don't panic !

I've seen programs unexpectedly start to behave funny where a
recompile and recatalog has cured it.

Yes I checked that the source was not altered after the object code.


In one instance we now know  it was the first warning of an
faulty disk drive  soon thereafter to be replaced...

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


Re: [U2] Strange $INCLUDE problem

2005-10-18 Thread Mats Carlid

Piers Angliss wrote:


valid variable name no longer than seven characters



UV  has discriminated common names up to 31 characters since  release 8 -

maybe earlier -  in my release 4 docs it says 7 -  haven't kept the 
inbetweens.


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


Re: [U2] connection from UniBasic to a SQL database [was What are you using to develop your web pages...] {Unclassified}

2005-10-14 Thread Mats Carlid
gerry-u2ug wrote:

things are not this simle on unix - 3rd party odbc drivers need to be 
purchased , installed  configured.
I have never worked with a client who has gone this route, it never seems to 
be worth the bother  expense.


  

Price shouldn't be a problem with mysql:

 *MySQL Connector/ODBC* (also known as MyODBC) allows you to connect to 
 a MySQL database server using the ODBC database API on all Microsoft 
 Windows and most Unix platforms, including through such applications 
 and programming environments such as Microsoft Access, Microsoft 
 Excel, and Borland Delphi.


   Features

 *Standards compliant*

 The production-ready version of Connector/ODBC is compliant with
 the ODBC 2.50 specification, Level 0 (with some Level 1 and 2
 features). The stable version, is compliant with the ODBC 3.51
 specification, Level 1 (complete Core API and Level 2 features).

 *Cross-platform*

 Connector/ODBC is available for Microsoft Windows, as well as many
 Unix systems (including Linux, Sun Solaris, HP-UX, IBM AIX, and
 Mac OS X).


   Downloads, Licensing, and Support

 Two versions of MySQL Connector/ODBC are available for download:

 * MySQL Connector/ODBC 3.51
   http://dev.mysql.com/downloads/connector/odbc/3.51.html is the
   production-ready version of the driver, and is available under
   the GPL.
 * MySQL Connector/ODBC 2.50
   http://dev.mysql.com/downloads/connector/odbc/2.50.html is the
   old production-ready version of the driver, and is available
   under the LGPL.

 MySQL Connectors are available under the MySQL AB dual licensing 
 model. Under this model, users may choose to use MySQL products under 
 the free software/opensource GNU General Public License 
 http://www.mysql.com/company/legal/licensing/opensource-license.html 
 (commonly known as the GPL) or under acommercial license 
 http://www.mysql.com/company/legal/licensing/commercial-license.html.

from  www.mysql.com/products/connector/odbc

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


Re: [U2] Date Conversion Codes

2005-10-13 Thread Mats Carlid

Stevenson, Charles wrote:


No, I did not know these tricks!  Thank-you, Richard  Stuart.

 oconv( 13801, DWAMADY[', ',' ',2', ',4] ) = THURSDAY, OCTOBER
13, 2005
 oconv( 13801, DWAMADYL[', ',' ',2', ',4] )= Thursday, October
13, 2005
 oconv( 13801, DWAMADY[3'., ',3'. ',2', ',4] ) = THU., OCT. 13,
2005
 oconv( 13801, DYMD[4'',2'',2] )   = 20051013

And the last can swing both ways:

 iconv( 20051013, DYMD[4'',2'',2] ) = 13801

 


The last conversion is also kinda default (at least in uv) :
 iconv( 20051013,D4)  = 13801
and
iconv(051013,D) = 13801
and I think that:
 iconv( 20051013,D)  = 13801

--mats


cds

 


From: Richard Lewis

And did you know you can get that result without multiple conversions?

Try:

DYMD[4'',2'',2]

instead of:

DYMD[4,2,2]}MCN
   


___

 


From: [EMAIL PROTECTED]

  0007: dwamdby[, ,,2, ]
   


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

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


Re: [U2] help with multivalue and when

2005-10-11 Thread Mats Carlid

Jeff Powell wrote:


I am querying a file with multivalued fields but I am not getting a
precise enough selection. I want to find only those records where the
multivalues for two separate fields meet the criteria within the same
index.

The file is the order-log file. There is only one record for each order
number but within that record there is an activity log stored in
multivalued fields.

My desire is to construct (using uniobjects for java) a list command
that returns a list of ids where the transaction matches. In this case I
want to see only those records where action = PCK and act.date =
(today). 


Here is my query:
list order-log when action=pck and when act.date=10/11/05 id.supp
hdr.supp col.hdr.supp count.sup @id fmt 132l

 

Try 


list order-log when ( action=pck and act.date=10/11/05 ) ...


and make sure action and act.date are formally associated.

( Not tested )

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


Re: [U2] OPEN vs. TRANS

2005-10-07 Thread Mats Carlid

Bob Woodward wrote:


I believe, for the most part, you are correct, but doesn't TRANS also do
some work with the system delimiters?  Such as a LOWER() or RAISE()
function on the data that is returned? 


TRANS does indeed return the field  LOWER-ed.

-- mats


Something in the back of my head
is hitting me on this but it may be if you're going to be accessing more
than one field from the same record.  In that case I'd always do an
OPEN/READ, but I'd always try to limit the OPEN statement, especially if
you're calling this subroutine from a DICT entry.  


Bob W

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


Re: [U2] Good Programming Practice Question.........

2005-09-30 Thread Mats Carlid

Serguei wrote:


The one you don't understand what it is doing when you see it for the first
time.

 


I like that ..

but
it might instead be the algorithm that is hard
to understand if you're not familiar with it.

E.g the first time you see a parser 's central loop
you're not likely to grasp it.

But if you've understood the algorithm and the code
still doesn't make sense emediately, then 

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


Re: [U2] CLEARINPUT - Universe

2005-09-29 Thread Mats Carlid

but there is good documentation of INPUTCLEAR  ...

maybe it's only a synonym thrown in to faciliate
migration from some other pick dialect ?

-- mats


Anthony Dzikiewicz wrote:


I don't know why I cant find the CLEARINPUT statement documented.  Maybe
it was a suggestion from the group way back when.  We are working on a
program that pops up error messages.  I want to be sure that the users
see this message.  What happens a lot, is that our 'speed typers' are
about 10 strokes ahead of the program.  A lot of what they do is
redundant and they arent always in the habit of paying attention to what
is on the screen.  So, I asked the programmer working on this to put a
CLEARINPUT before the pop up messages.  This way, the error message will
have a better chance of being seen.

I have used CLEARINPUT in the past and this statement is in a handful of
existing programs.  The programmer said she had never heard of this and
when she looked in the manual and HELP BASIC CLEARINPUT.  She didn't
find anything.  So, now Im wondering - how did I find out about this ?
I looked in an old (real printed and bound) BASIC manual and I didn't
find it.  I looked in the PDF BASIC manual and I didn't find it.
Actually, it is in the reserved word list.

I would assume this is still a valid command - it does compile.

Can anyone enlighten me ?  My concern is that this could be an old
command that was replaced by something new ?  I don't want to continue
to use something that might not be supported.

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

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


Re: [U2] LPTR / SETPTR / print from a specific tray

2005-09-21 Thread Mats Carlid

And in postscript :
-

/DeferredMediaSelection true /MediaPosition 0  
  setpagedevice   




Substitute the tray number for 0  .

Warning: I've seen the MediaPosition to physical tray mapping
vary between individual printers-

-- mats


Burwell, Edward wrote:


Hey Paul,  Do you (or anyone else) know how to tell a LaserJet to draw paper
from a specific tray?

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


Re: [U2] RE: Named Common

2005-09-06 Thread Mats Carlid

Yes it's a possible way of 'remembering' some values but we
ruled it out for the same reason as unnamed common -  sooner
or later you'll interact with a subroutine or function that also
uses them  and then ...

btw  named common isn't quite safe either -
it's possible that another routine uses the same name
for it's common ...

What's really needed is a  'local static'  modifier.

-- mats


David A Barrett wrote:


How on earth do You implement a persistent local variable without
using named common ??

- -- mats
   



@USER0
@USER1
@USER2
@USER3
@USER4

This is also in the manual.   :)

Dave Barrett,
Lawyers' Professional Indemnity Company
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/

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


Re: [U2] RE: Named Common

2005-09-03 Thread Mats Carlid

How on earth do You implement a persistent local variable without
using named common ??

-- mats

PS

I started using  mv  when Olof  was in Rosenbad...   :-)

Clue in case somebody on this list is not on first name base with 
swedish prime minsters:

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


Re: [U2] UniSubroutine: ErrorCode: 30106: Wrong number of arguments supplied to the subroutine

2005-09-02 Thread Mats Carlid

Mark Johnson wrote:

snip 


On another note, I've yet to come across any apps that use the NAMED COMMON
concept. Is that a recent addition to the MV world or just not that popular.
 

We started in Prine information in the early 80's and used named common 
from day 1.


Unnamed common was deemed to be too dangerous if/when coexisting with 
another

application or general subroutines  in the same environment  and thus
_never_  used it  -  I tend to forget that it exists.

Perhaps my fortran background with a similar  common concept played a 
role...   ;-)


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


Re: [U2] [UV] Select Question

2005-07-14 Thread Mats Carlid

I'm aware of two differences that may be of importance

- if we're speaking uv -

The LIST alternative is immune to a secondary select
inside the loop  -  possibly well hidden in an itype in
a subroutine of an subr


The bare select lets the readnext loop start emediately
and saves (probably) one traversal of the file.


So yes You'd save overhead - lot's of wall clock time
and io but probably not that much cpu.

hth
-- mats


[EMAIL PROTECTED] wrote:


Hi all,

Can someone tell me the diference between the following two examples of 
executing an external select?

SELECT FILE TO LIST
LOOP
   READNEXT ID FROM LIST ELSE ID = @AM
UNTIL ID = @AM DO
REPEAT

SELECT FILE
LOOP
   READNEXT ID ELSE ID = @AM
UNTIL ID = @AM DO
REPEAT

Someone pointed out to me that there is overhead in selecting to a list that I 
need not be exposing myself to.  Aren't they both kind of reading from a list 
somewhere anyways?

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

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


Re: [U2] [UV] Select Question

2005-07-14 Thread Mats Carlid

gerry-u2ug wrote:


is this true ?  I have never experienced the slowdown of the initial 
traversal and can't see the need for it - this statement just uses a 
different select list other than zero.  now if the question had been regarding SELECTV 
rather than SELECT, then I would agree.

Gerry


 


Mea culpa!

As  there's no way you can assign the resulting select list to a 
variable without
first  'traverse' the file -  that is without at least read the  list of 
record-id
in each page ( or hash point ) I jumped to the conclusion that there 
would be..


But evidently the implementation is such as the variable is not assigned 
to/with/as

the full list before the program continues with the loop.

That also explains why you can't do much else than readnext with
a list variable -  dcount it for example.


Took a large file  used both methods and printed the first
readnext'ed id   and timed it for proof - both ways printed
emediately.

(But I had to SELECTV  for the list variable case )

-- mats


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Mats Carlid
Sent: Thursday, July 14, 2005 06:22 AM
To: u2-users@listserver.u2ug.org
Subject: Re: [U2] [UV] Select Question


I'm aware of two differences that may be of importance

- if we're speaking uv -

The LIST alternative is immune to a secondary select
inside the loop  -  possibly well hidden in an itype in
a subroutine of an subr


The bare select lets the readnext loop start emediately
and saves (probably) one traversal of the file.


So yes You'd save overhead - lot's of wall clock time
and io but probably not that much cpu.

hth
-- mats


[EMAIL PROTECTED] wrote:

 


Hi all,

Can someone tell me the diference between the following two examples of 
executing an external select?

SELECT FILE TO LIST
LOOP
  READNEXT ID FROM LIST ELSE ID = @AM
UNTIL ID = @AM DO
REPEAT

SELECT FILE
LOOP
  READNEXT ID ELSE ID = @AM
UNTIL ID = @AM DO
REPEAT

Someone pointed out to me that there is overhead in selecting to a list that I 
need not be exposing myself to.  Aren't they both kind of reading from a list 
somewhere anyways?

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


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

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


Re: [U2] THE variable names

2005-07-12 Thread Mats Carlid
Warning !

In this thread we've seen three looping mechanisms been presented
as equivalent  ( pairwise, first i and ii then ii and iii):

i)

  N = DCOUNT( PRODS,@VM)

 FOR II=1 TO N
 X  =  PRODS1,II
...
 NEXT II

 
ii)

LOOP
   REMOVE PROD FROM PRODS SETTING MORE.PRODS
   ...do stuff...
WHILE MORE.PRODS
REPEAT



  

iii)

SELECT PRODS
and then 
READNEXT PROD ELSE DONE = TRUE

  


They are not!


i)   extracts  full values  regardless of the presence of lower level 
marks in them.

ii)  extracts the smallest items between marks of any level

iii)  extracts  fields ( attibutes ) .
   

except in the common case that there is only one level of marks
(and that the first and third are adjusted to that level of course )


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


Re: [U2] I can't delete a file.

2005-06-21 Thread Mats Carlid

OS file doesn't exist
or  You don't have permissions
either (not) write permissions on the file
or write in the directory emediately above the file
or list permissions somewhere higher up int the hierarchy.

-- mats


Cisar Riba Cervera wrote:


Hello

   Can help me

   I can't delete a file.   Why?

This is the message in Universe

   DELETE.FILE GCARECLAM
   Unable to DELETE file GCARECLAM



Cisar.






--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.323 / Virus Database: 267.7.9/23 - Release Date: 20/06/2005
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/

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


Re: [U2] OCONV of no affect.

2005-06-20 Thread Mats Carlid

Mark Johnson wrote:


I'm not looking for a programming alternate or suggestions. Just a null
conversion.

I didn't invent this situation. It's just one of the zillions of examples
that I inherit with my client's systems.

Under certain circumstances, a single data field contains multiple types of
data. This may be dependent on another field.

Thus, code like this exists:

IF REC5=N THEN
   PRINT OCONV(REC6,MD2)
END ELSE
   PRINT REC6
END

Sometimes both have a conversion and I do this to save typing lines:
IF REC5=N THEN CONV=MD2 ELSE CONV=D2/
PRINT OCONV(REC6,CONV)
 

Why not save another line :(and a processor cycle or two  not storing 
CONV ):

PRINT  OCONV( REC6, (IF REC5=N THEN MD2 ELSE D2/ ) )

:^)

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


Re: [U2] OCONV of no affect.

2005-06-20 Thread Mats Carlid

Mark Johnson wrote:


Mats: Will that work. I've always thought any boolean in an () results in
either a 0 (false) or 1 (true).
 




Why not save another line :(and a processor cycle or two  not storing

CONV ):
PRINT  OCONV( REC6, (IF REC5=N THEN MD2 ELSE D2/ ) )




You're right, booleans do -  but this is an conditional expression and 
returns either

the THEN expression or the ELSE expression.


BTW, why did microsoft assign (-1) as true. I don't think (1) works as true
and, while being 'not zero', is hard to use mathematically.

 

Of the microsoft part I know nothing  but in u2  zero is false and 
anything else is true
thus  mapping OR to + and AND to *  doesn't work unless your variables 
are unsigned.


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


Re: [U2] Include Vs Call - Software Maintenance

2005-05-20 Thread Mats Carlid
We use functions heavily - having an include for each project
with up an over a hundred deffun's -  and I only have two
issues/complaints with them.
First the need to have deffuns
and second, the spurious warning messages we get at compile
time for  internal returns not having a return value .
I mean they don't return anything and IMNSHO shouldn't
have one. 
( We use   return (dum)  as a workaround )

-- mats

Mark Johnson wrote:
snip
 

This causes me to think of the complement to subs and that is functions.
Functions are quite useful in VB (et al) yet don't show up at all in legacy
code and don't get that much airtime here on this forum. I've only ran into
them once on UD when hooking into Redback. Every time I write a SUB that
really is a function in purpose, I tend to name it GET.PRICE or GET.USER or
GET.PRINTER etc.
So are functions a kept secret in MV programming or has no-one had any
issues with them? I'd like to know so I could either get better with them or
ignore them and continue with subs.
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] I'm in an Array quandry, any suggestions...

2005-05-20 Thread Mats Carlid
[EMAIL PROTECTED] wrote:
In a message dated 5/18/2005 11:50:38 PM Pacific Daylight Time, [EMAIL PROTECTED] 
writes:

 

OK, sure.  But readnext doesn't  really work on an array but on a select 
list.
   

Ah but that's not so.
You can SELECT myVAR
You can SELECT myVAR to LIST5
You can SELECT myVAR to MyLIST
and then you *can* in fact READNEXT your array.  Selecting the variable turns 
a dynamic arry into a list type variable.

Will Johnson
---
Will,  try
myVar = 1:@FM:2
SELECT myVar
myVar1 = 3
READNEXT   X  THEN PRINT X
the result is   1 
thus readnext  _doesn't_   read my array..

But of course you may user readnext to step thru an array
with this technique  --
if you keep in mind that it is an old image of the array
that you processing - and mostly it doesn't matter
as the array doesn't change.
-- mats
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] I'm in an Array quandry, any suggestions...

2005-05-19 Thread Mats Carlid
[EMAIL PROTECTED] wrote:
In a message dated 5/18/2005 2:16:35 AM Pacific Daylight Time, [EMAIL PROTECTED] 
writes:

 

Well it already needs both variables  in the  'sequential' access too !
How would it even know that the access is for the next atrribute if it 
didn't keep track of the index?

-- mats
   

Because READNEXT doesnt specify what cell you want.  It just says get the 
next one whatever number that is.  So for Readnext you'd only need a pointer to 
the last char position of the last delimiter viewed.  You wouldn't need to 
know what cell number that represents.
Will
---
 

OK, sure.  But readnext doesn't  really work on an array but on a select 
list.

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


Re: [U2] I'm in an Array quandry, any suggestions...

2005-05-18 Thread Mats Carlid
[EMAIL PROTECTED] wrote:
In a message dated 5/16/2005 5:00:45 AM Pacific Daylight Time, [EMAIL PROTECTED] 
writes:

 

Yes. But it only works when stepping through an array in a READNEXT 
fashion. So if you're accessing fields in random order (as a lot of my 
code does) you gain nothing.

 

No  it does work even when you access the dynamic array in random order. 
It then
provides an alternative starting point for the search to use instead of 
character 1.

   

I'm not sure this is accurate.
This would imply that not only would the run-time engine have to maintain a 
pointer to the last cell referenced, but also it would have to maintain a 
register telling it the cell number of this cell (not just its offset).  So it 
needs two variables.  I've never heard that it actually uses two variables to 
accomplish this.
  Perhaps someone in the internals could answer that question.
So again, it would need one variable to tell it the offset (example: my last 
reference ended at character 96 of the string ... or position 2345 of the 
frame, or something of that sort); AND another variable to tell it the cell number 
(example: my last reference was to cell number 4).
  Otherwise, random access into a dynamic array would not be improved by the 
method talked about in this thread.
Will Johnson
---
 

Well it already needs both variables  in the  'sequential' access too !
How would it even know that the access is for the next atrribute if it 
didn't keep track of the index?

-- mats

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


Re: [U2] I'm in an Array quandry, any suggestions...

2005-05-16 Thread Mats Carlid
Anthony W. Youngman wrote:
In message [EMAIL PROTECTED], Roger Glenfield 
[EMAIL PROTECTED] writes

Payback during 2nd generation Pick was 10-20 attributes.  Back then, 
the problem was to not oversize because it slowed down the 
read/writing of the blank attributes.

Didn't we hear/read recently that the new compiler and/or run time 
machine  is keeping track of  individual attribute marks in dynamic 
arrays, so that a full string search is not necessary every time?

Yes. But it only works when stepping through an array in a READNEXT 
fashion. So if you're accessing fields in random order (as a lot of my 
code does) you gain nothing.

No  it does work even when you access the dynamic array in random order. 
It then
provides an alternative starting point for the search to use instead of 
character 1.
This will be used in about half of the searches ( when the last access 
was 'lower'
than the new one ) and in that case on the average cut the search in half.
Thus I'd expext a 25% performance gain when keeping track of accesses 
compared
to the old brute force method - for the random access case..

I don't know any details of the implemetnation but it is possible that 
the last access
pointer could occassionally be used to search backwards  when some rule 
of tumb
says it would be faster - thus making the 'new' approach even better.

But the real reason for using dimensioned arrays is -  as already 
pointed out by others -
the huge gain when inserting data that makes the array grow.

On the other hand - a possible reason to use dynamic arrays for efficiency
might be a number of LOCATEs ...
-- mats
Cheers,
Wol
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] Validating an email adress

2005-05-04 Thread Mats Carlid
To check the domain I use


this for unix only  and You may have to add the path to nslookup.

If  someone does not understand the swedish message   - if any -:)
it translates to Nonexistent mail adress domain

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


Re: [U2] Validating an email adress

2005-05-04 Thread Mats Carlid
Oops  the paste didn't work as expected -
looked good but disappeared when sending -
but here it goes:
Mats Carlid wrote:

To check the domain I use:
  
 EXECUTE  \SH -c nslookup -q=MB \:DOMAIN:\\ CAPTURING RESULT 
   
   
 IF (INDEX(RESULT,Non-existent,1)) THEN  
ERR.M =  Mejladressens domdn finns inte! 
RETURN (1) 
END
   

this for unix only  and You may have to add the path to nslookup.
If  someone does not understand the swedish message   - if any -:)
it translates to Nonexistent mail adress domain
-- mats
---
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] uvo.net UvBasic .Net

2005-04-28 Thread Mats Carlid
U2 are 'semi-compiling'   like  pascal and java...
That is the source code is parsed and transformed to a low level
- easely parsed - language that is interpreted at run time.
-- mats

Roger Glenfield wrote:
Isn't Universe/Unidata still using a runtime interpreter instead of 
generating assembler code?

David Jordan wrote:
The concept of having Basic.Net assembly language is one I am 
interested in
too.  One could write the business rules in PICK Basic in a class and 
use VB
or C# to develop the GUIs.  Best of Both Worlds.

I don't believe it is too complex; one of the open source PICK 
developers
may be able to adapt their compilers to the .Net framework to achieve 
this.

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


Re: [U2] [UV] ACOS problem (floating point numbers)

2005-04-15 Thread Mats Carlid
[EMAIL PROTECTED] wrote:
 snip

Umm... the mathematical inverse of cosine is secant, i.e., cos x = 1/(sec
x).  Likewise, the mathematical inverse of sine is cosecant, and of
tangent, cotangent.  Arc trig x has, to my knowledge, always been the
angle who's trig is x
 

(I think) he meant  that arccos is the  _inverse function_  to cos   like:
x = arccos ( cos(x))  

-- mats
  

--Tom Pellitieri
 Toledo, Ohio
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] UD, NFA

2005-04-14 Thread Mats Carlid
Hi Bjvrn
at  the very least You need to change the ip-adress from localhost to 
the real one...

-- mats
Bjvrn Eklund wrote:
Unidata 5.2, Solaris 8
Hi,
does anyone know if you can use NFA (network file access) to access DIR-type
files.
I would like to run a program on one machine but the source code is on
another machine.
I tried this:
:ED VOC BP.PROD
Top of New IB.MAIN.PROD in VOC.
*--: I
001= FX
002= UDT
003= MACHINE 127.0.0.1, VOC /usr/ud52/demo, FILE BP, UDTHOME /usr/ud52, UDT
BIN /usr/ud52/bin
*--: FI
Filed BP.PROD in file VOC.
But when I run a program I get the following error message:
:RUN BP.PROD LIST.CUSTOMER
RUN IB.MAIN.PROD FA.IN.KUND.BAS
IB.MAIN.PROD is not Directory type.
Or if someone has another way of achiving my goal 

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


Re: [U2] [UV] reference a variable indirectly?

2005-04-13 Thread Mats Carlid
Barry Brevik wrote:
UV 9.6.1.3 on Windows.
For the longest time this has been bugging me, but right now I could really
use this capability.
Does anyone know if it is possible to reference a variable indirectly? IOW,
I want to be able to store variable names in a file (for example), and then
assign values to those variables as the program encounters them.
For example, something like this:
PARTNO = ''; LOTNO = ''; PARTNAME = ''
VAR.NAMES = 'PARTNO':@FM:'LOTNO':@FM:'PARTNAME'
*
* Next, a magic command that makes the variable
* refered to by VAR.NAMES2 equal to 'it works'.
(VAR.NAMES2) = 'it works'; * I know this does not work, just example.
PRINT LOTNO
*
* Variable LOTNO is now eq 'it works'.
Possible??
Barry
 

No there is no way to do that. You'd need an 'eval' function/statement.
But You can do something similar with a subroutine and a function.
Subroutine   SET( variable name,  value )
Function  VAL( variable name )
They need to share a common ( or a file ) where variable-value pairs are 
stored.

A straight forward implementation would be to search for the variable name
in an mv-string and use the index to look up the value from another mv
string.  If  you know the number of entries you can use arrays.
Even if you don't you can still use arrays by running imformation style 
allowing
them to be redimensioned.

Then Your program would look like:
 DEFFUN  VAL( var )  CALLING VAL
 CALL  SET( 'LOTNO', 'it works' )
 PRINT VAL( 'LOTNO' )

Naive untested implementation. If heavily used you'd need to hash
e.g.  as MOD( SEQ(VAR[1,1])*LEN(VAR), N )+1   where N is the
number of hash points  and the dimension of  VARS and VALS.
SUBROUTINE  SET( VAR, VAL)
COMMON /..SET/  VARS, VALS
LOCATE VAR IN VARS1 SETTING II THEN
VALSII = VAL
END
ELSE
VARS-1 = VAR
VALS-1 = VAL
END
RETURN
END

FUNCTION  VAL( VAR )
!!  Hashed version
COMMON /..SET/ VARS(N), VALS(N)
HASH =  MOD( SEQ(VAR[1,1])*LEN(VAR), N )+1
RES = 
LOCATE VAR IN VARS(HASH)1 SETTING II THEN
   RES =  VALS(HASH)II
   END
RETURN (RES)
END
-- mats
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] Extending U2 with gci/CALLC -- Factory Floor Automation - Serial Connectivity ?

2005-04-12 Thread Mats Carlid
We have used cgi.
Or rather an ex-client did.
This was way back (release 5?, 6 and 7 ) and the first  re-make of uv was
quite a nightmare with lots of errors - later makes were just adventorous.
-- mats
Ed Clark wrote:
As a curiosity, how many people have used universe gci or the unidata
equivalent with CALLC/CallBasic to extend the capabilities of U2? 
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] Complicated Select

2005-04-12 Thread Mats Carlid
Maybe  ( at the cost of an extra sort - it's the .EXP that we want )
SELECT FILE_A BY.EXP RECORD_A SAVING RECORD_A
SELECT FILE_B WITH NO @ID = AA BB CC  SELECT.ONLY
or have I misunderstood the query  or used somethg uv-specific?
-- mats

Aherne, John wrote:
Hi all,
I want to do a complicated select statement in UD. Basically, I
have a list of items AA, BB, CC. I want to do a select along these
lines:
SELECT FILE_A WITH RECORD_A IN (SELECT FILE_B WITH NO @ID = AA BB
CC)
RECORD_A is MV
Is there a way to do this in UD?
TIA,
   John Aherne
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] Complicated Select

2005-04-12 Thread Mats Carlid
To fast to send 
You also get a potentially very long list of values not present in
FILE_B  so You'd want to have  HUSH ON OFF around the second select.
--
Maybe  ( at the cost of an extra sort - it's the .EXP that we want )
SELECT FILE_A BY.EXP RECORD_A SAVING RECORD_A
SELECT FILE_B WITH NO @ID = AA BB CC  SELECT.ONLY
or have I misunderstood the query  or used somethg uv-specific?
-- mats

Aherne, John wrote:
Hi all,
I want to do a complicated select statement in UD. Basically, I
have a list of items AA, BB, CC. I want to do a select along these
lines:
SELECT FILE_A WITH RECORD_A IN (SELECT FILE_B WITH NO @ID = AA BB
CC)
RECORD_A is MV
Is there a way to do this in UD?
TIA,
   John Aherne
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


  1   2   >