I've created a utility that allows me to process an English statement (output columns only, the select and sort are done prior) to produce a free-form CSV.
SSELECT CUSTOMER WITH STATE = "NJ" AND WITH AGED.BALANCE GT "100" DOWNLOAD CUSTOMER NAME CSZ PHONE CONTACT AGED.BALANCE (C:\FOLDER\ABC.CSV Thus, my download utility will parse the sentence and derive the values for the output dict items. The magic is to take the TCL statement, derive the filename (CUSTOMER) and using READNEXT, acquire each of the item id's from the SSELECT statement. Then I generate very tiny English statements of the form: EXECUTE "LIST FILE "ID" NAME ID-SUPP COL-HDR-SUPP {any other necessary suppressors}" CAPTURING X and viola, the variable "X" contains the single row, single column value of that customer's NAME. So your request is a variant of just processing a specific file with one or more ID's for one field. Using English allows the magic of the correlatives to dothe work so you don't have to re-write anything. I've implemented this in Ud/Uv, D3, Mvbase. It's too cumbersome on Microdata and mvbase has a quirk where the CAPTURING doesn't inhibit the screen output so it gets a little busy. My 2 cents. Mark Johnson ----- Original Message ----- From: "Bob Woodward" <[EMAIL PROTECTED]> To: "U2-Users List" <u2-users@listserver.u2ug.org> Sent: Wednesday, August 30, 2006 6:21 PM Subject: [U2] Using DICT items in basic program > Hi folks, > > I'm trying to set up a general use utility and what I'd like to do is to > be able to call this utility, passing it an open file handle, a couple > other parameters plus one that could be used to specify a dict entry > name, not a field number. The catch is I'd like to use the dict entry > regardless of what type of definition it is. Obviously there would be > some limits but the general definition is that the dict item ultimately > points to a piece of data. An example would be I would want to use a > data position field like CUST.NUM in the INVOICE file. I'd also want to > be able to use something like CUST.NAME in the INVOICE file which would > be a pointer to the CUSTOMER file's NAME field. The utility would use > READ or maybe XLATE to obtain the desired information. I looked at > ITYPE() but I'm not sure that's going to get me what I'm looking for. > In AREV it was simply using the {} brackets. > > TIA > > BobW > ------- > u2-users mailing list > u2-users@listserver.u2ug.org > To unsubscribe please visit http://listserver.u2ug.org/ ------- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/