Universe - how to "find" a character > char(127) from SELECT using LIKE?

208 views
Skip to first unread message

George Gallen

unread,
Feb 14, 2023, 3:58:04 PM2/14/23
to mvd...@googlegroups.com
I have some email addresses that contain char(146) instead of apostrophe.

aside from writing something to search each record and index the email field,
how can I either use FIND or SELECT/LIKE to find all records with that character?
I can't figure out how to ^146 in the middle of a LIKE, so I couldn't use the EVAL CHAR(146)

George

geneb

unread,
Feb 14, 2023, 4:13:10 PM2/14/23
to mvd...@googlegroups.com
George, can you try entering it via ALT+code? (Hold down the Alt key, and
type in 0146 or 146) I don't know if TCL would filter that or not...

g.


--
Proud owner of F-15C 80-0007
http://www.f15sim.com - The only one of its kind.
http://www.diy-cockpits.org/coll - Go Collimated or Go Home.
Some people collect things for a hobby. Geeks collect hobbies.

ScarletDME - The red hot Data Management Environment
A Multi-Value database for the masses, not the classes.
http://scarlet.deltasoft.com - Get it _today_!

Derek Falkner

unread,
Feb 14, 2023, 4:22:31 PM2/14/23
to mvd...@googlegroups.com
If memory serves, I think we used to type a double-caret for such characters - ^^146 - but that may be a Pr1me Information thing.

Derek Falkner

Kingston, Ontario.


--
You received this message because you are subscribed to
the "Pick and MultiValue Databases" group.
To post, email to: mvd...@googlegroups.com
To unsubscribe, email to: mvdbms+un...@googlegroups.com
For more options, visit http://groups.google.com/group/mvdbms
--- You received this message because you are subscribed to the Google Groups "Pick and MultiValue Databases" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mvdbms+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mvdbms/alpine.LRH.2.21.2302141311440.3620%40sidewinder.deltasoft.com.

George Gallen

unread,
Feb 14, 2023, 4:30:19 PM2/14/23
to mvd...@googlegroups.com
No - that didn't work - What I'm not sure if this is an issue also, I'm using putty over ssh and my
character set isn't the same as when I used telnet (vt100) - it still says vt100 but I don't see the
\ ] and ^ characters for 253, 254 and 255 - they all are the same.

What I finally ended with was creating an I descriptor
IF INDEX(NAME,CHAR(146),1)=0 THEN "0" ELSE "1"
And....SELECT FILE WITH FLAG="1"

I could have changed NAME to @RECORD to search the entire record and not just one attribute

George



From: mvd...@googlegroups.com <mvd...@googlegroups.com> on behalf of geneb <ge...@deltasoft.com>
Sent: Tuesday, February 14, 2023 4:13 PM
To: mvd...@googlegroups.com <mvd...@googlegroups.com>
Subject: Re: [mvdbms] Universe - how to "find" a character > char(127) from SELECT using LIKE?
 

George Gallen

unread,
Feb 14, 2023, 4:34:28 PM2/14/23
to mvd...@googlegroups.com
I tried that one, also tried "\^146" -

at least the I descr worked - so I'll create an IDESC in the VOC so it will be universal to all
files in that account at least...

George


From: mvd...@googlegroups.com <mvd...@googlegroups.com> on behalf of Derek Falkner <falkne...@gmail.com>
Sent: Tuesday, February 14, 2023 4:22 PM

To: mvd...@googlegroups.com <mvd...@googlegroups.com>
Subject: Re: [mvdbms] Universe - how to "find" a character > char(127) from SELECT using LIKE?

ROBERT N

unread,
Feb 14, 2023, 7:07:19 PM2/14/23
to mvd...@googlegroups.com
I have used this a lot in UNIVERSE:

