Here is a short version.

begin;
 set file="pipedelim.txt"
 open file:"R"  ;open with read only so I don't mess it up
 set $ztrap="eof"  ;set error trap to catch end of file error
 for  do
 . use file read record
 . use $p w !,record,!
 . for i=1:1:$length(record,"|") d
 . . w $piece(record,"|",i)_" "   ;
eof    ;
 s $ztrap=""
 c file
 q

Mark

"SK" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi,
>
> I need to open and read a flat pipe delimited file into a variable in
> Cache/M. Can someone please help me out with this? I know how to open a
> file, but not how to read it's contents.
>
> Thanks in advance.
>
> Sk.
>
>
>
>



Reply via email to