Re: [U2] How many will be selected?

2010-10-19 Thread Dan Goble
SYSTEM(11) in basic code will return the number of items selected

-Original Message-
From: u2-users-boun...@listserver.u2ug.org 
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of George Gallen
Sent: Tuesday, October 19, 2010 1:41 PM
To: U2 Users List
Subject: [U2] How many will be selected?

UV here

I open a file, then use SELECT filevarible then proceed to do a 
LOOP/READNEXT/REPEAT to
scan through the file.

OPEN ,SOMEFILE TO F.TEST ELSE STOP
SELECT F.TEST
LOOP
   READNEXT ID ELSE EXIT
REPEAT

Is there any way to know how many records WILL BE processed in that loop before 
scanning?

@selected doesn't work, it only returns the number of items in the last group 
that was read

I tried using SELECT filevariable TO list.variable   but you can't do a 
DCOUNT on that variable
   you can only READNEXT FROM list.variable

Aside from EXECUTE SELECT filename RTNLIST  in place of the SELECT 
filevariable so that
@selected would return with the actual number selected (which does do what I 
want)

Any other methods?


George Gallen
Senior Programmer/Analyst
Accounting/Data Division, EDI Administrator
ggal...@wyanokegroup.com
ph:856.848.9005 Ext 220
The Wyanoke Group
http://www.wyanokegroup.com



___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


Re: [U2] How many will be selected?

2010-10-19 Thread Dave Davis
Do you have SYSTEM(11) like we do in UniData?  It may do something else 
entirely or be slightly different.

-Original Message-
From: u2-users-boun...@listserver.u2ug.org 
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of George Gallen
Sent: Tuesday, October 19, 2010 1:41 PM
To: U2 Users List
Subject: [U2] How many will be selected?

UV here

I open a file, then use SELECT filevarible then proceed to do a 
LOOP/READNEXT/REPEAT to
scan through the file.

OPEN ,SOMEFILE TO F.TEST ELSE STOP
SELECT F.TEST
LOOP
   READNEXT ID ELSE EXIT
REPEAT

Is there any way to know how many records WILL BE processed in that loop before 
scanning?

@selected doesn't work, it only returns the number of items in the last group 
that was read

I tried using SELECT filevariable TO list.variable   but you can't do a 
DCOUNT on that variable
   you can only READNEXT FROM list.variable

Aside from EXECUTE SELECT filename RTNLIST  in place of the SELECT 
filevariable so that
@selected would return with the actual number selected (which does do what I 
want)

Any other methods?


George Gallen
Senior Programmer/Analyst
Accounting/Data Division, EDI Administrator
ggal...@wyanokegroup.com
ph:856.848.9005 Ext 220
The Wyanoke Group
http://www.wyanokegroup.com



___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users
html
body
 Dave Davis Team Lead, Ramp;D P: 614-875-4910 
