how to get no of records in file in rpg with out cl cmd

Answers were Sorted based on User's Feedback



how to get no of records in file in rpg with out cl cmd..

Answer / shobhit

With the help of INFDS(File information data structure) we
can know the no of records in file.

Ex.
D NUM_RCDS 156 159I O * Num of records

Is This Answer Correct ?    44 Yes 0 No

how to get no of records in file in rpg with out cl cmd..

Answer / shobhit

Read the file from beginning and increase the counter by
one till end of file. At the last the counter value will be
the no of records in file.

Is This Answer Correct ?    5 Yes 15 No

Post New Answer

More IBM AS400 AllOther Interview Questions

is it there an easy way to determine if an html section is available to issue a wrtsection upon?

0 Answers   IBM,


what are the uses of factor1, factor2 and result field for the rpg operation code parm?

0 Answers   IBM,


What Is The Difference Between Goto & Exsr?

0 Answers   IBM,


What Is The Object Type Of Pf, Lf, Printer File & Display File?

0 Answers   IBM,


Define a Batch Job?

1 Answers  






How can we find from which source the program has been compiled for a given RPGLE program object?

5 Answers  


i have recently moved to hyd. i would like to know which is the best institue to learn AS400. are there any in ameerpet? thanks.

4 Answers  


Hi Friends, I need immediately answer for this: Senario is that,I am selecting records from the display and window subfile on the basis of Reason Code and some more fields but spool file not showing the same records which i have selected by display and window subfile. Q.What could be the causes(resons)to not show records properly (just selected in the display file and Window subfile)according the selection criteria of the records. Q.What would be the solutions to show records properly in the spool file just as selected in in the display file and window subfile according to the selection criteria.

1 Answers   IBM,


What is the purpose of OPNQRYF (Open Query File)?

1 Answers  


(1)In Cl Program,Are PGM and ENDPGM mandatery Keywords or not .If yes, please tell me why these keywords is necessary. (2)If we will not define these two keywords (PGMand ENDPGM) then any error will be come or not.

5 Answers   FIS, IBM, Virtusa,


what is default data type for the fields(sub fields) defined in data structures in rpg?

2 Answers   IBM,


What are the valid user defined data area types?

1 Answers  


Categories