Wjhonson <wjhonson <at> aol.com> writes: > > That's interesting John, but the del *does* in fact *shift* the entire array forward each time. > It really does :) > > You can traverse without re-scanning by using the SELECT or SELECTV to transform the entire contents > *once* into a type of Get List (it works try it!) > > You can then use a READNEXT to extract each row, without the need to rescan from the beginning, since > READNEXT has always maintainted a pointer to where it left off. It doesn't start at the front each time.
Hi I just used OSOPEN to open the file and the file is not getting recognized. Here is the piece of script I have used. OSOPEN FILE.NAME2 TO F.KEYFILE ELSE STOP "CAN Not find file" Where FILE.NAME2 is the path and the file name. Also as suggested below, how could I use get list for a file which is opened from server. Thanks in Advance, Sathya V. > > -----Original Message----- > From: Israel, John R. <JohnIsrael <at> daytonsuperior.com> > To: 'U2 Users List' <u2-users <at> listserver.u2ug.org> > Sent: Tue, Apr 30, 2013 9:27 am > Subject: Re: [U2] Help needed.. > > Here is some fast and loose code that I often use. > > READ TXT.REC FROM F.YYYY, KEY.TXT > LOOP > ROW = TXT<1> > WHILE ROW # "" > DEL TXT<1> ;* Make the TXT file smaller and smaller and not traversing deeper > and deeper > CONVERT CHAR(9) TO <at> FM IN ROW > KEY = ROW<1> ;* extract the key out of the row > DEL ROW<1> ;* Remove the key from the row - all that is left is the record > WRITE ROW ON F.XXX, KEY > REPEAT > > JRI > > -----Original Message----- > From: u2-users-bounces <at> listserver.u2ug.org [mailto:u2-users-bounces <at> listserver.u2ug.org] > On Behalf Of Sathya > Sent: Tuesday, April 30, 2013 11:21 AM > To: u2-users <at> listserver.u2ug.org > Subject: [U2] Help needed.. > > Hi all,.. > > I have a requirement here. Need guidance in doing that. Any help will be useful. > > TIA. > > I have a flat file with tab delimited records and the file looks like below: > > abcd 1234 > cdef 3478 > ghae 6284 > ... > > I have to fetch the data 'abcd' and 'cdef' from this flat file and fetch some > corresponding attributes from a file which has 'abcd' and 'cdef' as the key > values. Please let me know if this could be done. If yes any kinda basic > suggestions in doing that will be helpful. > > Thanks again, > Sathya V. > > _______________________________________________ > U2-Users mailing list > U2-Users <at> listserver.u2ug.org > http://listserver.u2ug.org/mailman/listinfo/u2-users > _______________________________________________ > U2-Users mailing list > U2-Users <at> listserver.u2ug.org > http://listserver.u2ug.org/mailman/listinfo/u2-users > > > _______________________________________________ > U2-Users mailing list > U2-Users <at> listserver.u2ug.org > http://listserver.u2ug.org/mailman/listinfo/u2-users > > _______________________________________________ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users