!-------------------------------BEGIN ADD--------------------------------- !An ADD file has declarations, derived type definitions, etc. to be included at... !the top of the Client Module, followed by CONTAINS statement and then all of ... !the procedures developed by the analyst to include in the Client Module of a ... !given model. !----- !Insert model-level declarations here, if any !----- CONTAINS !the following procedures... !----- !Insert procedures here, if any subroutine ReadOrder(intFile,bigSur,bigTkn) integer:: intFile,intIOerr integer(kind=big):: bigSur,bigTkn !----- do call ReadAndChk(intFile) !Order date if(.not.&L.NextExists)exit #35.OrdDateTime = strInpLine !----- call ReadAndChk(intFile) !Order type, number, ipAddr if(.not.&L.NextExists)exit if(strInpLine(4:4)==" ")then &T.Offset = 0 else &T.Offset = 1 endif #4.OrdType = strInpLine(1:3+&T.Offset) #7.OrdNumber = strInpLine(4+&T.Offset+1:4+&T.Offset+7) #19.IPaddr = strInpLine(4+&T.Offset+7+1:) !----- call ReadAndChk(intFile) !Units label call ReadAndChk(intFile) !Units if(.not.&L.NextExists)exit read(strInpLine,*)#R.Units !----- call ReadAndChk(intFile) !PlaceFirst label call ReadAndChk(intFile) !PlaceFirst if(.not.&L.NextExists)exit #35.PlaceFirst = strInpLine !----- call ReadAndChk(intFile) !Dummy label call ReadAndChk(intFile) !Dummy if(.not.&L.NextExists)exit !----- call ReadAndChk(intFile) !PlaceStreet1 label call ReadAndChk(intFile) !PlaceStreet1 if(.not.&L.NextExists)exit #35.PlaceStreet1 = strInpLine !----- call ReadAndChk(intFile) !PlaceStreet2 label call ReadAndChk(intFile) !PlaceStreet2 if(.not.&L.NextExists)exit #35.PlaceStreet2 = strInpLine !----- call ReadAndChk(intFile) !PlaceCity label call ReadAndChk(intFile) !PlaceCity if(.not.&L.NextExists)exit #35.PlaceCity = strInpLine !----- call ReadAndChk(intFile) !PlaceState label call ReadAndChk(intFile) !PlaceState if(.not.&L.NextExists)exit #35.PlaceState = strInpLine !----- call ReadAndChk(intFile) !PlaceZip label call ReadAndChk(intFile) !PlaceZip if(.not.&L.NextExists)exit #35.PlaceZip = strInpLine !----- call ReadAndChk(intFile) !PlaceCountry label call ReadAndChk(intFile) !PlaceCountry if(.not.&L.NextExists)exit #35.PlaceCountry = strInpLine !----- call ReadAndChk(intFile) !NTSC label call ReadAndChk(intFile) !NTSC if(.not.&L.NextExists)exit if(strInpLine(1:7)=="NeedFmt")strInpLine = "NTSC" #4.Format = strInpLine !----- call ReadAndChk(intFile) !PlacePhone label call ReadAndChk(intFile) !PlacePhone if(.not.&L.NextExists)exit #35.PlacePhone = strInpLine !----- call ReadAndChk(intFile) !PlaceFax label call ReadAndChk(intFile) !PlaceFax if(.not.&L.NextExists)exit #3.CountryCode = strInpLine !----- call ReadAndChk(intFile) !PlaceEmail label call ReadAndChk(intFile) !PlaceEmail if(.not.&L.NextExists)exit #35.PlaceEmail = strInpLine !----- call ReadAndChk(intFile) !ShipOption label call ReadAndChk(intFile) !ShipOption if(.not.&L.NextExists)exit #15.ShipOption = strInpLine !----- call ReadAndChk(intFile) !TotPrice label call ReadAndChk(intFile) !TotPrice if(.not.&L.NextExists)exit read(strInpLine,*)#D.TotPrice !----- call ReadAndChk(intFile) !Tax label call ReadAndChk(intFile) !Tax if(.not.&L.NextExists)exit !----- call ReadAndChk(intFile) !SubTotal label call ReadAndChk(intFile) !SubTotal if(.not.&L.NextExists)exit read(strInpLine,*)#D.SubTotal !----- call ReadAndChk(intFile) !ShipHandle label call ReadAndChk(intFile) !ShipHandle if(.not.&L.NextExists)exit read(strInpLine,*)#D.ShipHandle !----- call ReadAndChk(intFile) !REAP label call ReadAndChk(intFile) !REAP if(.not.&L.NextExists)exit !----- call ReadAndChk(intFile) !Total label call ReadAndChk(intFile) !Total if(.not.&L.NextExists)exit read(strInpLine,*)#D.Total !----- call ReadAndChk(intFile) !PayOption label call ReadAndChk(intFile) !PayOption if(.not.&L.NextExists)exit #15.PayOption = strInpLine !----- call ReadAndChk(intFile) !CardNum label call ReadAndChk(intFile) !CardNum if(.not.&L.NextExists)exit #16.CardNum = strInpLine !----- call ReadAndChk(intFile) !CardExpire label call ReadAndChk(intFile) !CardExpire if(.not.&L.NextExists)exit #7.CardExpire = strInpLine !----- call ReadAndChk(intFile) !Sex label call ReadAndChk(intFile) !Sex if(.not.&L.NextExists)exit #4.Sex = strInpLine !----- call ReadAndChk(intFile) !Age label call ReadAndChk(intFile) !Age if(.not.&L.NextExists)exit read(strInpLine,*,iostat=intIOerr)#S.Age if(intIOerr/=0)#S.Age=0 !----- call ReadAndChk(intFile) !TWUse label call ReadAndChk(intFile) !TWUse if(.not.&L.NextExists)exit #10.TWUse = strInpLine !----- call ReadAndChk(intFile) !HowFoundUs label call ReadAndChk(intFile) !HowFoundUs if(.not.&L.NextExists)exit #10.HowFoundUs = strInpLine !----- call ReadAndChk(intFile) !Referrer label call ReadAndChk(intFile) !Referrer if(.not.&L.NextExists)exit !----- call ReadAndChk(intFile) !Comment label call ReadAndChk(intFile) !Comment #255.Comment = strInpLine do call ReadAndChk(intFile) !Comment if(strInpLine(1:8)=="|Deliver")exit end do if(.not.&L.NextExists)exit !----- call ReadAndChk(intFile) !ShipName #35.ShipName = strInpLine call ReadAndChk(intFile) !ShipAddr1 #35.ShipAddr1 = strInpLine call ReadAndChk(intFile) !ShipAddr2 #35.ShipAddr2 = strInpLine call ReadAndChk(intFile) !ShipCityStateZip #35.ShipCityStateZip = strInpLine call ReadAndChk(intFile) !ShipCountry #35.ShipCountry = strInpLine if(.not.&L.NextExists)exit !----- call ReadAndChk(intFile) !Until |----- EndRecord do call ReadAndChk(intFile) !EndRecord if(strInpLine(1:16)=="|----- EndRecord")exit end do exit end do end subroutine ReadOrder !------------------------------------------------------------------------- subroutine ReadAndChk(intFile) integer:: intFile,intIOerr !----- read(intFile,'(A)',iostat=intIOerr)strInpLine &L.NextExists=intIOerr==0 if(&L.NextExists)then write(9,*)trim(strInpLine) else write(9,*)"End of file",intFile endif end subroutine ReadAndChk !--------------------------------END ADD----------------------------------