* SYS.FIX.CTRL.CHARS
*
* ROBERT NORMAN AND ASSOCIATES
* 23441 Golden Springs Dr., #289, Diamond Bar, CA 91765
* (951) 541-1668
* I...@KEYWAY.NET
* http://users.keyway.net/~ice/
* Affordable UNIVERSE programming services for PICK/BASIC, DATA/BASIC, UniVerse
* Basic, UniBasic, R/BASIC, jBC.
*
* Program to do the following:
* 1. Scan the target file for control characters (ASCII: 0-31, 127-250,
* and 255).
* 2. Convert them to uparrow format (^nnn) or delete them from the target
* record.
* 3. Update the target file with the target record, or route the record
* lines with the control characters (in uparrow format) to the screen
* or lineprinter.
*
* Notes:
* Characters 251-254 are not considered to be control characters here
* since they are processed by RETRIEVE as delimiters.
* Don't run this program against source code files, unless you are 100%
* sure that the program doesn't use delimiters like the tab character to
* separate the components of the programming statements. An example of
* this is the EDT program in the APP.PROGS file that comes with UNIVERSE.
* If you do, you might change things which look like 'EQU VAR TO 1' to
* 'EQUVARTO1'. Don't change the logic that specifies control characters
* as CHAR(94):'nnn' or this program might be detected as having a control
* character by the UPARROW.ITEM dictionary item.
*
* Modifications:
* Mod# Date Programmer Description of modification
* 03-29-11 Robert Norman Initial coding.
*
GOSUB 1000 ; * INITIALIZATION
GOSUB 2000 ; * MAIN ROUTINE
GOTO 10000 ; * EXIT ROUTINE
*
1000:* INITIALIZATION
*
!$OPTIONS PICK;* UNCOMMENT TO WORK WITH DELIMETER TYPES 6-8
$INCLUDE UNIVERSE.INCLUDE GETPU.H
*
EQU PROGRAM.ID TO 'SYS.FIX.CTRL.CHARS'
EQU FM TO CHAR(254),VM TO CHAR(253),SVM TO CHAR(252),TM TO
CHAR(251),ERL TO @(-4)
EQU HILIGHT.ON TO @(-13),HILIGHT.OFF TO @(-14)
NULL.PLACEHOLDER=CHAR(35):CHAR(36):CHAR(37):'NULL':CHAR(37):CHAR(36):CHAR(35)
; * Spells out '#-$-%-NULL-%-$-#' without the dashes (don't
change this line or you could foul up this program if you run this
program on the source file that it is in!)
LEN.NULL.PLACEHOLDER=LEN(NULL.PLACEHOLDER)
PROMPT ''
DIM CHAR.STATS(256)
MAT CHAR.STATS=0
CRT.HIGH=@CRTHIGH
CRT.WIDE=@CRTWIDE
CTRL.CHARS=''
GETPU='!GETPU'
SETPU='!SETPU'
SKIP.UPDATE=0
LOOP
LOOP
CRT"Source file to check ('Q' to quit): ": ; INPUT SOURCE.FILE.NAME
SOURCE.FILE.NAME=TRIM(SOURCE.FILE.NAME)
IF SOURCE.FILE.NAME='Q' THEN RETURN TO 10000 ; * EXIT ROUTINE
OK=1
OPEN SOURCE.FILE.NAME TO SOURCE.FILE ELSE
CRT"'":SOURCE.FILE.NAME:"' is not a file name" ; OK=0
END
UNTIL OK DO REPEAT
LOOP
CRT"Destination file to update (<ENTER> to skip update or
'Q' to quit): ": ; INPUT DESTINATION.FILE.NAME
DESTINATION.FILE.NAME=TRIM(DESTINATION.FILE.NAME)
IF DESTINATION.FILE.NAME='Q' THEN RETURN TO 10000
; * EXIT ROUTINE
OK=1
OPEN DESTINATION.FILE.NAME TO DESTINATION.FILE ELSE
IF DESTINATION.FILE.NAME#'' THEN
CRT"'":DESTINATION.FILE.NAME:"' is not a file name" ; OK=0
END
END
UNTIL OK DO REPEAT
UNTIL SOURCE.FILE.NAME#DESTINATION.FILE.NAME DO
CRT'Files cannot be the same'
REPEAT
CRT"Record id (<ENTER> for all records, 'GET-LIST listname', or
'Q' to quit): ": ; INPUT RECORD.ID
RECORD.ID=TRIM(RECORD.ID)
IF RECORD.ID='Q' THEN RETURN TO 10000 ; * EXIT ROUTINE
LOOP
CRT'<C>onvert (and display), <D>elete (no display) control
characters, or <Q>uit: ': ; INPUT ACTION
ACTION=TRIM(ACTION)
UNTIL ACTION='C' OR ACTION='D' OR ACTION='Q' DO REPEAT
IF ACTION='Q' THEN RETURN TO 10000 ; * EXIT ROUTINE
LOOP
CRT'Enter ASCII values of characters (0-31, 127, 129-250, or
255) to exclude'
CRT'from being identified as control characters, separated by commas'
CRT"(<ENTER> for none or 'Q' to quit)"
CRT': ': ; INPUT ASCII.SKIPS
ASCII.SKIPS=TRIM(ASCII.SKIPS)
IF ASCII.SKIPS='Q' THEN RETURN TO 10000 ; * EXIT ROUTINE
GOSUB 1100 ; * VALIDATE ASCII SKIPS
UNTIL OK DO
CRT'Invalid format'
REPEAT
LOOP
CRT'DETAIL SUPPRESS (Y/N/Q)? ': ; INPUT DET.SUP,1_
UNTIL DET.SUP='Y' OR DET.SUP='N' OR DET.SUP='Q' DO REPEAT
IF DET.SUP='Q' THEN RETURN TO 10000 ; * EXIT ROUTINE
LOOP
CRT'TO PRINTER (Y/N/Q)? ': ; INPUT PTR.OPT,1_
UNTIL PTR.OPT='Y' OR PTR.OPT='N' OR PTR.OPT='Q' DO REPEAT
IF PTR.OPT='Q' THEN RETURN TO 10000 ; * EXIT ROUTINE
CRT'Option Description'
CRT'------
---------------------------------------------------------------'
CRT'U Update destination file only with changed records.'
CRT"Options (U, <ENTER> for none, 'Q' to quit): ": ; INPUT OPTIONS
IF OPTIONS='Q' THEN RETURN TO 10000 ; * EXIT ROUTINE
UFLG=0
L=LEN(OPTIONS)
FOR I=1 TO L
CHR=OPTIONS[I,1]
BEGIN CASE
CASE CHR='U' ; UFLG=1
END CASE
NEXT I
WORD1=FIELD(RECORD.ID,' ',1)
BEGIN CASE
CASE WORD1='GET-LIST' OR WORD1='GET.LIST'
LIST.NAME=RECORD.ID[COL2()+1,32767]
CMD='GET-LIST ':LIST.NAME
CRT CMD
EXECUTE CMD
ITEMS.SELECTED=@SYSTEM.RETURN.CODE
IF ITEMS.SELECTED<0 THEN RETURN TO 10000 ; * EXIT ROUTINE
CASE RECORD.ID=''
CMD='SELECT ':SOURCE.FILE.NAME
CRT CMD
EXECUTE CMD
ITEMS.SELECTED=@SYSTEM.RETURN.CODE
IF ITEMS.SELECTED<0 THEN RETURN TO 10000 ; * EXIT ROUTINE
CASE RECORD.ID#''
SELECT RECORD.ID
ITEMS.SELECTED=1
END CASE
DONE=0
CHANGED.CTR=0
NOT.FOUND.CTR=0
WRITTEN.CTR=0
BEGIN CASE
CASE PTR.OPT='N'
LINE.LENGTH=CRT.WIDE - 7
CASE PTR.OPT='Y'
PRINTER ON
LPTR.WIDTH=@LPTRWIDE
LINE.LENGTH=LPTR.WIDTH - 7
LPTR.MODE=0 ; CODE=0
CALL @GETPU(PU$MODE,0,LPTR.MODE,CODE) ; * READ INDIVIDUAL
PARAMETERS OF ANY LOGICAL PRINT CHANNEL
IF LPTR.MODE # 3 THEN
* save banner
LPTR.BANNER=SPACE(32)
CODE=0
CALL @GETPU(PU$BANNER,0,LPTR.BANNER,CODE) ; * READ
INDIVIDUAL PARAMETERS OF ANY LOGICAL PRINT CHANNEL
* set banner
RECORD.BANNER=FMT(PROGRAM.ID, 'L#32')
CALL @SETPU(PU$BANNER,0,RECORD.BANNER,CODE) ; * SET
INDIVIDUAL PARAMETERS OF ANY LOGICAL PRINT CHANNEL
END
END CASE
SKIP.UPDATE=(DESTINATION.FILE.NAME='')
IF SKIP.UPDATE THEN
LINE1="<":PROGRAM.ID:"> File: ":SOURCE.FILE.NAME:" 'T' PAGE 'S''L'"
LINE2=''
HEADING LINE1:LINE2
END ELSE
DUMMY=@(0) ; * DISABLE PAGINATION
END
FOR I=0 TO 31
LOCATE I IN ASCII.SKIPS<1> SETTING FORCE.TO.STANDARD ELSE
FORCE.TO.STANDARD=0
IF NOT(FORCE.TO.STANDARD) THEN
CTRL.CHARS:=CHAR(I)
END
NEXT I
FOR I=127 TO 255
LOCATE I IN ASCII.SKIPS<1> SETTING FORCE.TO.STANDARD ELSE
FORCE.TO.STANDARD=0
BEGIN CASE
CASE I=251 ; * TEXT MARK
CASE I=252 ; * SUBVALUE MARK
CASE I=253 ; * VALUE MARK
CASE I=254 ; * FIELD MARK
CASE 1
IF NOT(FORCE.TO.STANDARD) THEN
CTRL.CHARS:=CHAR(I)
END
END CASE
NEXT I
RETURN
*
1100:* VALIDATE ASCII SKIPS
*
OK=1
IF ASCII.SKIPS#'' THEN
CONVERT ',' TO FM IN ASCII.SKIPS
DC=DCOUNT(ASCII.SKIPS,FM)
FOR I=1 TO DC
ASC=ASCII.SKIPS<I>
IF NUM(ASC) THEN
IF NOT((ASC>=0 & ASC<=31) ! ASC=127 ! (ASC>=129 &
ASC<=250) ! ASC=255) THEN
OK=0
END
END ELSE
OK=0
END
NEXT I
END
RETURN
*
2000:* MAIN ROUTINE
*
LOOP
READNEXT ID ELSE DONE=1
UNTIL DONE DO
READ RECORD FROM SOURCE.FILE,ID THEN
RECORD.WITHOUT.CTRL.CHARS=CONVERT(CTRL.CHARS,'',RECORD)
RECORD.CHANGED=0
IF RECORD.WITHOUT.CTRL.CHARS#RECORD THEN ; * IF
there are control characters in record THEN
LINE.CTR=0
BEGIN CASE
CASE ACTION='C' ; * Convert control characters
DELIM.TYPE=''
NEW.RECORD=''
NEW.LINE=''
FIRST.TIME=1
RECORD=CHANGE(RECORD,CHAR(128),NULL.PLACEHOLDER)
; * Convert CHAR(128) to CHAR(128) placeholder or the logic below
won't work properly in some cases (like a CHAR(128):CHAR(253)
combination in a line)
LOOP
REMOVE ELEMENT FROM RECORD SETTING DELIM.TYPE
BEGIN CASE
CASE DELIM.TYPE=0 ; * End of string
NEW.LINE:=ELEMENT
STRING=NEW.LINE
GOSUB 2100 ; * CONVERT CONTROL
CHARACTERS TO UPARROW FORMAT
NEW.LINE=NEW.STRING
NEW.RECORD<-1>=NEW.LINE
LINE.CTR+=1
IF CHANGED AND DET.SUP='N' THEN
GOSUB 2200 ; * PRINT LINE
END
CASE DELIM.TYPE=1 ; * Item mark ASCII CHAR(255)
NEW.LINE:=ELEMENT:CHAR(255)
CASE DELIM.TYPE=2 ; * Field mark
ASCII CHAR(254)
NEW.LINE:=ELEMENT
STRING=NEW.LINE
GOSUB 2100 ; * CONVERT CONTROL
CHARACTERS TO UPARROW FORMAT
NEW.LINE=NEW.STRING
NEW.RECORD<-1>=NEW.LINE
LINE.CTR+=1
IF CHANGED AND DET.SUP='N' THEN
GOSUB 2200 ; * PRINT LINE
END
NEW.LINE=''
CASE DELIM.TYPE=3 ; * Value mark
ASCII CHAR(253)
NEW.LINE:=ELEMENT:VM
CASE DELIM.TYPE=4 ; * Subvalue mark
ASCII CHAR(252)
NEW.LINE:=ELEMENT:SVM
CASE DELIM.TYPE=5 ; * Text mark ASCII CHAR(251)
NEW.LINE:=ELEMENT:TM
CASE DELIM.TYPE=6 ; * ASCII CHAR(250)
- Not supported in the PIOPEN flavor
NEW.LINE:=ELEMENT:CHAR(250)
CASE DELIM.TYPE=7 ; * ASCII CHAR(249)
- Not supported in the PIOPEN flavor
NEW.LINE:=ELEMENT:CHAR(249)
CASE DELIM.TYPE=8 ; * ASCII CHAR(248)
- Not supported in the PIOPEN flavor
NEW.LINE:=ELEMENT:CHAR(248)
CASE 1 ; * Shouldn't happen (at
least as of ver 10.3.0)
DELIM.POS=GETREM(RECORD) ; * Get
position of delimiter from last REMOVE statement
DELIM=RECORD[DELIM.POS,1]
NEW.LINE:=ELEMENT:DELIM
END CASE
UNTIL DELIM.TYPE=0 DO REPEAT

