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]
[mailto:[EMAIL PROTECTED] On Behalf Of Wendy Smoak
Sent: Thursday, December 29, 2005 6:16 AM
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/
-------
u2-users mailing list
[email protected]
To unsubscribe please visit http://listserver.u2ug.org/

Reply via email to