=========================================================================== BBS: The Abacus * HST/DS * Potterville, MI Date: 03-12-93 (02:53) Number: 109 From: ROB MCKEE Refer#: NONE To: CASEY PEARSON Recvd: NO Subj: Layout problem (HELP!) Conf: (35) Quick Basi --------------------------------------------------------------------------- Hello CASEY! You wrote to ALL: CP> I need help with random access files. (RAF) Here is the CP> layout: CP> Field Columns Type CP> Stree Number 1 - 6 String ----------Some deleted---------- CP> Social Security # 63 - 71 string CP> I will be reading from a data file that is prepared by CP> someone else and using the above layout as my guide to read CP> this data. Does anyone have an idea or code that would CP> implement this? I need the open statement too. The file is CP> called STDNTEMP.NDX. If someone needs the file, I could CP> upload it here on the Abacus for folks to get it, if it's CP> need to write the code. DEFINT A-Z TYPE StdnTempType StreeNumber AS STRING * 6 StreetName AS STRING * 22 StreetDirection AS STRING * 2 StreetType AS STRING * 6 City AS STRING * 15 State AS STRING * 2 ZipCode AS STRING * 5 ' should be 10 YTDHoursWorked AS INTEGER '/10 HourlyRate AS SINGLE YTDGrossPay AS DOUBLE SocialSecurityNum AS STRING * 9 END TYPE DIM StdnTemp AS StdnTempType StdnTempHandle = FREEFILE OPEN "StdnTemp.ndx" FOR RANDOM AS_ StdnTempHandle LEN = LEN(StdnTemp) StdnTemp.StreeNumber = "6091" StdnTemp.StreetName = "Ralston" StdnTemp.StreetType = "Ave" StdnTemp.StreetDirection = "NS" StdnTemp.City = "Richmond" StdnTemp.State = "CA" StdnTemp.ZipCode = "94805" StdnTemp.YTDHoursWorked = 2048 StdnTemp.HourlyRate = .1 StdnTemp.YTDGrossPay = 1.95 StdnTemp.SocialSecurityNum = "000000000" PUT #StdnTempHandle, 1, StdnTemp FOR t = 1 TO 1 GET #StdnTempHandle, t, StdnTemp ? RTRIM$(StdnTemp.StreeNumber) + " " + RTRIM$(_ StdnTemp.StreetName) + " " + StdnTemp.StreetType ? StdnTemp.StreetDirection ? Rtrim$(StdnTemp.City)+", "+ StdnTemp.State, StdnTemp.ZipCode ? StdnTemp.YTDHoursWorked, StdnTemp.HourlyRate ? StdnTemp.YTDGrossPay ? StdnTemp.SocialSecurityNum NEXT SysOp 1:125/411@FidoNet INTERNET rmckee@f411.n125.z1.fidonet.org --- timEd/B7 * Origin: Flyer_Proof_Computer_Svs,Richmond_CA,MO,V32B (1:125/411) SEEN-BY: 1/211 11/2 4 13/13 101/1 108/89 109/25 110/69 114/5 123/19 124/1 SEEN-BY: 153/752 154/40 77 157/2 159/100 125 430 950 203/23 209/209 280/1 SEEN-BY: 390/1 396/1 15 397/2 2230/100 3603/20