Here's how I convert dev & Inode to filename in LIST.READU.
I regularly run ACCOUNT.FILE.STATS which writes to STAT.FILE where I put an index on a concatenation <7> & <8>: FILEDEV: '.': FILEINODE[10].
Then a wrapper around LIST.READU converts the device & Inode columns to a filename.
LOOP WHILE MORE
LINE = REMOVE( LRDU, MORE )
TRIMMED = TRIM( LINE )
DEV = TRIMMED[ ' ', 1, 1 ]
INODE = TRIMMED[ ' ', 2, 1 ]
IF LEN( DEV ) ! LEN( INODE ) THEN
SELECTINDEX 'DEV.INODE', (DEV: '.': INODE[10]) FROM F.STAT TO 9
READNEXT STAT.ID FROM 9 THEN
READV FILENAME FROM F.STAT, STAT.ID, 1 THEN
LINE[1,31] = FILENAME '31.L#31'
E.g.:
1922279711 1125899906975007 0 -19 61 RU 3376 CALIX
becomes
QM.CONTROL..................... 0 -19 61 RU 3376 CALIX
(I don't care about account or path, but those are in STAT.FILE record, too.
UV11.4. It will need tweaking at 12.2.
I was going to mention FILE.STAT has the modulo, etc., so Mark's calculation could be rolled into this, too, but that isn't going to work at uv12+)
------------------------------
Chuck Stevenson
DBA / SW Developer
Pomeroy
US
------------------------------
Original Message:
Sent: 10-02-2024 11:48
From: Mark Baldridge
Subject: How to gauge progress of a large SELECT statement in BASIC pgm
Take the modulo times the group size and convert to hex. This is the last group address of the file. Find the inode of the file with 'SH -c "ls -li" ' or the STATUS statement in field 10. You know the WHO number of the SELECT process. LIST.READU EVERY will return Device, Inode, Group Address, and Who with the RD group lock.
The reported hexadecimal group address divided by the calculated last group address will provide the percent of the file selected and answer the remaining amount needed to do.
------------------------------
Mark A Baldridge
Principal Consultant
Thought Mirror
Nacogdoches, Texas United States
Original Message:
Sent: 10-01-2024 08:29
From: Nelson Schroth
Subject: How to gauge progress of a large SELECT statement in BASIC pgm
Hello all,
I have a program that analyzes data from a 6.8M record file that does not have an index.
Is there any way to report on the progress of the EXECUTE, as it may take 20mins or more to run?
Nelson
------------------------------
Nelson Schroth
president
C3CompleteShop LLC
Harrison OH US
------------------------------