Satya the OSOPEN command.. what version of the system are you running?
-----Original Message----- From: George Gallen <[email protected]> To: U2 Users List <[email protected]> Sent: Tue, May 7, 2013 6:17 am Subject: Re: [U2] Illegal use of the file, select, cursor, BCI, Socket, HTTP, XML, SCTX , MQS, SOAP or database variable. I usually: OPENPATH "directory of file" to temp_filedir else STOP "CAN NOT OPEN directory" READ FDATA FROM temp_filedir,"filename" ELSE STOP "CAN NOT READ filedir" But creating a VOC file entry: 0001: F 0002: directory of file 0003: D_BP Also works. If you get errors opening the file (esp on unix), it is most like a unix user Permissions issue. George -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of dale kelley Sent: Tuesday, May 07, 2013 7:37 AM To: U2 Users List Subject: Re: [U2] Illegal use of the file, select, cursor, BCI, Socket, HTTP, XML, SCTX , MQS, SOAP or database variable. Hi back, Here's what I usually do. I create a file record in the voc pointing to that directory and give it D_BP as a dictionary. If that VOC record is named TEMP.FILE; I can then open it in a program and read TEMP.FILE1 as a record from that file. Then every flat file record is a field in your U2 record. Fixed length you have to count, space or other delimiter I use the FIELD within a FOR/NEXT. Dale On 05/07/2013 01:37 AM, Sathya wrote: > Hi all,.. > > Im getting the below error while running my code,..Can someone please help > me with this issue? > > Illegal use of the file, select, cursor, BCI, Socket, HTTP, XML, SCTX ,MQS, > SOAP or database variable. > > Code snippet : > > OSOPEN TEMP.FILE1 TO temp_file1 ELSE STOP "CAN Not find file" > > READ DATA FROM temp_file1 ELSE STOP "Can not find temp filename" > > Where TEMP.FILE1 is something like "Filepath/filename.txt". Its a text file > in the server and I want to read the contents and do some comparison. > > TIA, > Sathya V. > > _______________________________________________ > U2-Users mailing list > [email protected] > http://listserver.u2ug.org/mailman/listinfo/u2-users _______________________________________________ U2-Users mailing list [email protected] http://listserver.u2ug.org/mailman/listinfo/u2-users _______________________________________________ U2-Users mailing list [email protected] http://listserver.u2ug.org/mailman/listinfo/u2-users _______________________________________________ U2-Users mailing list [email protected] http://listserver.u2ug.org/mailman/listinfo/u2-users
