How to get the row count of a PF with RPG ILE?
210 pts.
0
Q:
How to get the row count of a PF with RPG ILE?
Hello, I'm looking for an example of how to get a row count of a PF from a ILE rpg program. Thanks everybody.
ASKED: Dec 10 2008  2:10 AM GMT
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
0
24570 pts.
0
A:
 RATE THIS ANSWER
0
Click to Vote:
  •   0
  •  0
  • AddThis Social Bookmark Button
Hi,

You could use embedded SQL to retrieve a row count :-

C/EXEC SQL
C+ SELECT COUNT(*) FROM YOURFILE INTO :COUNT
C/END-EXEC

Regards,

Martin Gilbert.

The file information data structure positions 156-159 Binary - Number of records in file when it was opened. Add to the 'F' spec INFDS(MyDSName)

and d specs
D MyDSName DS
D OrigNumRec 156 159B 0

Phil
Last Answered: Dec 10 2008  7:43 PM GMT by Philpl1jb   24570 pts.
Latest Contributors: Gilly400   23625 pts.
0
0
Discuss This Answer:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _



0