HP3000-L Archives

August 1999, Week 2

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:
Reply To:
Date:
Fri, 13 Aug 1999 08:35:12 -0600
Content-Type:
text/plain
Parts/Attachments:
BDY.TXT (78 lines)
Jim,
  If you can modify the program actually setting the file equation, you could
also have it do a SETVAR actualdev "xxxx" and query this variable in the other
program.

  If you want an excuse to play with some of the posix tools, you could do
something like:

RUN SH.HPBIN.SYS
export shvar=\
`callci "LISTEQ" | \
 grep "SYSTEMLP" | \
 awk -F= '{print $2}'| \
 awk -F\, '{print $1}'`
callci "SETVAR ACTUAL_DEV \"$shvar\" "
exit


This returns ACTUAL_DEV="LP" from the original file equation:

FILE SYSTEMLP;DEV=LP,1

You may have to tweak the awk's: The first one returns everything
after the first "=" (assuming there isn't a second)"LP,1"

The second returns everything before the first "," or "LP".

Hope this isn't overkill.

RAT

_______________________________________________________________________
 Rich Trapp "RAT"
 Managed Business Solutions   [log in to unmask]   http://www.mbsnav.com
 Assigned to: TMO Design Automation Support at HP Loveland, CO
 (Telnet) or (970) 679-2221   [log in to unmask]
_______________________________________________________________________


-----Original Message-----
From: [log in to unmask]
[mailto:[log in to unmask]]
Sent: Friday, August 13, 1999 7:38 AM
To: [log in to unmask]
Cc: [log in to unmask]
Subject: FFILEINFO and Device Number


I have a program that sets all kind of file equations for an application.
Other (sub)programs are then called and they use these files that were
equated to various files and/or printers.  I need a way to find out
which printer (actually, I want the device from the "DEV=" clause on
the file equation) the file was equated to in the main program from
one of the subprograms or from a child process.  I think FFILEINFO
will give me what I want, but I'm not sure how to get it.

FFILEINFO ITEMNUM 6 returns the Logical Device Number, but for spooled
files, "the LDEV is a virtual device number that does not correspond
to the system configuration I/O device list", so I don't think that
will work.

FFILEINFO ITEMNUM 50 returns the "Real device number of the file",
whatever that is.  Could this be what I want?

As always, any advice or help is appreciated.  BTW, I want the printer
device number because we just got network printing up and running for
our LJ4050N's (way cool!  Thanks, HP!) and we can "compress" the
printing from 6 LPI to 8 LPI, so these printers can have more lines
per page than the standard impact-type line printers.  So I would
like to be able to "sense" the printer being used and adjust the
page length accordingly.


Jim Phillips                            Manager of Information Systems
Voice: (330) 527-2124                   Therm-O-Link, Inc.
  Fax: (330) 527-2123                   PO Box 285; 10513 Freedom St.
Email: [log in to unmask]       Garrettsville, Ohio  44231

ATOM RSS1 RSS2