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 ':ID CAPTURING OUTPUT
004: IF @SYSTEM.RETURN.CODE < 0 THEN
005: RESULT = "EMPTY "
006: END ELSE
007: RESULT = @SYSTEM.RETURN.CODE"L#10"
008: END
009: EXECUTE 'COUNT DICT ':ID CAPTURING OUTPUT
010: IF @SYSTEM.RETURN.CODE < 0 THEN
011: RESULT<-1> = "EMPTY "
012: END ELSE
013: RESULT<-1> = @SYSTEM.RETURN.CODE"L#10"
014: END
015: RESULT = CHANGE(RESULT,@AM," ")
016: RETURN
017: END
After you compile and catalog the subroutine all that you have to do is
a straight LIST or SORT of the VOC as follows:
LIST (OR SORT) VOC WITH F1 = "F" CTR
Walter
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Wendy Smoak
Sent: Wednesday, December 28, 2005 1:16 PM
To: [email protected]
Subject: [U2] Record count from an I-descriptor in the VOC
In UniData 6.1, I need to list the F-type VOC items with counts of the
records and dictionary items.
So I though I'd select the items from VOC, then
LIST VOC A51.COUNT.FILE A51.COUNT.DICT
where those two fields are I-Descriptors that call a subroutine...
SUBROUTINE S.A51.COUNT.RECORDS( RESULT, FILENAME, DICT, X1, X2 )
HUSH ON
EXECUTE "COUNT ":DICT:" ":FILENAME
RESULT = @SYSTEM.RETURN.CODE
HUSH OFF
RETURN
... passing the filename (@ID of VOC) and either "DICT" or nothing,
depending.
It works great if you only want to list one record! Either changing
@SYSTEM.RETURN.CODE or (more likely, a coworker pointed out,) changing
the active select list is causing a problem.
I'm still experimenting, but does anyone have other ideas of how I can
get this? I need three columns: the filename (@ID of VOC), the count
of records and the count of items in the dictionary.
Thanks,
Wendy Smoak
-------
u2-users mailing list
[email protected]
To unsubscribe please visit http://listserver.u2ug.org/
---
avast! Antivirus: Outbound message clean.
Virus Database (VPS): 0552-1, 12/28/2005
Tested on: 12/28/2005 11:52:45 PM
avast! - copyright (c) 1988-2004 ALWIL Software.
http://www.avast.com
-------
u2-users mailing list
[email protected]
To unsubscribe please visit http://listserver.u2ug.org/