
Originally Posted by
joax_27
Can anyone help me to read file in Unix using SQR.
I have write a pseducode for this:
Begin-Procedure Read-File
LET $file_name ='/data/logs/' || $file_name
Let #file_status = exists($file_name)
If #file_status<>0
STOP QUIET
End-If
Open $file_name as 1
For-Reading
Record=100:Vary
STATUS=#Read-Status
If #Read-Status=-1
STOP QUIET
End-If
Let #flag = 0
While 1=1
Read 1 into $myString:100
If #end-File = 1
Break
End-If
LET $myString = uppercase $myString
If $myString Like '%SEVERE ERROR%'
Let #flag=1
End-If
End-While
Close 1
End-Procedure Read-File
I am quite skeptical on this one, coz Windows and Unix uses a different file system.