Hi.
If you are really desperate for this, you could use the HPDEBUG
intrinsic to output the results of the LOADINFO command into a temporary
file, and then read off the xl filenames. The following is a Quick&Dirty
SPLash demo example, but is of course easily do-able in COBOL, Pascal etc.
Regards, Tad.
$subprogram,splashext
BEGIN
Integer Procedure MYXLLIST(xllist); byte array xllist;
Begin
Double HPstatus,NoBanner:=0,fno32:=0;
Integer i,reclen,fno16=fno32+1,xlcount=MYXLLIST;
Byte array strg(0:255):=256(0);
Intrinsic HPFOPEN,HPERRMSG,FCLOSE,FREAD,HPDEBUG,PRINT;
{ Purge existing temp file }
move strg:="%xlpath,oldtemp;acc=in%";
HPFOPEN(fno32,hpstatus,52,strg);
if fno32<>0
then FCLOSE (fno16,4,0);
{ Open new temp file }
move strg:="%xlpath,new;temp;acc=out;rec=-256,1,v,ascii;disc=16%";
HPFOPEN(fno32,hpstatus,52,strg);
{ Call HPDEBUG to generate loader info }
move strg:="%LOADINFO;C%";
HPDEBUG(hpstatus,strg,1,fno32,2,NoBanner);
FCLOSE(fno16,2,0);
{ Reopen the tempfile for input}
move strg:="%xlpath,oldtemp;acc=in%";
HPFOPEN(fno32,hpstatus,52,strg);
{ Pick off the user XL file names }
xlcount:=i:=0;
While (reclen:=FREAD(stdin,strg,-255)) > 0
do if strg(0)="nm USER"
then if strg(9)<>"XL.PUB.SYS "
then begin
i:=i+(move xllist(i):=strg(9),(scan strg(9) until " "));
i:=i+(move xllist(i):=",");
xlcount:=xlcount+1; {return no of XLs found}
end;
xllist(if i>0 then i-1 else i):=0; {plant null terminator}
FCLOSE(fno16,0,0);
End;
END.
|