Re: [U2] Blink Error - Backward Link error

2005-09-28 Thread Stephen O'Neal
Good Catch Karl!

Light bulb went off... Yes it truncates the group, not the file.  I 
remember Mark talking that if a file is tremendously undersized and has 
lots of overflow groups, the damage would be more severe.  Really makes 
sense now. 
   Steve

Correction, you should only see loss of data after the BLINK error in he
affected group only.

Karl Pearson
Senior uniVerse DBA and one who cut his teeth fixing blinks by hand
(thanks to Mark Baldridge and Joel Yates).

quote who=Stephen O'Neal
 Anmol,

...When they fix the file, the file will be truncated at
 the group where this occurred.  This can be anywhere in the file, 
because
 the group extended for overflow can be anywhere in the file.  You may 
end
 up with a file that is considerably smaller than your original file!

 A wake up call for others:  Watch out for your 2gb file limits on static
 files.

 Good luck in recovering your data!

 Regards,
Steve

 Anmol Chandrakant Khopade [EMAIL PROTECTED]

 Hi,

 I am receiving the following error:

 Computed blink of 0xB44 does not match expected blink of 0x0!

 Detected within group starting at address 0x8000!

 Internal data error.

 ...

 Warm regards

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


Re: [U2] Blink Error - Backward Link error

2005-09-28 Thread Martin Phillips
Why, oh why, doesn't UV fail the write before it corrupts the file? It is
trivial to know that this is about to happen.


Martin Phillips
Ladybridge Systems
17b Coldstream Lane, Hardingstone, Northampton NN4 6DB
+44-(0)1604-709200
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


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

2005-09-28 Thread u2
[EMAIL PROTECTED] wrote:
 We also use xnn.meaningful.name type labels. One advantage is that our
 editor can recognise a label and putting the cursor on a line that
 includes a GOSUB and pressing one function key will move the cursor
 directly to the correct paragraph.
 
 One thing I've never agreed with (except in COBOL) is every internal
 subroutine should only have on exit point - why?
 
Because it makes flow of control so much easier ... but mostly where I've 
seen it, it DOES make an exception for error handling. Maybe rephrase it - 
every internal subroutine should only exit from one point if it completes 
successfully.

My two favourite rules were if a single logic-block won't fit on one screen, 
it's too big, and if a single section of code won't fit on one page of 
printout, it's too big.

One of my colleagues tends to work to the mantra if it's only used once, it 
should be in-lined. Leads to huge programs where you enter at the top, fall 
out at the bottom, and get hopelessly lost in the detail. As the OO guy said, 
three lines is too big (I think that's an exageration :-) but DON'T start 
using trees to hide the wood! The ONLY time I would agree with inlining stuff 
like that is if your program doesn't have flow-control (ie, there are no loops 
(or backwards gotos in FORTRAN :-).

So I tend to program with each section controlling a layer and calling 
subroutines (CALL or GOSUB, doesn't matter, usually GOSUB) to handle the tasks 
in the layer below. Which may themselves actually do something, or be a control 
layer.

Actually, to sum up both my rules above, if there's a backward jump (LOOP, 
GOTO, FOR NEXT, whatever), and you can't see *both* the *start* *and* *end* at 
the same time on your preferred medium for making changes (screen for a small 
block of code, printout for the entire function, for me), then it's too big. 
(That's why it's *one* *page* of printout - I don't consider sheets of printout 
strewn over my desk as a preferred way of editing something! :-)

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


SV: [U2] UD, MD5 Hash algoritm

2005-09-28 Thread Björn Eklund
Thanks for your answers, this led us to the DIGEST command which do the
trick for us.

Bjvrn Eklund

-Ursprungligt meddelande-
Fren: Craig Bennett [mailto:[EMAIL PROTECTED]
Skickat: den 28 september 2005 04:45
Till: u2-users@listserver.u2ug.org
Dmne: Re: [U2] UD, MD5 Hash algoritm


Bjorn,

the past few releases of UD have allowed the use of the ENCRYPT function 
specifically for MD5 hashing.

I have some source code that Dave Meagher wrote. It claims to do 
encryption (BLOWFISH, CIPHER, ICRYPT, IDEA) and hashing (MD5, SHA1). I 
have no idea if it works but I can send it to you if you would like.

 From memory these have to do all sorts of fiddly things because UV/UD 
don't support unsigned 32bit integers.

The UD routines which call openssl will be several orders of magnitude 
faster.


Craig
---
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/


FW: [U2] Blink Error - Backward Link error

2005-09-28 Thread Stevenson, Charles
Do I detect an enhancement suggestion?
Whether this is trivial or hard is beyond me, but I tend to believe Mr.
Phillips.
(On this subject, anyway.  I don't know his opinion of the British
Royals, for example.) 

cds

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Martin Phillips
Sent: Wednesday, September 28, 2005 1:11 AM
To: u2-users@listserver.u2ug.org
Subject: Re: [U2] Blink Error - Backward Link error

Why, oh why, doesn't UV fail the write before it corrupts the file? It
is trivial to know that this is about to happen.


Martin Phillips
Ladybridge Systems
17b Coldstream Lane, Hardingstone, Northampton NN4 6DB
+44-(0)1604-709200
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


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

2005-09-28 Thread BNeylon
I may have missed someone else mentioning this, don't open files in an 
external subroutine that is called from within a loop.  Yeah, yeah, I know 
you can set up a common, but isn't it cleaner to open the file in the main 
routine?

Bruce M Neylon
Health Care Management Group 
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] Blink Error - Backward Link error

2005-09-28 Thread karlp
Wow, what a concept! But then, that would reduce a bit of job security for
folks like me, wouldn't it? I've always told clients going in that if I do
my job right, I'll be out of a job. Yes, I tell my clients that. It's
basically true, but there are certainly glaring exceptions.

Karl

quote who=Martin Phillips
 Why, oh why, doesn't UV fail the write before it corrupts the file? It is
 trivial to know that this is about to happen.


 Martin Phillips
 Ladybridge Systems
 17b Coldstream Lane, Hardingstone, Northampton NN4 6DB
 +44-(0)1604-709200
 ---
 u2-users mailing list
 u2-users@listserver.u2ug.org
 To unsubscribe please visit http://listserver.u2ug.org/



-- 
karl

 _/  _/  _/  _/_/_/      __o
_/ _/   _/  _/_/   _-\._
   _/_/_/  _/_/_/ (_)/ (_)
  _/ _/   _/  _/   ..
 _/   _/ arl _/_/_/  _/ earson[EMAIL PROTECTED]

--
IT Director, ATS Industrial Supply, Inc.
http://www.atsindustrial.com
Toll-free: 800-789-9300 x29
Direct2Desk: 801-978-4429
Facsimile: 801-972-3888
--
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2][UV] Universe and .NET

