[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



Not true on Windows '95, at least...

> ----------
> From:         Allan Geetter[SMTP:geetter@MAIL.HARTFORD.EDU]
> Sent:         Thursday, August 27, 1998 1:53 PM
> To:   Multiple recipients of list SQR-USERS
> Subject:      Re: Problem Opening a File in SQR
> 
> <<File: vcard.vcf>>
> I believe you need to have quote marks around the file identifier. 
> Statement should look like the following: 
>         OPEN 'c:\tst.txt' as 1 ... 
> Thus, you have to use  -  Let $d_file_location = '''' || 'c:\tst.txt'
> || '''' 
> 
> Allan Geetter 
> University of Hartford 
> 
> Srinivasan S wrote: 
> 
>       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.
> 
>