All,
When you receive posts out of sequence, or late, there's a reason.
For example:
1. Bob sends an e-mail to U2-Users.
2. The system sends the mail out.
3. Sally gets her mail quickly and posts a response to U2-Users.
4. The system sends the mail out.
5. Since there is *nothing*
The original "new" INDEX code (as posted by Keith) was...
IF INDEX(TEST,'\':F200.SCHEME.CODE:'\',1) THEN THAT =
Including the delimiters at the front & back of the string, which
prevents any false positives (like finding "CK" in "CK1").
Personally, I like the LOCATE solution as it makes for much
That's interesting. The current UD documentation states:
OPEN
Syntax
OPEN ["expr",] "filename" [READONLY] [TO file.var] [ON ERROR statements] {THEN
statements [END] | ELSE statements [END]}
Description
The UniBasic OPEN command opens a UniData hashed data or dictionary file, so
you can
read, w
Using attribute variables (@am or AM or CHAR(254)) in the string is a waste
of typing. Try this:
TEST="A.B.C.D.E.F.G.H.I.J.K.L.M.N"
CONVERT "." TO CHAR(254) IN TEST.
I do this zillions of times with no downside. Again, using LOCATE will
eliminate false positives.
MJ
- Original Message -
While that is an expression of combining statements, it will grow out of
hand. Here's the extension of my suggestion.
TEST="A.B.C.D.E" ;* FIRST SET, JAN 2005
TEST<-1>="F.G.H.I.J.K.L" ;* SECOND SET. ADDED DEC 2006
TEST<-1>="M.N.O.P.Q.R" ;* SALES DEPT NEEDS MORE. APR 2007
TEST<-1>="S.T.U.V.W.X.Y.Z"
To all, especially the moderator.
I just replied twice or 3 times to the same thread only to find out that later
in my inbox someone else had earlier posted most all of the same responses. (I
did have one new thing to add).
Anyway, I can sense that this wastes a lot of everyone's time as when the
I find this kind of evolved junk a lot. There's one caveat that you should
include:
TEST = '\AF1\CK1\CK2\H\LHC\MP\NU1\NU2\TK1\TK2\'
CONVERT "\" TO CHAR(254) IN TEST
LOCATE F200.SCHEME.CODE IN TEST SETTING FOUND THEN ELSE
While actual mileage may differ, when having a lookup table and
I definitely have program listings from 1982 indicating OPEN "PRODUCT"
without the "". That was at least pre-3.5b which was the most prevelant
release during the 1980's. I can't imagine them going backwards on release
5.1 when 3.5b didn't need it.
Then again, MCD kinda splintered into the Spirit a
How about: TEST =
CHANGE('AF1,CK1,CK2,GS1,H,J,LHC,MP,MP3,NU1,NU2,TK1,TK2',',',@FM)
- Original Message -
From: "Keith Johnson (DSLWN)" <[EMAIL PROTECTED]>
To:
Sent: Monday, November 26, 2007 1:50 PM
Subject: [U2] Good Practice?
Neil suggested using LOCATE rather than INDEX in my exa
Don't forget that OPEN "DICT MYFILE" to MYFILE.DV also works accross all
platforms mentioned earlier. It's putting the DICT and MYFILE in the same
quotes.
MJ
- Original Message -
From: "Bill Haskett" <[EMAIL PROTECTED]>
To:
Sent: Sunday, November 25, 2007 2:52 PM
Subject: RE: [U2] Re: U2 U
Funny how I remember 3.5b being of long duration in the 1980's but I don't
recall the earlier ones. I worked for MCD from Nov 1978 thru Sept 1979. I do
recall the rainbow manuals though.
thanks
- Original Message -
From: "Clifton Oliver" <[EMAIL PROTECTED]>
To:
Sent: Sunday, November 25,
Instead of having the setup in the main portion of the code it should be
done once only at the initialization of the program. It's always a good
idea to put as much "one time only" code in a place where it will only get
executed as little as possible.
Then instead of using @AM for the separator,
Neil suggested using LOCATE rather than INDEX in my example.
I'm not sure I agree that would be any less complex as far as the code
is concerned. INDEX and LOCATE are both 'complex' compared with the IF
statement, and since LOCATE needs its SETTING variable, it's arguably
the more complex stateme
IMO, it would have been less complicated and even easier to read if you had
separated the list with @VM or @AM instead of back-slash. That way you
could have used the LOCATE, which in itself explains what you are trying to
achieve. If you had also made the list sorted then you could have used the
Al DeWitt had a need for a utility to search the dictionaries.
I had to write one a little while ago - to look for SB+ stuff, as it
happens.
PROGRAM FIND.DICT
* This program searches the data dictionary section
* of every file in the VOC for a string
CRT 'INPUT STRING ':
INPUT THA
Here's an example of how I rewrote some code.
Old version
284: * IF F200.SCHEME.CODE = "CK1" OR F200.SCHEME.CODE = "CK2"
OR F200.SCHEME.CODE = "NU1" OR F200.SCHEME.CODE = "NU2" OR
F200.SCHEME.CODE = "TK1" OR F200.SCHEME.CODE = "TK2" OR F200.SCHEME.CODE
= "GS1" OR F200.SCHEME.CODE = "JM" OR
Secondly, for those of us who remember MCD and have a style that likes things
similar, I often find myself doing:
FileErr = ''
OPEN 'DICT', 'MYFILE' TO MYFILE.DV ELSE FileErr := ' Dict MYFILE'
OPEN 'DICT', 'YOURFILE' TO YOURFILE.DV ELSE FileErr := ' Dict YOURFILE'
OPEN '', 'MYFILE' TO MY
It was required on the early Microdata Reality, also, at least prior
to R80. I think R80 dropped that requirement, but that was too many
years ago to remember.
--
Regards,
Clif
On Nov 25, 2007, at 9:29 AM, Kevin King wrote:
On Nov 23, 2007 1:04 PM, MAJ Programming
<[EMAIL PROTECTED]> w
On Nov 23, 2007 1:04 PM, MAJ Programming <[EMAIL PROTECTED]> wrote:
> Anyone who still uses OPEN "","CUSTOMER"... meaning the null dict reference
> should get his head out of the sand. It's never been required, at least not
> by the truly earlier MV flavors (MCD, ULT, MENTOR, R80 etc). If it was
>
19 matches
Mail list logo