x108 F: 614-875-4088 E: dda...@harriscomputer.com 
[http://www.harriscomputer.com/images/signatures/HarrisSchools.gif] 
[http://www.harriscomputer.com/images/signatures/DivisionofHarris.gif]
 6110 Enterprise Parkway Grove City, OH 43123 www.harris-schoolsolutions.com 
This message is intended exclusively for the individual or entity to which it 
is addressed. This communication may contain information that is proprietary, 
privileged or confidential
 or otherwise legally exempt from disclosure. If you are not the named 
addressee, you are not authorized to read, print, retain, copy or disseminate 
this message or any part of it. If you have received this message in error, 
please notify the sender immediately
 by e-mail and delete all copies of the message.
/body
/html
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


Re: [U2] How many will be selected?

2010-10-19 Thread FFT2001
In a message dated 10/19/2010 10:41:38 AM Pacific Daylight Time, 
ggal...@wyanokegroup.com writes:


 UV here
 
 I open a file, then use SELECT filevarible then proceed to do a 
 LOOP/READNEXT/REPEAT to
 scan through the file.
 
 OPEN ,SOMEFILE TO F.TEST ELSE STOP
 SELECT F.TEST
 LOOP
READNEXT ID ELSE EXIT
 REPEAT
 
 Is there any way to know how many records WILL BE processed in that loop 
 before scanning?
 
 @selected doesn't work, it only returns the number of items in the last 
 group that was read
 
 I tried using SELECT filevariable TO list.variable   but you can't do 
 a DCOUNT on that variable
you can only READNEXT FROM list.variable
 
 Aside from EXECUTE SELECT filename RTNLIST  in place of the SELECT 
 filevariable so that
 @selected would return with the actual number selected (which does do what 
 I want)
 
 Any other methods?
 
 
 George Gallen
 Senior Programmer/Analyst
 Accounting/Data Division, EDI Administrator
 ggal...@wyanokegroup.com
 ph:856.848.9005 Ext 220
 The Wyanoke Group
 http://www.wyanokegroup.com
 
 




George I think, if I'm psychic you want to know this, because you want to 
know How Much Longer Will This Process Take?

There *is* a way to do that, even with a simple BASIC select, but it's not 
quite the way you're trying to do it.
My solution doesn't involve the need to execute a select.  It relies on 
knowledge about the group structure.
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


Re: [U2] How many will be selected?

2010-10-19 Thread George Gallen
Psychic you are!  Do you read palms as well?


 
 George I think, if I'm psychic you want to know this, because you want
 to
 know How Much Longer Will This Process Take?
 
 There *is* a way to do that, even with a simple BASIC select, but it's
 not
 quite the way you're trying to do it.
 My solution doesn't involve the need to execute a select.  It relies on
 knowledge about the group structure.
 ___
 U2-Users mailing list
 U2-Users@listserver.u2ug.org
 http://listserver.u2ug.org/mailman/listinfo/u2-users
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


Re: [U2] How many will be selected?

2010-10-19 Thread FFT2001
In a message dated 10/19/2010 10:50:28 AM Pacific Daylight Time, 
ggal...@wyanokegroup.com writes:


 Psychic you are!  Do you read palms as well?
 

What you need to do is ask the system these questions:
1) How many groups are in this file? and
2) What group number am I in right now.

The groups are processed so rapidly that this will be all you need to know 
to calculate your dreams and desires in this regard.  And it will make your 
hair grow back.

Will Johnson
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


Re: [U2] How many will be selected?

2010-10-19 Thread Dave Laansma
The problem with this question is, if I understand correctly, the SELECT
F.FILENAME statement does not truly select the entire file all at once.

It essentially selects one group at a time and passes those keys to the
READNEXT statement as they become available.

Which is why the SELECT F.FILENAME makes keys available to the READNEXT
statement immediately.

I have a COUNT.FILE (FILENAME,REC.CNT) subroutine that I use to get the
number of records that are in the file just before I initiate the SELECT
F.FILENAME statement.

The subroutine performs a simple COUNT command and returns one number.

The COUNT command seems to run faster than the corresponding SELECT,
especially for larger files, since I'm guessing that it doesn't build
the list as it is reading the keys.

Even this is only a close estimate since more records can presumably be
added further down the file before my READNEXT gets to that block.

Technicians at Rocket, feel free to interject !

Sincerely,
David Laansma
IT Manager
Hubbard Supply Co.
Direct: 810-342-7143
Office: 810-234-8681
Fax: 810-234-6142
www.hubbardsupply.com
Delivering Products, Services and Innovative Solutions


-Original Message-
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of
fft2...@aol.com
Sent: Tuesday, October 19, 2010 1:56 PM
To: u2-users@listserver.u2ug.org
Subject: Re: [U2] How many will be selected?

In a message dated 10/19/2010 10:50:28 AM Pacific Daylight Time, 
ggal...@wyanokegroup.com writes:


 Psychic you are!  Do you read palms as well?
 

What you need to do is ask the system these questions:
1) How many groups are in this file? and
2) What group number am I in right now.

The groups are processed so rapidly that this will be all you need to
know 
to calculate your dreams and desires in this regard.  And it will make
your 
hair grow back.

Will Johnson
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


Re: [U2] How many will be selected?

