At 6:38 PM -0500 8/30/99, [log in to unmask] wrote:
>> USER DEFINED COMMAND FILE: WHEREIS.CF.SYS
>>
>> anyparm ARG=!hpaccount
>> setvar cnt 0
>> if lft(hpstdin,2)="$S"
>> showjob > stdlist
>> whereis !ARG < stdlist
>> return
>> endif
>> setvar n finfo(hpstdin,"eof")
>> while setvar (n,n-1) > 0
>> if lft(setvar(buf,input()),1)='#'
>> if setvar (pos, pos(ups("!arg"),buf)) > 0
>> echo !buf
>> endif
>> endif
One small improvement: if you change "whereis" in line 5 of the command to
"!hpfile", then the command file can be called anything. In other words,
you don't have to hard code the name of the file within itself.
Barry Lake [log in to unmask]
Allegro Consultants, Inc. www.allegro.com
(408)252-2330