2005-09-28 Thread Don Kibbey
Regarding the patch.  With the original release of UniObjects.net
there was a significant performance issue.  A different release or
patch was given limited release in November of 2004.  This patch
fixed all the performance issues.  My problem was that my var did not
or was not able to get a reference to this patch from IBM. 
Subsequent releases of UniVerse after November of 2004 probably (I
would hope) include the performant (yes it's a word, they said so here
on this forum!) version.

For me, I ended up downloading the patch from a web site in South
Africa.  That web site was with a var who obviously had a leg up
technically from the one I'm used to dealing with

Hope that clears up any confusion regarding the patch.
---
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-28 Thread Marilyn Hilb
Two items I have thought of.

1. In addition to putting a modification tag at the top of the code with 
who/date/what, we also will assign a job number to the mod in addition to a No 
for the mod. Such as mod 01. Then throughout the code where the changes are 
made we put a tag such as *01 start  and *01 end or, just a single tag 
at the end of the line if only one or two lines being changed. This makes the 
changes very easy to search for and spot should there be problems in the new 
code.
2. Consider when to use a paragraph and when to use a program. Paragraphs 
(proc) certainly has their uses, but when the paragraph gets to using IF, Case, 
locate, etc seems time to use a program.  For two reasons. One being while 
paragraphs (at least in SB+) can do a lot, getting it to do everything a 
program can do can be difficult. If you have an involved paragraph, sooner or 
later you'll be adding to it and find you can't easily add what you want to 
add, that it needs to be a program. Second reason being some of the commands 
are different syntax in a paragraph vs a program, why learn/memorize or have to 
look up two different syntaxes? 
---
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-28 Thread vance . alspach
Also,

I would always put the change date/time stamp on the same line, descending 
order, that way you can use/develop utilities to make mass changes 
(increase matrix size) and reliably insert a date/time stamp for the 
change.

In my current job, we place the date/time stamp at the end and therefore 
cannot reliably automatically place a comment in the log since the 
position with differ with each program..


Vance Alspach
J  L Industrial Supply




Marilyn Hilb [EMAIL PROTECTED] 
Sent by: [EMAIL PROTECTED]
09/28/2005 10:47 AM
Please respond to
u2-users@listserver.u2ug.org


To
u2-users@listserver.u2ug.org
cc

Subject
RE: [U2] Good Programming Practice Question.






Two items I have thought of.

1. In addition to putting a modification tag at the top of the code with 
who/date/what, we also will assign a job number to the mod in addition to 
a No for the mod. Such as mod 01. Then throughout the code where the 
changes are made we put a tag such as *01 start  and *01 end or, 
just a single tag at the end of the line if only one or two lines being 
changed. This makes the changes very easy to search for and spot should 
there be problems in the new code.
2. Consider when to use a paragraph and when to use a program. Paragraphs 
(proc) certainly has their uses, but when the paragraph gets to using IF, 
Case, locate, etc seems time to use a program.  For two reasons. One being 
while paragraphs (at least in SB+) can do a lot, getting it to do 
everything a program can do can be difficult. If you have an involved 
paragraph, sooner or later you'll be adding to it and find you can't 
easily add what you want to add, that it needs to be a program. Second 
reason being some of the commands are different syntax in a paragraph vs a 
program, why learn/memorize or have to look up two different syntaxes? 
---
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] Good Programming Practice Question.........

2005-09-28 Thread Paul Trebbien
Regarding the origin and revisions to software, DataFlo programmers pretty
much have followed the policy where you try to flag all revisions in the
software using the following convention:
* Baseline changes use just a rev#, for example rev 01
* DataWorks use a rev# starting with a C, for example REV C1
* Custom  Customer Programmers using a rev# starting with Z, for example
REV Z1

Here is an excerpt illustrating this from a heavily modified program
(from one of my customers):

0015: * D/W CUSTOM REVISIONS
*
0016: ** Z5,04-20-04,KT-22,pault: Print SURCHARGE in footing instead of CUR.
0017: ** Z4,03-15-02,KORE,EWY: Display NET xxx DAYS
0018: ** Z3,01-03-02,KT-3024,CWV: Add copper credit to output
0019: ** Z2,04-24-00,KT2002,CWV: Remove REV 22, ALLOW ZERO DOLLAR INVOICE
PRINT
0020: ** Z1,04-10-00,KT2001,CWV: Identify if report or proc
0021: ** 1C,03-05-99,39705,GEH: Added custom MFG PART number print
0022:  R E V I S I O N S
*
0023: ** 24,12-17-98,APP-079,EMW: Change dates to 4-digit year.
0024: ** 23,04-07-99,AR-1103,ABC: Print total with 2 decimal places.

0048: ** 00,09-11-95,AR-825,MLP: Rewrite at Rev 2.

and the revisions are flagged like so:

0084: * REV 1C
0085:  READV MFGPART.FLG FROM F.TABLE,PRT-CUST-PART,2 ELSE
MFGPART.FLG=N
0086: * END REV 1C

0096:ZERO.LI= ;  * REV 4

0158: * REV 7  Assign DTL 
0159:DTL = 
0160: * END REV 7

0938: * REV Z5
0939: *WORKVAR=WORKVAR:DISCPCTR#6: CUR
0940:  WORKVAR=WORKVAR:DISCPCTR#6:  SURCHARGE
0941: * END REV Z5

Note:
*   Revving your work this way usually makes it fairly easy to see what
was added (REV 1C and REV 7) and what was changed (REV Z5).
*   Usually the baseline revisions are removed in a major software
release - only in the baseline software.
*   When we 'upgrade' the software for a customer, for customized
software components (i.e. Programs, Procs, Reports), we merge the baseline
revisions into the customized software or visa versa (easier route).  Using
comparison tools the differences in the software component is pretty easy to
find and usually pretty clear as to what to change.

Have a Great Day!

 Paul Trebbien
 Kore Technologies, Senior Support Tech. 
 Solutions that work. People who care.
 V 858.678.0030 F 858.300.2600 W koretech.com
 


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Marilyn Hilb
Sent: Wednesday, September 28, 2005 7:48 AM
To: u2-users@listserver.u2ug.org
Subject: RE: [U2] Good Programming Practice Question.


Two items I have thought of.

1. In addition to putting a modification tag at the top of the code with
who/date/what, we also will assign a job number to the mod in addition to a
No for the mod. Such as mod 01. Then throughout the code where the changes
are made we put a tag such as *01 start  and *01 end or, just a
single tag at the end of the line if only one or two lines being changed.
This makes the changes very easy to search for and spot should there be
problems in the new code.
2. Consider when to use a paragraph and when to use a program. Paragraphs
(proc) certainly has their uses, but when the paragraph gets to using IF,
Case, locate, etc seems time to use a program.  For two reasons. One being
while paragraphs (at least in SB+) can do a lot, getting it to do everything
a program can do can be difficult. If you have an involved paragraph, sooner
or later you'll be adding to it and find you can't easily add what you want
to add, that it needs to be a program. Second reason being some of the
commands are different syntax in a paragraph vs a program, why
learn/memorize or have to look up two different syntaxes? 
---
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] Good Programming Practice Question.........