2010-10-19 Thread George Gallen
I chose to do the: EXECUTE SELECT filename RTNLIST CAPTURING JUNK
Since it also does a SELECT filevarible with it in the RTNLIST.
Both COUNT and SELECT in the EXECUTE set the @SELECTED correctly,
so it would still work with the COUNT, just I'd still have to do
SELECT filevarible afterwards.

George

 -Original Message-
 From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-
 boun...@listserver.u2ug.org] On Behalf Of Dave Laansma
 Sent: Tuesday, October 19, 2010 2:10 PM
 To: U2 Users List
 Subject: Re: [U2] How many will be selected?
 
 The problem with this question is, if I understand correctly, the
 SELECT
 F.FILENAME statement does not truly select the entire file all at once.
 
 It essentially selects one group at a time and passes those keys to the
 READNEXT statement as they become available.
 
 Which is why the SELECT F.FILENAME makes keys available to the READNEXT
 statement immediately.
 
 I have a COUNT.FILE (FILENAME,REC.CNT) subroutine that I use to get the
 number of records that are in the file just before I initiate the
 SELECT
 F.FILENAME statement.
 
 The subroutine performs a simple COUNT command and returns one number.
 
 The COUNT command seems to run faster than the corresponding SELECT,
 especially for larger files, since I'm guessing that it doesn't build
 the list as it is reading the keys.
 
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


Re: [U2] How many will be selected?

2010-10-19 Thread George Gallen
takes longer as well. But seems you can't cheat mother UV, sooner or later
you lose what you save!

 -Original Message-
 From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-
 boun...@listserver.u2ug.org] On Behalf Of Steve Johnson
 Sent: Tuesday, October 19, 2010 2:12 PM
 To: U2 Users List
 Subject: Re: [U2] How many will be selected?
 
 If you execute SELECT SOMEFILE rather than the basic SELECT statement
 then
 you can get the number of items selected with the basic SELECTINFO
 function
 on UV or with @SYSTEM.RETURN.CODE on UD.
 
 Regards,
 Steve
 
 
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


Re: [U2] How many will be selected?

2010-10-19 Thread George Gallen
What is this? Doc Johnson's magic health tonic? Alas, I think
the hair is gone for good.

What function returns the group information? I don't remember seeing
  that one.

George

 -Original Message-
 From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-
 boun...@listserver.u2ug.org] On Behalf Of fft2...@aol.com
 Sent: Tuesday, October 19, 2010 1:56 PM
 To: u2-users@listserver.u2ug.org
 Subject: Re: [U2] How many will be selected?
 
 What you need to do is ask the system these questions:
 1) How many groups are in this file? and
 2) What group number am I in right now.
 
 The groups are processed so rapidly that this will be all you need to
 know
 to calculate your dreams and desires in this regard.  And it will make
 your
 hair grow back.
 
 Will Johnson
 ___
 U2-Users mailing list
 U2-Users@listserver.u2ug.org
 http://listserver.u2ug.org/mailman/listinfo/u2-users
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


Re: [U2] How many will be selected?

2010-10-19 Thread Henry Unger
From HELP BASIC SELECTINFO:

| SELECTINFO function  |
|  |
| _|
|  |
|  |
| SYNTAX   |
|  |
|   SELECTINFO (list, key) |
|  |
| DESCRIPTION  |
|  |
|Use the SELECTINFO function to determine whether a select list|
|is active, or to determine the number of items it contains.   |

Best regards,

Henry Unger
Hitech Systems, Inc.
http://www.hitech.com


 -Original Message-
 From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-
 boun...@listserver.u2ug.org] On Behalf Of George Gallen
 Sent: Tuesday, October 19, 2010 10:41 AM
 To: U2 Users List
 Subject: [U2] How many will be selected?
 
 UV here
 
 I open a file, then use SELECT filevarible then proceed to do a
 LOOP/READNEXT/REPEAT to
 scan through the file.
 
 OPEN ,SOMEFILE TO F.TEST ELSE STOP
 SELECT F.TEST
 LOOP