NEW.RECORD=CHANGE(NEW.RECORD,NULL.PLACEHOLDER,CHAR(94):'128')
; * Convert CHAR(128) placeholder to CHAR(128) uparrow format
CASE ACTION='D' ; * Delete control characters
NEW.RECORD=RECORD.WITHOUT.CTRL.CHARS
END CASE
CHANGED.CTR+=1
IF NOT(SKIP.UPDATE) THEN
PRINT"'":ID:"' changed"
END
END ELSE
NEW.RECORD=RECORD
END
IF NOT(SKIP.UPDATE) THEN
IF UFLG AND NOT(RECORD.CHANGED) THEN
END ELSE
WRITE NEW.RECORD ON DESTINATION.FILE,ID
WRITTEN.CTR+=1
END
END
END ELSE
NOT.FOUND.CTR+=1
PRINT"'":ID:"' not on file"
END
REPEAT
PRINT
PRINT'Items selected : ':ITEMS.SELECTED
PRINT'Records changed : ':CHANGED.CTR
PRINT'Records not found: ':NOT.FOUND.CTR
PRINT'Records written : ':WRITTEN.CTR
PRINT'Character counts :'
CTR=0
FOR I=0 TO 31
STAT=CHAR.STATS(I+1)
IF STAT#0 THEN
PRINT'CHAR(':FMT(I,'R%3'):'):':
STAT=TRIM(FMT(STAT,'5T')) ; * WRAP LINES EVERY 5 CHARS
(SEPARATED BY TEXT MARK)
PRINT STR(' ',6-LEN(STAT)):STAT[1,6]: ; * This is one
more than what we are wrapping at to provide an overflow space
PRINT' ':
IF NOT(MOD(CTR+1,4)) THEN PRINT
CTR+=1
END
NEXT I
FOR I=127 TO 255
BEGIN CASE
CASE I=251 ; * TEXT MARK
CASE I=252 ; * SUBVALUE MARK
CASE I=253 ; * VALUE MARK
CASE I=254 ; * FIELD MARK
CASE 1
STAT=CHAR.STATS(I+1)
IF STAT#0 THEN
PRINT'CHAR(':FMT(I,'R%3'):'):':
STAT=TRIM(FMT(STAT,'5T')) ; * WRAP LINES
EVERY 5 CHARS (SEPARATED BY TEXT MARK)
PRINT STR(' ',6-LEN(STAT)):STAT[1,6]: ; * This
is one more than what we are wrapping at to provide an overflow space
PRINT' ':
IF NOT(MOD(CTR+1,4)) THEN PRINT
CTR+=1
END
END CASE
NEXT I
PRINT
IF PTR.OPT='Y' THEN
PRINTER CLOSE ; * Flush printer buffer
PRINTER OFF
PRINTER CLOSE
IF LPTR.MODE # 3 THEN
* reset banner
PRINTER ON
CALL @SETPU(PU$BANNER,0,LPTR.BANNER,CODE) ; * SET
INDIVIDUAL PARAMETERS OF ANY LOGICAL PRINT CHANNEL
PRINTER CLOSE ; * Flush printer buffer
PRINTER OFF
END
DUMMY=@(0) ; * TURN OFF CRT PAGING
END
RETURN
*
2100:* CONVERT CONTROL CHARACTERS TO UPARROW FORMAT
*
CHANGED=0
L=LEN(STRING)
NEW.STRING=''
HILIGHT.STRING=''
FOR I=1 TO L
CHR=STRING[I,1]
NULL.PLACEHOLDER.TEST=STRING[I,LEN.NULL.PLACEHOLDER]
ASC=SEQ(CHR)
LOCATE ASC IN ASCII.SKIPS<1> SETTING FORCE.TO.STANDARD ELSE
FORCE.TO.STANDARD=0
BEGIN CASE
CASE NULL.PLACEHOLDER.TEST=NULL.PLACEHOLDER ; * CHARACTER 128
IF PTR.OPT='Y' THEN
NEW.STRING:='^':FMT(ASC,'R%3')
END ELSE
HILIGHT.STRING:=HILIGHT.ON:CHAR(94):'128':HILIGHT.OFF
END
CHANGED=1
ASC=128
CHAR.STATS(ASC+1)+=1
I+=(LEN.NULL.PLACEHOLDER-1)
CASE (ASC>=32 & ASC<=126) ! (ASC=251 ! ASC=252 ! ASC=253 !
ASC=254) ! FORCE.TO.STANDARD ; * STANDARD CHARACTERS
NEW.STRING:=CHR
HILIGHT.STRING:=CHR
CASE 1 ; * CONTROL CHARACTERS
NEW.STRING:='^':FMT(ASC,'R%3')
HILIGHT.STRING:=HILIGHT.ON:'^':FMT(ASC,'R%3'):HILIGHT.OFF
CHANGED=1
CHAR.STATS(ASC+1)+=1
END CASE
NEXT I
IF CHANGED THEN RECORD.CHANGED=1
RETURN
*
2200:* PRINT LINE
*
IF FIRST.TIME THEN
FIRST.TIME=0
PRINT
END
IF PTR.OPT='Y' THEN
PRINT.LINE=ID:' @ ':'0000'[1,4-LEN(LINE.CTR)]:LINE.CTR:': ':NEW.LINE
END ELSE
PRINT.LINE=ID:' @ ':'0000'[1,4-LEN(LINE.CTR)]:LINE.CTR:':
':HILIGHT.STRING
END
L=LEN(PRINT.LINE)
FOR X=1 TO L STEP LINE.LENGTH
SEGMENT=PRINT.LINE[X,LINE.LENGTH]
PRINT SEGMENT
NEXT X
RETURN
*
10000:* EXIT ROUTINE
*
IF NOT(SKIP.UPDATE) THEN
CRT @(0,CRT.HIGH-1):ERL:@(0,CRT.HIGH-1):' Press <ENTER> to
continue...': ; INPUT KEY,1_
END
STOP
END
> --
> You received this message because you are subscribed to
> the "Pick and MultiValue Databases" group.
> To post, email to: mvd...@googlegroups.com
> To unsubscribe, email to: mvdbms+un...@googlegroups.com
> For more options, visit http://groups.google.com/group/mvdbms
> ---
> You received this message because you are subscribed to the Google Groups
> "Pick and MultiValue Databases" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to mvdbms+un...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/mvdbms/SJ2PR11MB76480CDD4A4C2334D681F2B8FAA29%40SJ2PR11MB7648.namprd11.prod.outlook.com.
>

