Besides the problem that you found, if you have a file equation to a
printer, the device name returned would end up being DISC and you
probably want the device name of the printer. I played with this for a
while but couldn't find anything other that the brute force method.
John Zoltak
North American Mfg
> -----Original Message-----
> From: Therm-O-Link [SMTP:[log in to unmask]]
> Sent: Friday, March 27, 1998 9:06 AM
> To: [log in to unmask]
> Subject: [HP3000-L] Get Device Name Programmatically
>
> Ken Vickers reminded me of the FLABELINFO intrinsic (actually
> he informed me of it, since you can't be reminded of what you
> didn't know!). Anyway, I tried this intrinsic, but it doesn't
> work when used for files that are in the process of being
> created. That is, it works fine against permanent disk files
> (and by extension, I assume it works for temp files as well),
> but absolutely will not work (well, I can't find a way to
> make it work) when using a file that is being created as the
> program runs. The COBOL source I used to test this follows.
>
> When I first tried it without an OPEN statement, I received
> FSERROR 54 (Invalid File Reference). Adding an OPEN of the
> file did not change that. When I changed the FORMALDESIG to
> be and existing file, it worked fine. When I changed the
> FORMALDESIG to be OUTPUT.JKP.CUSTOM, it failed with FSERROR
> 52 (Nonexistent Permanent File). Adding an "*" to the
> FORMALDESIG to force it to backreference the file equation
> didn't help either.
>
> I guess there's nothing for it, but to use a LISTEQ command
> and parse the output of it. FWIW, I agree that it would be
> nice to have an intrinsic to provide this information.
>
> Jim Phillips Manager of Information Systems
> E-Mail: [log in to unmask] Therm-O-Link, Inc.
> Phone: (330) 527-2124 P. O. Box 285
> Fax: (330) 527-2123 Garrettsville, Ohio 44231
<program snipped>
|