Page 1 of 1

meaning of the variable line in the definition of sfl

Posted: Wed Nov 13, 2019 6:57 am
by CAPL_INFO
Hi,

I don't inderstand the meaning of the variable line XLG in the definition of sfl

Code: Select all

     FTRA008E   CF   E             WORKSTN INFDS(CURSEU)
     F                                     sfile(TRA008SF1:XLG)
i thought it represented the sfl row number !
But this number varying in time !

how can i retrieve the number of rows in a sfl in rpgle ?

Thanks.

Re: meaning of the variable line in the definition of sfl

Posted: Sun Nov 17, 2019 11:14 pm
by Scott Klement
It is the row number. ("relative record number") For example, when you do READ or READC against the subfile, this will be set to the row that you have retrieved.

The only way that I know of to retrieve the number of rows is to read them all and count them. Or, better, count them when you load the subfile, and keep the count in a variable.