2005-09-28 Thread Allen E. Elwood
You know, I've seen a lot of people get really steamed that there was a
RETURN in the middle of a well structured subroutine.  Mostly because these
people SCREWED UP when they put something at the bottom of the subroutine
without checking, or worse TESTING the product before shoving it blindly
into production.

I see nothing wrong with a RETURN - especially in a validation subroutine.
Now.an update subroutine is perhaps a bit different.  If that needs to
be broken up, I usually do it at the CALLING level, i.e.:

BEGIN CASE
  CASE LEVEL1
GOSUB LEVEL1.UPDATES
  CASE LEVEL2
GOSUB LEVEL2.UPDATES
  CASE REPRINT
GOSUB BUMP.REPRINT.COUNTER
END CASE

Here's something I thought about while looking at the possibility of not
putting in a RETURN while at the same time keeping the code structured
without a bunch of indented tabs:

B00.PROCESS:
  BAD.HAPPENED = 1
  LOOP
READ REC1 FROM file1,id1
  ELSE EXIT
END
READ REC2 FROM file2,id2
  ELSE EXIT
END
IF some.condition
  THEN EXIT
END
BAD.HAPPENED = 0
EXIT
  REPEAT
  IF NOT(BAD.HAPPENED) THEN
some more statements
that actually do the work with REC1  REC2
  END
RETURN

This does make it apparent that the subroutine is not being abandoned, while
making a unique use of the LOOP/REPEAT/EXIT construct, in that it is not
really a loop, but a method used for 'bouncing out'.  It begins by assuming
BAD.HAPPENED and will only negate this if it reaches the bottom of the
decision stack.

I've never used this before, and doubt that I will, but it was an
intellectual exercise aimed at 'staying structured' with a minimum of
IF/THEN's.  Personally, I just use the RETURNno sense being 'analyst'
about it..  ;)

Allen

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Womack, Adrian
Sent: Tuesday, September 27, 2005 18:06
To: u2-users@listserver.u2ug.org
Subject: RE: [U2] Good Programming Practice Question.


We also use xnn.meaningful.name type labels. One advantage is that our
editor can recognise a label and putting the cursor on a line that
includes a GOSUB and pressing one function key will move the cursor
directly to the correct paragraph.

One thing I've never agreed with (except in COBOL) is every internal
subroutine should only have on exit point - why?

What is wrong with...

B00.PROCESS:

READ REC1 FROM file1,id1
   ELSE RETURN

READ REC2 FROM file2,id2
   ELSE RETURN

IF some.condition
   THEN RETURN

some more statements
that actually do the work with REC1  REC2

RETURN


The early RETURNs are just getting out of the routine on abnormal
conditions, the alternative would be to nest the code - but code nested
more than a couple of tabs deep is *much* harder to read.


AdrianW


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] Good Programming Practice Question.........

2005-09-28 Thread Jeff Schasny
I've got to disagree with this one. This is the job of your source code
control system. I've seen applications which were commented in this manner
over a number of years and they are almost unreadable due to the sheer
volume of mod tags.

-Original Message-
[mailto:[EMAIL PROTECTED] Behalf Of Marilyn Hilb
Sent: Wednesday, September 28, 2005 8:48 AM
To: u2-users@listserver.u2ug.org
Subject: RE: [U2] Good Programming Practice Question.


Two items I have thought of.

1. In addition to putting a modification tag at the top of the code with
who/date/what, we also will assign a job number to the mod in addition to a
No for the mod. Such as mod 01. Then throughout the code where the changes
are made we put a tag such as *01 start  and *01 end or, just a
single tag at the end of the line if only one or two lines being changed.
This makes the changes very easy to search for and spot should there be
problems in the new code.
[snip]
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] To locate the last occurrence of a sub-string in a string

2005-09-28 Thread George Gallen
What about XIND=INDEX(STRING,SRCH,1,COUNT(STRING,SRCH))  

(Untested).

George

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Hari T. K. Varma
Sent: Wednesday, September 28, 2005 11:35 AM
To: u2-users@listserver.u2ug.org
Subject: [U2] To locate the last occurrence of a sub-string in a string


Hi

Is there any direct one step method to locate the position of last
occurrence of a Sub-string in an existing string.
For ex:- to locate the last occurrence of AC in the string
X=AC2BC2CD2AC2AC2BC2SS for this case the position should be returned
5.
Your valuable inputs will be appreciated

Thanks,
Hari Varma



 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/


[U2] UniData as an ODBC _client_

2005-09-28 Thread Wendy Smoak
We've been trying to get this to work for years... it should be possible, in 
UniBasic, to connect to an ODBC data source and do a select, then cursor 
through the results.  I've even seen sample code.  Unfortunately, we've 
never been able to find all the pieces of the puzzle and make them fit 
together.  (Is this the same question as the Can Universe Play with Access 
thread?)


Were need a driver manager and driver for Sybase and Microsoft SQL.

The driver manager must present a shared library (libodbc.sl) that is 
compatible with UniData 6.1 on HP-UX Itanium.


In the past it has been critical to have a 64-bit library for an application 
that was compiled as 64-bit.  It was also critical to have a single threaded 
library, as Unidata was compiled as single threaded.


I don't have any absolute knowledge of either of these parameters for the 
current version of Unidata 6.1 on Itanium, but I suspect it might be 64-bit 
and multi-threaded.


--
Wendy Smoak 
---

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


RE: [U2] To locate the last occurrence of a sub-string in a string

2005-09-28 Thread Larry Hiscock
How about this:

X=AC2BC2CD2AC2AC2BC2SS

POS = INDEX(X,AC,COUNT(X,AC))

In this case, POS will equal 13, which is the character position of the last
occurrence of AC in the string X (ie: X[13,2] = AC)

HTH

Larry Hiscock
Western Computer Services


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Hari T. K. Varma
Sent: Wednesday, September 28, 2005 8:35 AM
To: u2-users@listserver.u2ug.org
Subject: [U2] To locate the last occurrence of a sub-string in a string

Hi

Is there any direct one step method to locate the position of last
occurrence of a Sub-string in an existing string.
For ex:- to locate the last occurrence of AC in the string
X=AC2BC2CD2AC2AC2BC2SS for this case the position should be returned 5.
Your valuable inputs will be appreciated

Thanks,
Hari Varma



 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] To locate the last occurrence of a sub-string in a string

2005-09-28 Thread Rod Hills
You could do the following-
N=COUNT(X,AC)
P=INDEX(X,AC,,N)