ROBERT N

unread,
Feb 14, 2023, 7:25:38 PM2/14/23
to mvd...@googlegroups.com
The UPARROW dictionary item just converts every control character to
uparrow format (^127 for example). The logic for it is in this
program. You could copy and paste it into a dictionary item and
compile to do SELECTs. I don't have a copy handy right now.

Will Johnson

unread,
Feb 15, 2023, 1:35:41 PM2/15/23
to Pick and MultiValue Databases
For Selecting what about

Select file with @ID UNLIKE "...0A..." and UNLIKE "...0N..."
would that give you non-alpha, non-numeric chars?

George Gallen

unread,
Feb 15, 2023, 4:16:16 PM2/15/23
to mvd...@googlegroups.com
Had hopes for this one, but no, it didn't pull the record. I guess it still considers > 127 an alpha?

George


From: 'Will Johnson' via Pick and MultiValue Databases <mvd...@googlegroups.com>
Sent: Wednesday, February 15, 2023 1:35 PM
To: Pick and MultiValue Databases <mvd...@googlegroups.com>

Subject: Re: [mvdbms] Universe - how to "find" a character > char(127) from SELECT using LIKE?

George Gallen

unread,
Feb 15, 2023, 4:19:56 PM2/15/23
to mvd...@googlegroups.com
thanks, we already have a routine that replaces extended chars with their non extended equiv as subroutine.

