Listing files inside PL without prolib

Gerco

New Member
I would like to list the files inside a PL file from 4GL code, unfortunatly OS-DIR() won't do much good for me here.

What I have inside my PL:
Code:
update/
43000/
	001.p
	002.p
43010/
	001.p
	002.p

These are programs to be automatically run when a new version of the software is installed, I don't want to hardcode the names or the versions, so I'd like to be able to list the 43000 and 43010 directories, the files within I can find using search.

Currently, incrementing the version by 1 and searching for the first file in the version directory takes just about forever, so I'd like a faster way of doing the same.
 
There are two ways.

You can write yourself a procedure that will read the PL. This wouldn't be that difficult but you would first have to discover the PL format. I did this a few years ago but I can't remember now. But I do know that it isn't a complex structure. There's a header section consisting of a series of offsets to the location of each file in the library.

You can list of the PL by calling PROLIB through OS-COMMAND. If necessary, use a batch file to redirect output from PROLIB into a text file. Your procedure can then read the contents of that text file and process the results. This is probably the easier option.
 
Back
Top