P will be the position of the last AC.

HTH

Rod Hills

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Hari T. K.
Varma
Sent: Wednesday, September 28, 2005 8:35 AM
To: u2-users@listserver.u2ug.org
Subject: [U2] To locate the last occurrence of a sub-string in a string

Hi

Is there any direct one step method to locate the position of last
occurrence of a Sub-string in an existing string.
For ex:- to locate the last occurrence of AC in the string
X=AC2BC2CD2AC2AC2BC2SS for this case the position should be returned
5.
Your valuable inputs will be appreciated

Thanks,
Hari Varma



 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] Good Programming Practice Question.........

2005-09-28 Thread Bill_H
Paul:

This brings up an interesting point.  Why not keep information such as this
in the database where, one might properly argue, it belongs?

For years I did this but it dawned on me I couldn't slice and dice anything.
As a result I simply created a single change file with about ten
attributes.  Then all my change descriptions, change dates, purpose of
changes, who made changes, programs and processes changed, etc are placed in
this one file.  Now I can easily produce an Enhancement and Resolutions
report with all changes. The code simply contains the original creation
date, the data last changed, and the people responsible for each.  The
record key of the changes file is the date and time.

Once this is accomplished I can create a wrapper around the editor and/or a
trigger on the program file (depending on a slew of issues).

In addition, I can link the changes to local O/S files that contain
project documents, and other such helpful documents.

Just a thought.  :-)

bill

 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On Behalf Of Paul Trebbien
 Sent: Wednesday, September 28, 2005 8:35 AM
 To: 'u2-users@listserver.u2ug.org'
 Subject: RE: [U2] Good Programming Practice Question.
 
 Regarding the origin and revisions to software, DataFlo 
 programmers pretty much have followed the policy where you 
 try to flag all revisions in the software using the following 
 convention:
 * Baseline changes use just a rev#, for example rev 01
 * DataWorks use a rev# starting with a C, for example REV C1
 * Custom  Customer Programmers using a rev# starting with Z, 
 for example REV Z1
 
   Here is an excerpt illustrating this from a heavily 
 modified program (from one of my customers):
 
 0015: * D/W CUSTOM REVISIONS
 *
 0016: ** Z5,04-20-04,KT-22,pault: Print SURCHARGE in footing 
 instead of CUR.
 0017: ** Z4,03-15-02,KORE,EWY: Display NET xxx DAYS
 0018: ** Z3,01-03-02,KT-3024,CWV: Add copper credit to output
 0019: ** Z2,04-24-00,KT2002,CWV: Remove REV 22, ALLOW ZERO 
 DOLLAR INVOICE PRINT
 0020: ** Z1,04-10-00,KT2001,CWV: Identify if report or proc
 0021: ** 1C,03-05-99,39705,GEH: Added custom MFG PART number print
 0022:  R E V I S I O N S
 *
 0023: ** 24,12-17-98,APP-079,EMW: Change dates to 4-digit year.
 0024: ** 23,04-07-99,AR-1103,ABC: Print total with 2 decimal places.
 
 0048: ** 00,09-11-95,AR-825,MLP: Rewrite at Rev 2.
 
 and the revisions are flagged like so:
 
 0084: * REV 1C
 0085:  READV MFGPART.FLG FROM F.TABLE,PRT-CUST-PART,2 ELSE
 MFGPART.FLG=N
 0086: * END REV 1C
 
 0096:ZERO.LI= ;  * REV 4
 
 0158: * REV 7  Assign DTL 
 0159:DTL = 
 0160: * END REV 7
 
 0938: * REV Z5
 0939: *WORKVAR=WORKVAR:DISCPCTR#6: CUR
 0940:  WORKVAR=WORKVAR:DISCPCTR#6:  SURCHARGE
 0941: * END REV Z5
 
 Note:
 * Revving your work this way usually makes it fairly easy 
 to see what
 was added (REV 1C and REV 7) and what was changed (REV Z5).
 * Usually the baseline revisions are removed in a major software
 release - only in the baseline software.
 * When we 'upgrade' the software for a customer, for customized
 software components (i.e. Programs, Procs, Reports), we merge 
 the baseline revisions into the customized software or visa 
 versa (easier route).  Using comparison tools the differences 
 in the software component is pretty easy to find and usually 
 pretty clear as to what to change.
 
 Have a Great Day!
 
  Paul Trebbien
  Kore Technologies, Senior Support Tech. 
  Solutions that work. People who care.
  V 858.678.0030 F 858.300.2600 W koretech.com
  
 
 
 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] Behalf Of Marilyn Hilb
 Sent: Wednesday, September 28, 2005 7:48 AM
 To: u2-users@listserver.u2ug.org
 Subject: RE: [U2] Good Programming Practice Question.
 
 
 Two items I have thought of.
 
 1. In addition to putting a modification tag at the top of 
 the code with who/date/what, we also will assign a job number 
 to the mod in addition to a No for the mod. Such as mod 01. 
 Then throughout the code where the changes are made we put a 
 tag such as *01 start  and *01 end or, just a single 
 tag at the end of the line if only one or two lines being changed.
 This makes the changes very easy to search for and spot 
 should there be problems in the new code.
 2. Consider when to use a paragraph and when to use a 
 program. Paragraphs
 (proc) certainly has their uses, but when the paragraph gets 
 to using IF, Case, locate, etc seems time to use a program.  
 For two reasons. One being while paragraphs (at least in SB+) 
 can do a lot, getting it to do everything a program can do 
 can be difficult. If you have an involved paragraph, sooner 
 or later you'll be adding to it and find you can't easily add 
 what you want to add, that it needs to be a program. Second 
 reason being some of the 

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

2005-09-28 Thread Jerry Banker
I'll agree with that. When I came on board at one site I found many programs 
that were commented in this manner with all lines commented out for changes. 
I remember one program in particular with over 1000 lines of code. After 
removing the commented out code and all of the references to ancient changes 
I came up with a program under 100 lines.

- Original Message - 
From: Jeff Schasny [EMAIL PROTECTED]
To: u2-users@listserver.u2ug.org
Sent: Wednesday, September 28, 2005 10:55 AM
Subject: RE: [U2] Good Programming Practice Question.


I've got to disagree with this one. This is the job of your source code
control system. I've seen applications which were commented in this manner
over a number of years and they are almost unreadable due to the sheer
volume of mod tags.

-Original Message-
[mailto:[EMAIL PROTECTED] Behalf Of Marilyn Hilb
Sent: Wednesday, September 28, 2005 8:48 AM
To: u2-users@listserver.u2ug.org
Subject: RE: [U2] Good Programming Practice Question.


Two items I have thought of.

1. In addition to putting a modification tag at the top of the code with
who/date/what, we also will assign a job number to the mod in addition to a
No for the mod. Such as mod 01. Then throughout the code where the changes
are made we put a tag such as *01 start  and *01 end or, just a
single tag at the end of the line if only one or two lines being changed.
This makes the changes very easy to search for and spot should there be
problems in the new code.
[snip]
---
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] To locate the last occurrence of a sub-string in a string

