Hi All,
do we have any SQL query to find the no of lines in a IFS stream file?
do we have any SQL query to find the no of lines in a IFS stream file?
STRQSH CMD('wc -l myfile.txt')
Select Count(*) from Table(SysTools.Split(Qsys2.Get_Clob_From_File('/Home/YourDir/YourIFSFile.txt'), x'0D25')) x;
values( case when Get_Clob_From_File('/Home/SPEED#J/linestest.txt') = '' then 0 else regexp_count(Get_Clob_From_File('/Home/SPEED#J/linestest.txt'),'\n') + 1 end )
Set Option Commit=*CHG;
select x.* from table(qsys2.GET_BLOB_FROM_FILE('/home/ctm/CMAGENT700/DAILYLOG/ctmag_20200702.log',1)) as x;
Set Option Commit=*NONE;
values(qsys2.GET_BLOB_FROM_FILE('/home/ctm/CMAGENT700/DAILYLOG/ctmag_20200702.log',1);
select * from table(values(qsys2.GET_BLOB_FROM_FILE('/home/ctm/CMAGENT700/DAILYLOG/ctmag_20200702.log',1))) as blobTable (blobCol);
Comment