This was strictly for doing a SELECT at the command line to find records with the extended codes.

George


From: mvd...@googlegroups.com <mvd...@googlegroups.com> on behalf of ROBERT N <erniev...@gmail.com>
Sent: Tuesday, February 14, 2023 7:07 PM
To: mvd...@googlegroups.com <mvd...@googlegroups.com>

Subject: Re: [mvdbms] Universe - how to "find" a character > char(127) from SELECT using LIKE?
I have used this a lot in UNIVERSE:

* SYS.FIX.CTRL.CHARS
*
* ROBERT NORMAN AND ASSOCIATES
* 23441 Golden Springs Dr., #289, Diamond Bar, CA 91765
* (951) 541-1668
* I...@KEYWAY.NET

George Gallen

unread,
Feb 15, 2023, 4:32:59 PM2/15/23
to mvd...@googlegroups.com
What is the UPARROW dictionary item?

do you mean the ^ command in the editor? or something in system VOC?

Oddly - when I was in one account and did:
ED VOC ^    - it converted the item name to "^094"
also tried ED VOC ^^094 and got "^094^094094"

but....If I LOGTO UV
ED VOC ^   - the item name is "^" and not converted.


Sent: Tuesday, February 14, 2023 7:25 PM

To: mvd...@googlegroups.com <mvd...@googlegroups.com>
Subject: Re: [mvdbms] Universe - how to "find" a character > char(127) from SELECT using LIKE?