2005-09-28 Thread Charlie Rubeor
I believe there is a type in the original email.  The search string should 
actually be AC2, which would be the fifth occurrence of a three 
character code.  Something like this:

AC2 BC2 CD2 AC2 AC2 BC2 SS

If you really must do this in a single line, and the length of the 
substrings will always be three, this should work:

LASTOCC = INT(INDEX(STRING,SRCH,COUNT(STRING,SRCH))/3) + 1

Personally, I would hate to see that line of code in a program.

Charlie Rubeor 
Unix/Database Administrator 
Wiremold/Legrand 
60 Woodlawn Street
West Hartford, CT 06110
Tel: 860.233.6251 x3498
Fax: 860.523.3690
Email: [EMAIL PROTECTED]
Internet: www.wiremold.com





George Gallen [EMAIL PROTECTED] 
Sent by: [EMAIL PROTECTED]
09/28/2005 12:01 PM
Please respond to
u2-users@listserver.u2ug.org


To
u2-users@listserver.u2ug.org
cc

Subject
RE: [U2] To locate the last occurrence of a sub-string in a  string






Should be:

LASTOCC=INDEX(STRING,SRCH,COUNT(STRING,SRCH))

And 13 should be returned, not 5

George

-Original Message-
From: George Gallen 
Sent: Wednesday, September 28, 2005 11:55 AM
To: 'u2-users@listserver.u2ug.org'
Subject: RE: [U2] To locate the last occurrence of a sub-string in a
string


What about XIND=INDEX(STRING,SRCH,1,COUNT(STRING,SRCH)) 

(Untested).

George

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Hari T. K. Varma
Sent: Wednesday, September 28, 2005 11:35 AM
To: u2-users@listserver.u2ug.org
Subject: [U2] To locate the last occurrence of a sub-string in a string


Hi

Is there any direct one step method to locate the position of last
occurrence of a Sub-string in an existing string.
For ex:- to locate the last occurrence of AC in the string
X=AC2BC2CD2AC2AC2BC2SS for this case the position should be returned
5.
Your valuable inputs will be appreciated

Thanks,
Hari Varma



 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/

[demime 1.01d removed an attachment of type image/jpeg]
---
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-28 Thread Stevenson, Charles
One beauty of using a source control system like RCS or SCCS is that you
do not need to maintain the mods in the source,  the current running
version of the source looks clean,  but you can also view or print out
the incremental differences.

When I first introduced using RCS at one shop I got great resistance
from programmers because they insisted on continuing to flag a project's
mods as described by others in this thread.  A year later they were so
disgusted by this practice, that they demanded an internal project to go
through and rip them out because RCS did such a nice job of it all by
itself.

cds


 1. In addition to putting a modification tag at the top of 
 the code with who/date/what, we also will assign a job number 
 to the mod in addition to a No for the mod. Such as mod 01. 
 Then throughout the code where the changes are made we put a 
 tag such as *01 start  and *01 end or, just a single 
 tag at the end of the line if only one or two lines being 
 changed. This makes the changes very easy to search for and 
 spot should there be problems in the new code.
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] Blink Error - Backward Link error

2005-09-28 Thread karlp
This is a good explanation I'd forgotten about. You were probably the one
who explained it to me a little time ago... Long time...

Karl

quote who=Glenn Herbert
Because of the manner in which the write subsystem was implemented, it
is  NOT  a  trivial task to either pre-detect or recover from a system
write  failure,  which  is  usually the cause of the corruption.   The
group  structure  (which  will be comprised of one or more buffers) is
modified  in  memory,  and then shipped off to the system for writing;
there  is no way to determine if in fact any particular write actually
made  it  TO  disk.   If a write() operation returned successful, then
that is the only validation we can check;  if the system burps on that
buffer  later down the chain, there is no way to detect that.   Having
spent  better  than  10  years  in  the file system, there was serious
discussion  of  how  to  do  this,  but  unfortunately required a very
serious  rewrite  of  the  write subsystem; obviously, that work would
never be done.  The various recovery tools shipped with the product do
a pretty decent job of recovering as much of the file as possible.

Hope this helps.

__

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]  On  Behalf Of Stevenson,
Charles [EMAIL PROTECTED]
Sent: Wednesday, September 28, 2005 8:10 AM
To: u2-users@listserver.u2ug.org
Subject: FW: [U2] Blink Error - Backward Link error

Do I detect an enhancement suggestion?
Whether  this  is  trivial or hard is beyond me, but I tend to believe
Mr.
Phillips.
(On this subject, anyway. I don't know his opinion of the British
Royals, for example.)
cds
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]   On   Behalf   Of  Martin
Phillips
Sent: Wednesday, September 28, 2005 1:11 AM
To: u2-users@listserver.u2ug.org
Subject: Re: [U2] Blink Error - Backward Link error
Why, oh why, doesn't UV fail the write before it corrupts the file? It
is trivial to know that this is about to happen.
Martin Phillips
Ladybridge Systems
17b Coldstream Lane, Hardingstone, Northampton NN4 6DB
+44-(0)1604-709200
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/
 ---
 u2-users mailing list
 u2-users@listserver.u2ug.org
 To unsubscribe please visit http://listserver.u2ug.org/



-- 
karl

 _/  _/  _/  _/_/_/      __o
_/ _/   _/  _/_/   _-\._
   _/_/_/  _/_/_/ (_)/ (_)
  _/ _/   _/  _/   ..
 _/   _/ arl _/_/_/  _/ earson[EMAIL PROTECTED]

--
IT Director, ATS Industrial Supply, Inc.
http://www.atsindustrial.com
Toll-free: 800-789-9300 x29
Direct2Desk: 801-978-4429
Facsimile: 801-972-3888
--
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] To locate the last occurrence of a sub-string in a string

2005-09-28 Thread Stevenson, Charles
 From:  Hari T. K. Varma
 Is there any direct one step method to locate the position of 
 last occurrence of a Sub-string in an existing string.
 For ex:- to locate the last occurrence of AC in the string 
 X=AC2BC2CD2AC2AC2BC2SS for this case the position should be 
 returned 5.
 Your valuable inputs will be appreciated

I can't think of a good easy way.
Suggestions so far involve traversing the string twice, which may be
nasty for really long strings.  
I think the following substring extractions would involve a direct jumps
to those bites being tested, rather than reading forward:

X=AC2BC2CD2AC2AC2BC2SS
LOOKFOR = AC
FOR I = LEN(X) TO 1 STEP -1
UNTIL ( X[ I, LEN( LOOKFOR ) ] = LOOKFOR )
NEXT I
CRT I, X[I, LEN( LOOKFOR )]  ;* I will be 0 if LOOKFOR is not found.
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] To locate the last occurrence of a sub-string in a string

