HP3000-L Archives

December 2000, Week 1

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:
Donna Garverick <[log in to unmask]>
Reply To:
Donna Garverick <[log in to unmask]>
Date:
Wed, 6 Dec 2000 10:49:02 -0800
Content-Type:
text/plain
Parts/Attachments:
text/plain (80 lines)
"Simonsen, Larry" wrote:

> Is there any way of having the ci execute a script in the HFS?  I.e.
> ./createjobq named file?

absolutely! :-)

in my quest to do away with udc's (yeah, i have no life and i *like* awful
headaches....), i've already travelled down this road.  there are a couple of
tricky 'turns'....

 - in order to create a 'natural', udc-ish feel for long command file name, you
want to include the group that the command files live in hppath with hfs
notation.  for example,
HPPATH = /SYS/SYSCMD/,syscmd.sys,PUB,pub,pub.sys,cmd.sys,arpa.sys,hpbin.sys

the plain ol' mpe group syscmd is where i 'disassembled' our operator's
atrocious udc.

 - but now you've got the issue of capitalization.  you may have noticed, i like
to use lower case :-).  the operators do everything in upper case.  i certainly
don't want to have two files to handle one former long-named udc.  what do to?
newlink! :-)  and to make life a bit easier, i wrote this command file....it
guarantees that for the long-named files, there's a symbolic link.  the 'real'
file name is in all caps, the link is all lowercase.

parm entry=main
if "!entry" = "main"
# only want manager.sys running this script...
  if hpaccount = "SYS" and hpuser = "MANAGER"
    file mklink;rec=-80,,f,ascii;temp
    if finfo("*mklink","exists")
      purge mklink,temp
    endif
    listfile ../SYSCMD/,6>*mklink
    setvar _ml_eof finfo("*mklink","eof")
    xeq !hpfile process <*mklink
    deletevar _ml_@
    reset mklink
    purge mklink,temp
  endif
elseif "!entry" = "process"
  while setvar(_ml_eof,_ml_eof-1) >= 0
    input _ml_rec
    setvar _ml_rec  rtrim(_ml_rec)
    setvar _ml_file  word(_ml_rec,"/",4)
    setvar _ml_dir  xword(_ml_rec,"/",4)+"/"
# long file name
    if len(_ml_file)>8
# file is not a symbolic link file
      if finfo(_ml_rec,"filetype") <> "SYMLINK"
# does a down-shifted version exist?
        if finfo((_ml_dir+dwns(_ml_file)),"exists")
# is it a link file
          if finfo((_ml_dir+dwns(_ml_file)),"filetype") = "SYMLINK"
            echo The link file for !_ml_file already exists
          else
            echo The file type for the link file for !_ml_file is wrong
          endif
        else
          echo No link file exists for !_ml_file
          continue
          newlink ![_ml_dir+dwns(_ml_file)],!_ml_rec
        endif
      endif
    endif
  endwhile
endif


--
Donna Garverick     Sr. System Programmer
925-210-6631        [log in to unmask]

"Unix _is_ user friendly.
It's just very selective about who its friends are.
And sometimes even best friends have fights."

>>>MY opinions, not Longs Drug Stores'<<<

ATOM RSS1 RSS2