Bill, This is an example from Universe. I *think* it works on UniData, too. Look at lines 1,2, & 8,9,10 of the program. This is a simple example. I use DICT VOC TYPE, because everyone is probably familiar with it.
>ED CDS.BP BILL 15 lines long. ----: P 0001: OPEN 'DICT VOC' TO VOC.DCT ELSE STOP 0002: READ TYPE.IDESC FROM VOC.DCT, 'TYPE' ELSE STOP 0003: OPEN 'VOC' TO VOC.FVAR ELSE STOP 0004: SELECT VOC.FVAR 0005: LOOP 0006: READNEXT VOC.ID ELSE EXIT 0007: READ VOC.REC FROM VOC.FVAR, VOC.ID ELSE STOP 0008: @RECORD = VOC.REC 0009: @ID = VOC.ID 0010: TYPE = ITYPE( TYPE.IDESC ) 0011: CRT VOC.ID, TYPE 0012: INPUT Q 0013: UNTIL Q = 'Q' 0014: REPEAT 0015: END Bottom at line 15. ----: Q >ED DICT VOC TYPE This is a Type "I" Descriptor last compiled on 07/29/03 at 15:35. 20 lines long. ----: P7 0001: I 0002: IF F1[1,1]='P' THEN F1[1,2] ELSE F1[1,1] 0003: 0004: 0005: 2L## 0006: S 0007: ----: Q > >RUN CDS.BP BILL HASH.TEST V ? QUIT.KEY X ? CLEAR.LOCKS V ?Q > -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Bill Stinocher Sent: Tuesday, March 01, 2005 2:19 PM To: [EMAIL PROTECTED] Subject: [U2] Using an I descriptor in a UniBasic program Hello all. Being new to UniData, I hope that maybe someone can help me. How do you read an I descriptor in a UniBasic program? The IBM manual gives me a hint (looking at the CALCULATE command), but the example given uses a select on the entire file. I am looking for a way to read the actual data and the I descriptor within a loop without using a select. I'm familiar with opening, reading, updating, etc. the data portion of a file, but not the dictionary. Can anybody point me in the right direction? Thanks ------- 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/