2005-09-28 Thread Keith W. Roberts
I don't think that's what the OP wanted, but if you want is the last *group*
number, which is what you are calculating, then you're close:

LAST.GRP = INT( INDEX(STRING,SRCH,COUNT(STRING,SRCH))+LEN(SRCH) / LEN(SRCH))

Not only is this more general, but it doesn't fail when the group size is
1.

-Keith

Original Message
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Charlie Rubeor
Sent: Wednesday, September 28, 2005 9:54 AM
To: u2-users@listserver.u2ug.org
Subject: RE: [U2] To locate the last occurrence of a
sub-string in a string

 I believe there is a type in the original email.  The search
 string should
 actually be AC2, which would be the fifth occurrence of a three
 character code.  Something like this:
 
 AC2 BC2 CD2 AC2 AC2 BC2 SS
 
 If you really must do this in a single line, and the length of the
 substrings will always be three, this should work:
 
 LASTOCC = INT(INDEX(STRING,SRCH,COUNT(STRING,SRCH))/3) + 1
 
 Personally, I would hate to see that line of code in a program.
 
 Charlie Rubeor
 
 
 George Gallen [EMAIL PROTECTED]
 
 Should be:
 
 LASTOCC=INDEX(STRING,SRCH,COUNT(STRING,SRCH))
 
 And 13 should be returned, not 5
 
 George
 
 -Original Message-
 From: George Gallen
 Sent: Wednesday, September 28, 2005 11:55 AM
 To: 'u2-users@listserver.u2ug.org'
 Subject: RE: [U2] To locate the last occurrence of a sub-string in a
 string 
 
 
 What about XIND=INDEX(STRING,SRCH,1,COUNT(STRING,SRCH))
 
 (Untested).
 
 George
 
 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] Behalf Of Hari
 T. K. Varma
 Sent: Wednesday, September 28, 2005 11:35 AM
 To: u2-users@listserver.u2ug.org
 Subject: [U2] To locate the last occurrence of a sub-string
 in a string
 
 
 Hi
 
 Is there any direct one step method to locate the position of last
 occurrence of a Sub-string in an existing string.
 For ex:- to locate the last occurrence of AC in the string
 X=AC2BC2CD2AC2AC2BC2SS for this case the position should be
 returned 5. Your valuable inputs will be appreciated
 
 Thanks,
 Hari Varma
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] To locate the last occurrence of a sub-string in a string

2005-09-28 Thread Charlie Rubeor
Or perhaps you are using the number 2 as a delimiter?  If so, convert the 
2 to a system delimiter, then you should be able to use the locate 
command.  That, however, is not a one step method.  And the more I think 
about it, you may even have to loop through the array to find the last 
one.

Charlie Rubeor 
Unix/Database Administrator 
Wiremold/Legrand 
60 Woodlawn Street
West Hartford, CT 06110
Tel: 860.233.6251 x3498
Fax: 860.523.3690
Email: [EMAIL PROTECTED]
Internet: www.wiremold.com



[EMAIL PROTECTED] wrote on 09/28/2005 11:35:28 AM:

 Hi
 
 Is there any direct one step method to locate the position of last
 occurrence of a Sub-string in an existing string.
 For ex:- to locate the last occurrence of AC in the string
 X=AC2BC2CD2AC2AC2BC2SS for this case the position should be returned
 5.
 Your valuable inputs will be appreciated
 
 Thanks,
 Hari Varma
 
 
 
  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/

[demime 1.01d removed an attachment of type image/jpeg]
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] To locate the last occurrence of a sub-string in a string

2005-09-28 Thread Dianne Ackerman
Actually, I read the original email assuming that 2 was the little 2 
character which shows up in the editor as a value mark, which is why the 
author said the answer should be 5.

-Dianne

Charlie Rubeor wrote:

I believe there is a type in the original email.  The search string should 
actually be AC2, which would be the fifth occurrence of a three 
character code.  Something like this:


AC2 BC2 CD2 AC2 AC2 BC2 SS

If you really must do this in a single line, and the length of the 
substrings will always be three, this should work:


LASTOCC = INT(INDEX(STRING,SRCH,COUNT(STRING,SRCH))/3) + 1

Personally, I would hate to see that line of code in a program.

Charlie Rubeor 
Unix/Database Administrator 
Wiremold/Legrand 
60 Woodlawn Street

West Hartford, CT 06110
Tel: 860.233.6251 x3498
Fax: 860.523.3690
Email: [EMAIL PROTECTED]
Internet: www.wiremold.com





George Gallen [EMAIL PROTECTED] 
Sent by: [EMAIL PROTECTED]

09/28/2005 12:01 PM
Please respond to
u2-users@listserver.u2ug.org


To
u2-users@listserver.u2ug.org
cc

Subject
RE: [U2] To locate the last occurrence of a sub-string in a  string






Should be:

LASTOCC=INDEX(STRING,SRCH,COUNT(STRING,SRCH))

And 13 should be returned, not 5

George

-Original Message-
From: George Gallen 
Sent: Wednesday, September 28, 2005 11:55 AM

To: 'u2-users@listserver.u2ug.org'
Subject: RE: [U2] To locate the last occurrence of a sub-string in a
string


What about XIND=INDEX(STRING,SRCH,1,COUNT(STRING,SRCH)) 


(Untested).

George

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Hari T. K. Varma
Sent: Wednesday, September 28, 2005 11:35 AM
To: u2-users@listserver.u2ug.org
Subject: [U2] To locate the last occurrence of a sub-string in a string


Hi

Is there any direct one step method to locate the position of last
occurrence of a Sub-string in an existing string.
For ex:- to locate the last occurrence of AC in the string
X=AC2BC2CD2AC2AC2BC2SS for this case the position should be returned
5.
Your valuable inputs will be appreciated

Thanks,
Hari Varma

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


RE: [U2] To locate the last occurrence of a sub-string in a string

2005-09-28 Thread George Gallen
that occured to me afterwards.

Then OFFSET=DCOUNT(STRING[1,INDEX(STRING,SRCH,COUNT(STRING,SRCH))],CHAR(252))

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Dianne Ackerman
Sent: Wednesday, September 28, 2005 2:17 PM
To: u2-users@listserver.u2ug.org
Subject: Re: [U2] To locate the last occurrence of a sub-string in a
string


Actually, I read the original email assuming that 2 was the little 2 
character which shows up in the editor as a value mark, which is why the 
author said the answer should be 5.
-Dianne

Charlie Rubeor wrote:

I believe there is a type in the original email.  The search string should 
actually be AC2, which would be the fifth occurrence of a three 
character code.  Something like this:

AC2 BC2 CD2 AC2 AC2 BC2 SS