READNEXT ID ELSE EXIT
 REPEAT
 
 Is there any way to know how many records WILL BE processed in that
 loop before scanning?
 
 @selected doesn't work, it only returns the number of items in the last
 group that was read
 
 I tried using SELECT filevariable TO list.variable   but you can't
 do a DCOUNT on that variable
you can only READNEXT FROM list.variable
 
 Aside from EXECUTE SELECT filename RTNLIST  in place of the SELECT
 filevariable so that
 @selected would return with the actual number selected (which does do
 what I want)
 
 Any other methods?
 
 
 George Gallen
 Senior Programmer/Analyst
 Accounting/Data Division, EDI Administrator
 ggal...@wyanokegroup.com
 ph:856.848.9005 Ext 220
 The Wyanoke Group
 http://www.wyanokegroup.com
 
 
 
 ___
 U2-Users mailing list
 U2-Users@listserver.u2ug.org
 http://listserver.u2ug.org/mailman/listinfo/u2-users

___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


Re: [U2] How many will be selected?

2010-10-19 Thread DAVID WADEMAN
If he was using SELECT statement which thus using READNEXT, this puts
you in a save-list mode, does @SYSTEM.RETURN.CODE work for Universe? I
use it a lot in Unidata processes.

-Original Message-
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of George Gallen
Sent: Tuesday, October 19, 2010 1:41 PM
To: U2 Users List
Subject: [U2] How many will be selected?

UV here

I open a file, then use SELECT filevarible then proceed to do a
LOOP/READNEXT/REPEAT to
scan through the file.

OPEN ,SOMEFILE TO F.TEST ELSE STOP
SELECT F.TEST
LOOP
   READNEXT ID ELSE EXIT
REPEAT

Is there any way to know how many records WILL BE processed in that loop
before scanning?

@selected doesn't work, it only returns the number of items in the last
group that was read

I tried using SELECT filevariable TO list.variable   but you can't
do a DCOUNT on that variable
   you can only READNEXT FROM list.variable

Aside from EXECUTE SELECT filename RTNLIST  in place of the SELECT
filevariable so that
@selected would return with the actual number selected (which does do
what I want)

Any other methods?


George Gallen
Senior Programmer/Analyst
Accounting/Data Division, EDI Administrator
ggal...@wyanokegroup.com
ph:856.848.9005 Ext 220
The Wyanoke Group
http://www.wyanokegroup.com



___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


Re: [U2] How many will be selected?

2010-10-19 Thread Dan McGrath
In UD it is HASH(record key, file modulo, type) to return a key's group.

-Original Message-
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of George Gallen
Sent: Wednesday, 20 October 2010 5:19 AM
To: U2 Users List
Subject: Re: [U2] How many will be selected?

What is this? Doc Johnson's magic health tonic? Alas, I think the hair
is gone for good.

What function returns the group information? I don't remember seeing
  that one.

George

 -Original Message-
 From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users- 
 boun...@listserver.u2ug.org] On Behalf Of fft2...@aol.com
 Sent: Tuesday, October 19, 2010 1:56 PM
 To: u2-users@listserver.u2ug.org
 Subject: Re: [U2] How many will be selected?
 
 What you need to do is ask the system these questions:
 1) How many groups are in this file? and
 2) What group number am I in right now.
 
 The groups are processed so rapidly that this will be all you need to 
 know to calculate your dreams and desires in this regard.  And it will

 make your hair grow back.
 
 Will Johnson
 ___
 U2-Users mailing list
 U2-Users@listserver.u2ug.org
 http://listserver.u2ug.org/mailman/listinfo/u2-users
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users

__
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
__
###
The information transmitted in this message and attachments (if any) is 
intended only
for the person or entity to which it is addressed. The message may contain 
confidential
and/or privileged material.  Any review, retransmission, dissemination or other 
use of
or taking of any action in reliance upon this information by persons or 
entities other
than the intended recipient is prohibited.  If you received this in error, 
please
contact the sender and delete the material from any computer.

The intended recipient of this e-mail may only use, reproduce, disclose or 
distribute
the information contained in this e-mail and any attached files with the 
permission of IMB.
###
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users