Action command S (select) on dates/numbers

Boyle, Joe Joe.Boyle@cognos.com
Wed, 16 May 2001 06:55:36 -0400


Hi Markus,

I am assuming that by your comment 'S action for dates (or numbers)' you are
referring to select processing. I've found that select patterns do work e.g.
entering %@6@ will find all numeric values containing the digit 6.

The field structure as seen from Quick is EMPLOYEE_NO OF EMPLOYEES NUMERIC
-9(6), this is a c-isam file on Unix.

For a list of other patterns which may work, look in the 'Pattern Matching
in Powerhouse' section of your Qdesign statement manual.

I have also found that syntax like that below will achieve the equivalent of
the '@@' function when used with indexes containing numeric segments, but
only with btree type file systems such as RMS, Xbase etc... I seem to recall
that Oracle and SQL did'nt like this.


proc input TEST1_DATO
begin

; this input procedure is required only if you have to rework a date format
entered by the user. Not required if ; not a date
;


if 5 lt  size(truncate(fieldtext)) 
then begin

if 7 gt size(truncate(fieldtext)) 
then begin
if  20 gt nconvert (  fieldtext[5:2] )
then let t1 = nconvert ( &
( "20" +  fieldtext[5:2] &
+ fieldtext [3:2] + fieldtext [1:2] ))	 
else  let t1 = nconvert ( &
( "19" +  fieldtext[5:2] &
+ fieldtext [3:2] + fieldtext [1:2] ))
end
else  let t1 =   nconvert ( &
( fieldtext[5:4] &
+ fieldtext [3:2] + fieldtext [1:2] ))


end

END


PROCEDURE PATH
BEGIN
let t-flag = "P"

  REQUEST TEST1_DATO OF TEST1
  IF PROMPTOK
    THEN LET PATH = 1
  IF PATH = 0
    THEN BEGIN
    LET PATH = 2
    END
END


PROCEDURE FIND
BEGIN


for display  test1
begin

  IF PATH = 1
    THEN begin
    
    	if t-flag = "P"
	then begin
		let t-flag = "F"
;		next, set the pointer in the file
   		GET TEST1 unique &
     		VIA TEST1_DATO  using T1 optional
	end

     	else GET TEST1 SEQUENTIAL

     end
     
     
  IF PATH = 2
    THEN GET TEST1 SEQUENTIAL
    
    end
END


regards,
Joe Boyle.


-----Original Message-----
From: Markus Grossrieder [mailto:markus.grossrieder@alba-systems.com]
Sent: 16 May 2001 10:25
To: Powerhouse List (E-mail)
Subject: Action command S (select) on dates/numbers


Hi all,

I just wonder if it is possible to use the S action for dates (or numbers)
in
combination with wildcards, i.e.
- all invoices with '1999' in the date
- all clients with '000' in the clients ID number
- etc.
I never find out if it's possible and
(if yes) how to do it, or
(if not) why not (Conrad, Bob) ?

TIA, Markus

ps: PH 8.13d (HP Unix), 7.10g (VMS)


= = = = = = = = = = = = = = = = = = = = = = = = = = = =
Mailing list: powerh-l@lists.swau.edu
Subscribe: "subscribe" in message body to powerh-l-request@lists.swau.edu
Unsubscribe: "unsubscribe" in message body to
powerh-l-request@lists.swau.edu
http://lists.swau.edu/mailman/listinfo/powerh-l
This list is closed, thus to post to the list you must be a subscriber.