[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

Re: Problem Opening a File in SQR



HI SRINI

OPEN 'C:\FILENAME.SQR' AS 1 FOR-READING RECORD=10:VARY

TRY THIS ABOVE IT SHOULD WORK. GIVE VARY INSTEAD OF
FIXED, BECAUSE YOU MAY BE HAVING SPACES IN BETWEEN
THE LINES WHICH ALSO COUNTS WHEN IT STARTS READING
THE FILE.


PRADEEP







---Jeff Hill <jhill@AGCONSULT.COM> wrote:
>
> Try checking the #Open1 variable = 0 instead of != 0
>
>
>
>
> Srinivasan S <srinivasan.seetharaman@DB.COM> on
08/27/98 08:19:31 AM
>
> Please respond to SQR-USERS@USA.NET
>
> To:   Multiple recipients of list SQR-USERS
<SQR-USERS@list.iex.net>
> cc:    (bcc: Jeffrey Hill/Application Group)
> Subject:  Re: Problem Opening a File in SQR
>
>
>
>
> Hi,
>      Thankx a lot for the info. I changed it even
then it is giving the
> same error.This is what i gave :
>
>
!******************************************************
>      OPEN $d_file_Location as 1
>      FOR-READING
>      RECORD=10:fixed
>      STATUS=#Open1
>
> if #Open1 != 0
>
>
!******************************************************
>
> Could u tell me what the problem now .
>
> bye,
>
> Srini.
> ---------------------- Forwarded by Srinivasan
Seetharaman/DSI/DBAsia/DeuBa
> on 08/27/98 08:49 PM ---------------------------
>
>
> peterb@sqribe.com on 08/27/98 08:49:24 PM
>
> Please respond to peterb@sqribe.com
>
> To:   Srinivasan Seetharaman/DSI/DBAsia/DeuBa
> cc:
> Subject:  Re: Problem Opening a File in SQR
>
>
>
>
> Seetharaman,
> Change: if #filestat
> To: if #Open1
> Peter
> On 27 Aug 98, at 20:30, Srinivasan S wrote:
> Date sent:          Thu, 27 Aug 1998 20:30:49 +0530
> Send reply to:      SQR-USERS@USA.NET
> From:               Srinivasan S
<srinivasan.seetharaman@DB.COM>
> Subject:            Problem Opening a File in SQR
> Originally to:      SQR-USERS@usa.net
> To:                 Multiple recipients of list
SQR-USERS
> <SQR-USERS@list.iex.net>
> > Hi all,
> >      I have a text file , and i'm trying to open
the file in SQR, but it
> is
> > always failing.The SQR statement is as follows :
> >
!*******************************************************
> >  Let $d_file_location = 'c:\tst.txt'
> >      OPEN $d_file_Location as 1
> >      FOR-READING
> >      RECORD=10:fixed
> >      STATUS=#Open1
> > if #filestat != 0
> >  read 1 into $emplid:10 status=#read_stat
> >  if #read_stat != 0
> >   print $emplid (+1,1)
> >   print $name (+1,1)
> >   print  'No Error Reading ' (+1,1)
> >  else
> >   print 'Error Reading ' (+1,1)
> >  end-if
> > else
> >  print 'Error Opening' (+1,1)
> > end-if
> >
> >
!*******************************************************
> > The above code will always print 'Error Opening'
. The text file is in
> the
> > specified path. And this is what it contains :
> >
> > 0000000001
> > 0000000002
> > 0000000003
> >
> > Could anyone tell me where i went wrong.
> >
> > Thankx in Advance,
> >
> > Srini.
> >
>

_________________________________________________________
DO YOU YAHOO!?
Get your free @yahoo.com address at http://mail.yahoo.com