Wendy
Try this:
RESULT-1 = @SYSTEM.RETURN.CODE
Keep in mind that you are counting multiple records in the VOC.
I used the -1 with your code and got the following result when I listing
10 records from my VOC.
LIST VOC DATA.RECORDS DICT.RECORDS 14:49:55 Dec 28 2005 1
On 12/28/05, Koser, Mike [EMAIL PROTECTED] wrote:
RESULT-1 = @SYSTEM.RETURN.CODE
Keep in mind that you are counting multiple records in the VOC.
I *think* I'm counting records in the file whose name matches the @ID
of VOC as we're iterating through the select list. I'm only returning
one
You will lose your active SELECT list if you don't save it and restore it.
Thank you,
David A. Green
DAG Consulting
(480) 813-1725
www.dagconsulting.com
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Wendy Smoak
Sent: Wednesday, December 28, 2005 12:16
To: u2-users@listserver.u2ug.org
Subject: Re: [U2] Record count from an I-descriptor in the VOC
On 12/28/05, Koser, Mike [EMAIL PROTECTED] wrote:
RESULT-1 = @SYSTEM.RETURN.CODE
Keep in mind that you are counting multiple records in the VOC.
I *think* I'm counting records in the file whose name
Wendy wrote
It only ever lists one line. The record count for PERSON is wrong
(but the dictionary count is correct. (Yes, really.) )
/Wendy wrote
Looking at the code I would expect that. The active select list is
exhausted when you hit the first count. Since none of the items in the
person file
You may also have problems if the file ( or dict file ) is invalid or
does not exist. ( You will get a -1 )
Note, can also get around the select list issue, if you include the
select criteria on the list statement.
LIST VOC A51.COUNT.FILE A51.COUNT.DICT WITH F1 = F
Michael Rajkowski
---
Performing a query from within a query is always going to cause
problems.
I think this topic has been covered before, but in relation to
performing a SELECT from within an subroutine called from an I-type
dictionary item.
Regards,
David
-Original Message-
From: [EMAIL PROTECTED]
On 12/28/05, Mike Rajkowski [EMAIL PROTECTED] wrote:
Looking at the code I would expect that. The active select list is
exhausted when you hit the first count. Since none of the items in the
person file are in the select list no items are counted. ( 0 Items )
The second call to the
Wendy Smoak
A coworker suggested basically the same thing, but with
READLIST/FORMLIST instead of SAVE.LIST/GET.LIST.
That is a lot of mucking about with select-list 0. For more efficiency
without changing your subroutine, try:
SELECT VOC WITH criteria TO 1
LIST VOC FROM 1 A51.COUNT.FILE
Wendy,
I setup the following and got the results I think you are looking for
without the need for selecting the VOC.
AE DICT VOC CTR
001: I
002: SUBR(CTR.VOC,@ID)
003:
004: FILE COUNT DICT COUNT
005: L#21
006: S
AE BP CTR.VOC
001: SUBROUTINE CTR.VOC(RESULT,ID)
002: RESULT =
003: EXECUTE 'COUNT
10 matches
Mail list logo