ROBERT N

unread,
Feb 15, 2023, 7:43:27 PM2/15/23
to mvd...@googlegroups.com
I wrote a dictionary item called UPARROW which is an I-type that calls
a subroutine. The subroutine is basically the same as one of the
subroutines in the attached source code. So I could execute a
statement like SELECT MASTERFILE WITH UPARROW LIKE "...'^127'..."
> --
> You received this message because you are subscribed to
> the "Pick and MultiValue Databases" group.
> To post, email to: mvd...@googlegroups.com
> To unsubscribe, email to: mvdbms+un...@googlegroups.com
> For more options, visit http://groups.google.com/group/mvdbms
> ---
> You received this message because you are subscribed to the Google Groups
> "Pick and MultiValue Databases" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to mvdbms+un...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/mvdbms/SJ2PR11MB7648F67EFBADC98CAA6247ECFAA39%40SJ2PR11MB7648.namprd11.prod.outlook.com.
>

George Gallen

unread,
Feb 16, 2023, 10:07:14 AM2/16/23
to mvd...@googlegroups.com
Gotcha.  If I need to do this more often - that might be a better route - thanks


Sent: Wednesday, February 15, 2023 7:43 PM

ROBERT N

unread,
Mar 19, 2023, 12:19:51 AM3/19/23
to mvd...@googlegroups.com
Oops, forgot to attach insert for non-universe users:

