HP3000-L Archives

October 1996, Week 4

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Tad Bochan <[log in to unmask]>
Reply To:
Tad Bochan <[log in to unmask]>
Date:
Wed, 23 Oct 1996 16:03:08 -0400
Content-Type:
Text/Plain
Parts/Attachments:
Text/Plain (49 lines)
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.

ATOM RSS1 RSS2