dbTalk Databases Forums  

require select

comp.databases.pick comp.databases.pick


Discuss require select in the comp.databases.pick forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Chris Mawdsley
 
Posts: n/a

Default require select - 06-08-2006 , 06:49 AM






Hello Folks

I was asked this question today & do not know the answer. Is there an
equivalent command to require select (I believe U2 has it) in D3. Any
suggestions on how to achieve the same result.

Many Thanks



Reply With Quote
  #2  
Old   
Richard Wilson
 
Posts: n/a

Default Re: require select - 06-08-2006 , 08:17 AM






I dont know if D3 has it or not, I'm sure revelation doesnt and have use the
following work around for years. Note you'll probably need to tweak it a bit
since this uses Revelation specific commands (@RECCOUNT, PERFORM, etc)

SELECT VOC SAMPLE 1
REQUIRE.SELECT SORT VOC etc etc etc

and REQUIRE.SELECT is a cataloged program. logic below

IF @RECCOUNT THEN
SENT = FIELD(@SENTENCE,' ',2,9999)
PERFORM SENT
END

Rich

Chris Mawdsley wrote:

Quote:
Hello Folks

I was asked this question today & do not know the answer. Is there an
equivalent command to require select (I believe U2 has it) in D3. Any
suggestions on how to achieve the same result.

Many Thanks




Reply With Quote
  #3  
Old   
AT
 
Posts: n/a

Default Re: require select - 06-08-2006 , 10:51 AM



Richard:

It depends where you want to check for the presence of the select-list.

If you can put it in a Proc, you can use the

IF E ...
IF # E ...

Proc statements.

If you want to put it in the program, you can use the

IF SYSTEM(11) ...

Basic statement..

Further, you might also want to look up the details of

PROCREAD ...
TCLREAD ...

Basic statements. They might be appropriate in this situation.

Regards

Malcolm Bull


Reply With Quote
  #4  
Old   
Mark Brown
 
Posts: n/a

Default Re: require select - 06-08-2006 , 12:26 PM



Malcolm,

In 38 years in programming and 24 in Pick, I've never heard that particular
phrase used in a sentence. What exactly is it (apparently an active list
count) but what do the words mean?

Thanks

Mark Brown


<MBTraining (AT) aol (DOT) com> wrote

Quote:
Richard:

It depends where you want to check for the presence of the select-list.

If you can put it in a Proc, you can use the

IF E ...
IF # E ...

Proc statements.

If you want to put it in the program, you can use the

IF SYSTEM(11) ...

Basic statement..

Further, you might also want to look up the details of

PROCREAD ...
TCLREAD ...

Basic statements. They might be appropriate in this situation.

Regards

Malcolm Bull




Reply With Quote
  #5  
Old   
AT
 
Posts: n/a

Default Re: require select - 06-08-2006 , 12:54 PM



Mark:

I'm not sure which

Quote:
particular phrase
you mean.

Malcolm Bull



Reply With Quote
  #6  
Old   
Richard Wilson
 
Posts: n/a

Default Re: require select - 06-08-2006 , 01:04 PM



I assume you are referring to REQUIRE.SELECT

it started with prime information (probably release 6.0)

SELECT VOC WITH F1 EQ 'XXX'
SORT VOC BY F2 BY F3 F1 F2 F3 REQUIRE.SELECT

the sort wont happen if an active select isnt present

its real useful when you select on a large data file but the condition(s) in the
select statement returns zero items. Keeps lots of paper that will be thrown
away from being used

remember prime did not have procs and IF testing in paragraphs was somewhat weak
at times

Rich

Mark Brown wrote:

Quote:
Malcolm,

In 38 years in programming and 24 in Pick, I've never heard that particular
phrase used in a sentence. What exactly is it (apparently an active list
count) but what do the words mean?

Thanks

Mark Brown


MBTraining (AT) aol (DOT) com> wrote in message
news:1149781897.766162.288070 (AT) f6g2000cwb (DOT) googlegroups.com...

Richard:

It depends where you want to check for the presence of the select-list.

If you can put it in a Proc, you can use the

IF E ...
IF # E ...

Proc statements.

If you want to put it in the program, you can use the

IF SYSTEM(11) ...

Basic statement..

Further, you might also want to look up the details of

PROCREAD ...
TCLREAD ...

Basic statements. They might be appropriate in this situation.

Regards

Malcolm Bull






Reply With Quote
  #7  
Old   
Mark Brown
 
Posts: n/a

Default Re: require select - 06-08-2006 , 02:57 PM



Malcolm,