*******************************************************************************
*
* uniVerse include file for GETPU/SETPU keys
*
* Module GETPU.H
*
* (c) Copyright 2000 Informix Software Inc. - All Rights Reserved
* This is unpublished proprietary source code of Informix Software Inc.
* The copyright notice above does not evidence any actual or intended
* publication of such source code.
*
*******************************************************************************

EQUATE PU$FIRSTWRITEKEY         TO 1       ;* First READ/WRITE key
EQUATE PU$MODE                  TO 1       ;* Printer mode (0 for terminal)
EQUATE PU$WIDTH                 TO 2       ;* Device width (columns)
EQUATE PU$LENGTH                TO 3       ;* Device length (lines)
EQUATE PU$TOPMARGIN             TO 4       ;* Top margin (lines)
EQUATE PU$BOTMARGIN             TO 5       ;* Bottom margin (lines)
EQUATE PU$LEFTMARGIN            TO 6       ;* Left margin (columns)
EQUATE PU$SPOOLFLAGS            TO 7       ;* Spool option flags
EQUATE PU$DEFERTIME             TO 8       ;* Spool defer time (mins after m'night)
EQUATE PU$FORM                  TO 9       ;* Spool form type (string)
EQUATE PU$BANNER                TO 10      ;* Spool banner (string)
EQUATE PU$LOCATION              TO 11      ;* Spool location (string)
EQUATE PU$COPIES                TO 12      ;* Number of copies to spool
EQUATE PU$DISKNUMBER            TO 13      ;* Spool disk number
EQUATE PU$PAGING                TO 14      ;* Pause at page end (terminal only)
EQUATE PU$PAGENUMBER            TO 15      ;* Set page number
EQUATE PU$DISABLE               TO 16      ;* Disable or enable this print unit
EQUATE PU$CONNECT               TO 17      ;* Connect two print units
EQUATE PU$DEVICENO              TO 18      ;* Logical device number (modes 2,4,5)
EQUATE PU$PRIORITY              TO 19      ;* Spool job priority 0 - 255
EQUATE PU$USEROPTS              TO 20      ;* Text string of user options to pass through
EQUATE PU$RELEASE               TO 21      ;* Allow print unit to be reused.
EQUATE PU$NLSMAP                TO 22      ;* Set/Read print unit NLS map.
EQUATE PU$FONTBOLD              TO 23      ;* Print text in bold font.
EQUATE PU$FONTITALIC            TO 24      ;* Print text in italic font.
EQUATE PU$FONTNAME              TO 25      ;* Font name to be used in GDI mode.
EQUATE PU$FONTSIZE              TO 26      ;* Font size to be used in GDI mode.
EQUATE PU$GDI                   TO 27      ;* Request GDI mode printing.
EQUATE PU$LINESPACE             TO 28      ;* Line spacing to be used in GDI mode.
EQUATE PU$RAW                   TO 29      ;* Request raw mode printing.
EQUATE PU$TABSIZE               TO 30      ;* Tab stop spacing to be used in GDI mode.
EQUATE PU$LASTWRITEKEY          TO 30      ;* Last READ/WRITE key
EQUATE PU$FIRSTREADKEY          TO 1001    ;* First READ-ONLY key
EQUATE PU$COLUMNSLEFT           TO 1001    ;* Cols left before new line needed
EQUATE PU$LINESLEFT             TO 1002    ;* Lines left before new page needed
EQUATE PU$HEADERLINES           TO 1003    ;* Lines taken by current header
EQUATE PU$FOOTERLINES           TO 1004    ;* Lines taken by current footer
EQUATE PU$DATALINES             TO 1005    ;* Lines between current header and footer
EQUATE PU$DATACOLUMNS           TO 1006    ;* Cols between left margin and dev width
EQUATE PU$ASSIGN                TO 1007    ;* Assign highest available print unit
EQUATE PU$LASTREADKEY           TO 1007    ;* Last READ-ONLY key
EQUATE PU$DISCONNECT            TO 10000   ;* 'magic' number for a disconnected print unit

*  END-CODE


--
You received this message because you are subscribed to
the "Pick and MultiValue Databases" group.
To post, email to: mvd...@googlegroups.com
To unsubscribe, email to: mvdbms+un...@googlegroups.com
For more options, visit http://groups.google.com/group/mvdbms
---
You received this message because you are subscribed to the Google Groups "Pick and MultiValue Databases" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mvdbms+un...@googlegroups.com.

James A

unread,
Mar 19, 2023, 2:36:22 AM3/19/23
to mvd...@googlegroups.com
Yikes all that code is yelling at me! (Is what any developer born after 1980 will feel)

Elender Góis Gallas

unread,
Mar 20, 2023, 3:09:41 PM3/20/23
to Pick and MultiValue Databases

You can use the ASCII function to find the ASCII code for the special character you want to search for. In this case, char(146) is actually the ASCII code for the right single quotation mark (’).

You can then use the CHAR function to create a character from the ASCII code and search for it using the LIKE operator. Here's an example SQL statement that should work:

SELECT * FROM your_table WHERE email LIKE '%' || CHAR(146) || '%';

This statement will search for any email address in your_table that contains the right single quotation mark character. The '%' symbols before and after the CHAR(146) function are wildcards that allow for any characters before and after the special character.

I hope this helps!

Reply all
Reply to author
Forward
Message has been deleted
0 new messages