If you really must do this in a single line, and the length of the 
substrings will always be three, this should work:

LASTOCC = INT(INDEX(STRING,SRCH,COUNT(STRING,SRCH))/3) + 1

Personally, I would hate to see that line of code in a program.

Charlie Rubeor 
Unix/Database Administrator 
Wiremold/Legrand 
60 Woodlawn Street
West Hartford, CT 06110
Tel: 860.233.6251 x3498
Fax: 860.523.3690
Email: [EMAIL PROTECTED]
Internet: www.wiremold.com





George Gallen [EMAIL PROTECTED] 
Sent by: [EMAIL PROTECTED]
09/28/2005 12:01 PM
Please respond to
u2-users@listserver.u2ug.org


To
u2-users@listserver.u2ug.org
cc

Subject
RE: [U2] To locate the last occurrence of a sub-string in a  string






Should be:

LASTOCC=INDEX(STRING,SRCH,COUNT(STRING,SRCH))

And 13 should be returned, not 5

George

-Original Message-
From: George Gallen 
Sent: Wednesday, September 28, 2005 11:55 AM
To: 'u2-users@listserver.u2ug.org'
Subject: RE: [U2] To locate the last occurrence of a sub-string in a
string


What about XIND=INDEX(STRING,SRCH,1,COUNT(STRING,SRCH)) 

(Untested).

George

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Hari T. K. Varma
Sent: Wednesday, September 28, 2005 11:35 AM
To: u2-users@listserver.u2ug.org
Subject: [U2] To locate the last occurrence of a sub-string in a string


Hi

Is there any direct one step method to locate the position of last
occurrence of a Sub-string in an existing string.
For ex:- to locate the last occurrence of AC in the string
X=AC2BC2CD2AC2AC2BC2SS for this case the position should be returned
5.
Your valuable inputs will be appreciated

Thanks,
Hari Varma
---
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] Good Programming Practice Question.........

2005-09-28 Thread Gordon J Glorfield
I prefer alphanumeric labels for subroutines.  The label should give some 
clue as to the function of the subroutine.  The subroutines should be in 
frequency of use order with the most commonly used closer to the top of 
the program.  Subroutines that are used once in a program (file opens, 
variable initialization, etc...) are located near the bottom.  This method 
is suppose to improve the efficiency of the program and may not be valid 
anymore.  In the Sequoia version of Pick O/A it did matter.  The run-time 
engine would start at the top of the program to search for a subroutine. 
Therefore a subroutine that was accessed over and over again would be 
found quicker each time if it was closer to the top.  Some programmers 
even took this to an extreme by making the first line of a program read 
GOTO MAIN.LINE.  The next line would be the label for the most commonly 
accessed subroutine.


Gordon J. Glorfield
Sr. Applications Developer
MAMSI (A UnitedHealth Company)
301-360-8839

[EMAIL PROTECTED] wrote on 09/27/2005 04:35:12 PM:

 Kevin:

 Not if you alphabetize the labels; then it works just like numeric.  :-)

 Bill

[SNIP]


This e-mail, including attachments, may include confidential and/or 
proprietary information, and may be used only by the person or entity to 
which it is addressed. If the reader of this e-mail is not the intended 
recipient or his or her authorized agent, the reader is hereby notified 
that any dissemination, distribution or copying of this e-mail is 
prohibited. If you have received this e-mail in error, please notify the 
sender by replying to this message and delete this e-mail immediately.
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] To locate the last occurrence of a sub-string in a string

2005-09-28 Thread BNeylon
TV = INDEX(X,'AC',COUNT(X,'AC')) ?

Bruce M Neylon
Health Care Management Group 





Hari T. K. Varma [EMAIL PROTECTED]
Sent by: [EMAIL PROTECTED]
09/28/2005 11:35 AM
Please respond to u2-users

 
To: u2-users@listserver.u2ug.org
cc: 
Subject:[U2] To locate the last occurrence of a sub-string in a 
string

Hi

Is there any direct one step method to locate the position of last
occurrence of a Sub-string in an existing string.
For ex:- to locate the last occurrence of AC in the string
X=AC2BC2CD2AC2AC2BC2SS for this case the position should be returned
5.
Your valuable inputs will be appreciated

Thanks,
Hari Varma



 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] UniData as an ODBC _client_

2005-09-28 Thread Shin.Tanaka
You may want to try 

DataDirect Connect64-ODBC
EasySoft ODBC
OpenLink ODBC.

We run 64-bit UniData 6.1.10 on HP-UX 11.11 RISC.  The only product I
have played with is Connect64 for Oracle (Connect64 doesn't support HP
RISC processor.  So I had to contact DataDirect and build one evaluation
copy for me.).  But unfortunately, Connect64 for Oracle didn't work with
UniData BCI.

EasySoft and OpenLink ODBC Driver Manger is Open Source (unixODBC and
iODBC).  However, you have to pay for their ODBC drivers (evaluation is
free though).

FreeTDS is a driver for UNIX that allows your applications to
communicate with Microsoft SQL Server and Sybase databases. 
So you may want to try FreeTDS with unixODBC or iODBC.




-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Wendy Smoak
Sent: Wednesday, September 28, 2005 11:58 AM
To: u2-users@listserver.u2ug.org
Subject: [U2] UniData as an ODBC _client_

We've been trying to get this to work for years... it should be
possible, in 
UniBasic, to connect to an ODBC data source and do a select, then cursor

through the results.  I've even seen sample code.  Unfortunately, we've 
never been able to find all the pieces of the puzzle and make them fit 
together.  (Is this the same question as the Can Universe Play with
Access 
thread?)

Were need a driver manager and driver for Sybase and Microsoft SQL.

The driver manager must present a shared library (libodbc.sl) that is 
compatible with UniData 6.1 on HP-UX Itanium.

In the past it has been critical to have a 64-bit library for an
application 
that was compiled as 64-bit.  It was also critical to have a single
threaded 
library, as Unidata was compiled as single threaded.

I don't have any absolute knowledge of either of these parameters for
the 
current version of Unidata 6.1 on Itanium, but I suspect it might be
64-bit 
and multi-threaded.

-- 
Wendy Smoak 
---
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] Good Programming Practice Question.........

2005-09-28 Thread Jerry Banker
Strange, while we are discussing this Gus has already set up a web seminar 
on the subject:

http://www.intl-spectrum.com/learn%20more%20page.3A.htm
---
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-28 Thread Keith W. Roberts
Original Message
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Gordon J Glorfield
Sent: Wednesday, September 28, 2005 10:34 AM
To: u2-users@listserver.u2ug.org
Cc: [EMAIL PROTECTED]; u2-users@listserver.u2ug.org
Subject: RE: [U2] Good Programming Practice Question.

 I prefer alphanumeric labels for subroutines.  The label
 should give some
 clue as to the function of the subroutine.  The subroutines
 should be in
 frequency of use order with the most commonly used closer to
 the top of
 the program.  Subroutines that are used once in a program (file opens,
 variable initialization, etc...) are located near the bottom.  This
 method is suppose to improve the efficiency of the program and may
 not be valid anymore.  