I'm sorry for the vague verbage. Old age, long winded but short attention
span.

Richard,

Thank you. That was exactly what I wanted. This would be really useful in
my favorite nightmare:

select filename with delete.flag = "1"
delete filename

I love the logic: if nothing is selected, everything is deleted.

Thanks both.


Mark



"Richard Wilson" <rwilson (AT) lakeside-systems (DOT) com> wrote

Quote:
I assume you are referring to REQUIRE.SELECT

it started with prime information (probably release 6.0)

SELECT VOC WITH F1 EQ 'XXX'
SORT VOC BY F2 BY F3 F1 F2 F3 REQUIRE.SELECT

the sort wont happen if an active select isnt present

its real useful when you select on a large data file but the condition(s)
in the select statement returns zero items. Keeps lots of paper that will
be thrown away from being used

remember prime did not have procs and IF testing in paragraphs was
somewhat weak at times

Rich

Mark Brown wrote:

Malcolm,

In 38 years in programming and 24 in Pick, I've never heard that
particular phrase used in a sentence. What exactly is it (apparently an
active list count) but what do the words mean?

Thanks

Mark Brown



Reply With Quote
  #8  
Old   
Luke Webber
 
Posts: n/a

Default Re: require select - 06-08-2006 , 06:10 PM



Richard Wilson wrote:
Quote:
I assume you are referring to REQUIRE.SELECT

it started with prime information (probably release 6.0)

SELECT VOC WITH F1 EQ 'XXX'
SORT VOC BY F2 BY F3 F1 F2 F3 REQUIRE.SELECT

the sort wont happen if an active select isnt present

its real useful when you select on a large data file but the
condition(s) in the select statement returns zero items. Keeps lots of
paper that will be thrown away from being used

remember prime did not have procs and IF testing in paragraphs was
somewhat weak at times
Ah, thanks for explaining.

The simple way of doing this in PROC is...

PQ
HSELECT VOC WITH F1 EQ 'XXX'
STON
HSORT VOC BY F2 BY F3 F1 F2 F3 REQUIRE.SELECT
P

In BASIC it's like this...

DATA "SORT VOC BY F2 BY F3 F1 F2 F3 REQUIRE.SELECT
EXECUTE "SELECT VOC WITH F1 EQ 'XXX'"

This works because the stacked input is not processed by the SELECT
processor unless the SELECT is successful.

Luke


Reply With Quote
  #9  
Old   
frosty
 
Posts: n/a

Default Re: require select - 06-08-2006 , 07:18 PM



Quote:
Richard Wilson wrote:
I assume you are referring to REQUIRE.SELECT

it started with prime information (probably release 6.0)

SELECT VOC WITH F1 EQ 'XXX'
SORT VOC BY F2 BY F3 F1 F2 F3 REQUIRE.SELECT

the sort wont happen if an active select isnt present

its real useful when you select on a large data file but the
condition(s) in the select statement returns zero items. Keeps lots
of paper that will be thrown away from being used

remember prime did not have procs and IF testing in paragraphs was
somewhat weak at times

Luke Webber wrote:
Ah, thanks for explaining.

The simple way of doing this in PROC is...

PQ
HSELECT VOC WITH F1 EQ 'XXX'
STON
HSORT VOC BY F2 BY F3 F1 F2 F3 REQUIRE.SELECT
P

In BASIC it's like this...

DATA "SORT VOC BY F2 BY F3 F1 F2 F3 REQUIRE.SELECT
EXECUTE "SELECT VOC WITH F1 EQ 'XXX'"

This works because the stacked input is not processed by the SELECT
processor unless the SELECT is successful.
Then you don't need the "REQUIRE.SELECT" bit, do you?

--
frosty




Reply With Quote
  #10  
Old   
Luke Webber
 
Posts: n/a

Default Re: require select - 06-08-2006 , 09:46 PM



frosty wrote:

Quote:
Luke Webber wrote:
Ah, thanks for explaining.

The simple way of doing this in PROC is...

PQ
HSELECT VOC WITH F1 EQ 'XXX'
STON
HSORT VOC BY F2 BY F3 F1 F2 F3 REQUIRE.SELECT
P

In BASIC it's like this...

DATA "SORT VOC BY F2 BY F3 F1 F2 F3 REQUIRE.SELECT
EXECUTE "SELECT VOC WITH F1 EQ 'XXX'"

This works because the stacked input is not processed by the SELECT
processor unless the SELECT is successful.

Then you don't need the "REQUIRE.SELECT" bit, do you?
Ah frig. Copy and paste strikes again. <g>

Luke


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.