Correct.  There is absolutely no reason to order code by frequency of usage
in a non-interpretive (ie, compiled) language.  When the object is loaded
into memory, relocatable jumps are resolved, so it's as efficient to get to
the last line as the first.

 In the Sequoia version of Pick O/A it did matter.  The run-time
 engine would start at the top of the program to search for a
 subroutine. Therefore a subroutine that was accessed over and over
 again would be found quicker each time if it was closer to the top. 
 Some programmers even took this to an extreme by making the first
 line of a program read GOTO MAIN.LINE.  The next line would be the
 label for the most commonly accessed subroutine.
 
 
 Gordon J. Glorfield
 Sr. Applications Developer
 MAMSI (A UnitedHealth Company)
 301-360-8839
---
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-28 Thread Allen E. Elwood
But from what I understand Unidata does not produce compiled object code.
It creates compiled P-Code, which is then interpreted at run time.  True?
False?

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Keith W. Roberts
Sent: Wednesday, September 28, 2005 13:22
To: u2-users@listserver.u2ug.org
Cc: [EMAIL PROTECTED]
Subject: RE: [U2] Good Programming Practice Question.


Original Message
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Gordon J Glorfield
Sent: Wednesday, September 28, 2005 10:34 AM
To: u2-users@listserver.u2ug.org
Cc: [EMAIL PROTECTED]; u2-users@listserver.u2ug.org
Subject: RE: [U2] Good Programming Practice Question.

 I prefer alphanumeric labels for subroutines.  The label
 should give some
 clue as to the function of the subroutine.  The subroutines
 should be in
 frequency of use order with the most commonly used closer to
 the top of
 the program.  Subroutines that are used once in a program (file opens,
 variable initialization, etc...) are located near the bottom.  This
 method is suppose to improve the efficiency of the program and may
 not be valid anymore.

Correct.  There is absolutely no reason to order code by frequency of usage
in a non-interpretive (ie, compiled) language.  When the object is loaded
into memory, relocatable jumps are resolved, so it's as efficient to get to
the last line as the first.

 In the Sequoia version of Pick O/A it did matter.  The run-time
 engine would start at the top of the program to search for a
 subroutine. Therefore a subroutine that was accessed over and over
 again would be found quicker each time if it was closer to the top.
 Some programmers even took this to an extreme by making the first
 line of a program read GOTO MAIN.LINE.  The next line would be the
 label for the most commonly accessed subroutine.


 Gordon J. Glorfield
 Sr. Applications Developer
 MAMSI (A UnitedHealth Company)
 301-360-8839
---
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] Good Programming Practice Question.........

2005-09-28 Thread Bruce Nichol

Goo'day,

At 09:55 28/09/05 -0600, you wrote:


I've got to disagree with this one. This is the job of your source code
control system. I've seen applications which were commented in this manner
over a number of years and they are almost unreadable due to the sheer
volume of mod tags.


We take the approach to keep the stamp and story at the top, but remove the 
tags after a while.



-Original Message-
[mailto:[EMAIL PROTECTED] Behalf Of Marilyn Hilb
Sent: Wednesday, September 28, 2005 8:48 AM
To: u2-users@listserver.u2ug.org
Subject: RE: [U2] Good Programming Practice Question.


Two items I have thought of.

1. In addition to putting a modification tag at the top of the code with
who/date/what, we also will assign a job number to the mod in addition to a
No for the mod. Such as mod 01. Then throughout the code where the changes
are made we put a tag such as *01 start  and *01 end or, just a
single tag at the end of the line if only one or two lines being changed.
This makes the changes very easy to search for and spot should there be
problems in the new code.
[snip]
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


--
No virus found in this incoming message.
Checked by AVG Anti-Virus.
Version: 7.0.344 / Virus Database: 267.11.8/113 - Release Date: 27/09/05




--
No virus found in this incoming message.
Checked by AVG Anti-Virus.
Version: 7.0.344 / Virus Database: 267.11.8/113 - Release Date: 27/09/05


Regards,

Bruce Nichol
Talon Computer Services
ALBURYNSW 2640
Australia

http://www.taloncs.com.au

Tel: +61 (0)411149636
Fax: +61 (0)260232119

If it ain't broke, fix it till it is! 



--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.344 / Virus Database: 267.11.8/113 - Release Date: 27/09/05
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


[U2] AIX disk performance and UniData

2005-09-28 Thread Chuck Mongiovi
Hey all,
I'm having some system performance issues and I was wondering if there's a
way to resize UniData files to take advantage of AIX system's striping ..

We have all of our logical volumes striped - one is 2 disks stripes, one is
3 disks .. they're both setup with a stripe size of 128k .. So - my question
is if I raise the modulo on files with a MOD of less than 128 to 128 or 256
(prime of course) will I see a more even usage of my disks?

Does anyone have any experience with this at all?
-Chuck
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] AIX disk performance and UniData

2005-09-28 Thread Dan Fitzgerald
It isn't the stripe so much as the disk read block size. If your block size 
is 8kb (which is common), then a sep of 32 means that every read against the 
file will take 2 disk reads, whether or not you need it for the item you 
want. Going to a sep of 128 would mean every read would take 8 physical disk 
reads - the opposite of tuning.


RAID  striping by themselves help throughput; further tuning ignores the 
disk setup.


If you have RAID0+1 for Unidata, you've made a good choice. Find out your 
disk read/write block size (I would be astonished if it were 128K), and tune 
your seperation for it.


Btw, if you have RAID5, you've made a poor choice for U2.

Our greatest duty in this life is to help others. And please, if you can't 
help them, could you at least not hurt them? - H.H. the Dalai Lama
When buying  selling are controlled by legislation, the first thing to be 
bought  sold are the legislators - P.J. O'Rourke

Dan Fitzgerald






From: Chuck Mongiovi [EMAIL PROTECTED]
Reply-To: u2-users@listserver.u2ug.org
To: u2-users@listserver.u2ug.org
Subject: [U2] AIX disk performance and UniData
Date: Wed, 28 Sep 2005 17:02:41 -0400

Hey all,
I'm having some system performance issues and I was wondering if there's a
way to resize UniData files to take advantage of AIX system's striping ..

We have all of our logical volumes striped - one is 2 disks stripes, one is
3 disks .. they're both setup with a stripe size of 128k .. So - my 
question

is if I raise the modulo on files with a MOD of less than 128 to 128 or 256
(prime of course) will I see a more even usage of my disks?

Does anyone have any experience with this at all?
-Chuck
---
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/