--- "James B. Byrne" <[log in to unmask]> wrote:
> This means that an STD (I just love that initialism!) store set
> actually consists of the HFS files /ACCT/GROUP/FILENAME((.([2-9]|[1-
> 9][0-9]+))?)? all of which I have to move to the repository. Now,
> my backup job file is a MPE file and uses MPE file naming
> conventions throughout. What I want to do is to parse the STORE
> filename descriptor (passed as a parameter via a system variable)
> and convert it into its HFS equivalent so that I can then do this:
>
> XEQ LS.HPBIN.SYS "-lpR <MPE filename in HFS form>*"
you can also use 'listfile' -- just 'reverse' your file-naming notation
(listfile /ACCT/GRP/FILENAME@). i'd recommend using ',6' on your
listfile to get just the file names. i'd also suggest routing your
listfile output to a file for manipulation for ftp....
> and this:
>
> FTP
> OPEN AAA.BBB.CCC.DDD
> USER ANONYMOUS
> BINARY
> PROMPT
> MPUT <MPE filename in HFS form>((.([2-9]|[1-9][0-9]+))?)?
> QUIT
(donna *strongly* recommends NOT putting passwords into ftp scripts!!
use secured (altsec) netrc files or better yet, get the latest ftp
patch to get netrc files that need execute-only access!!)
> So, is there a readily available means to transform an MPE file
> name into its HFS equivalent or do I have to write a parsing
> routine myself?
you should have this (perhaps in the posix udc file?) already but in
case you don't, here's the mpe2px script:
PARM mpename rtnvar=pxname
# Converts an MPE name to an absolute POSIX pathname and returns the
# POSIX name in the "rtnvar" argument. Syntax checking is done.
# Note: posix names are simply qualified.
# Required MPE5.5pp6 or later
setvar !rtnvar ""
if word(setvar(_mpe2_name,fsyntax("!mpename"))) = "ERROR" then
echo Invalid filename, error: ![word(_mpe2_name,,-1)]
elseif pos('$FILE',_mpe2_name) > 0 then
echo System-defined names cannot be converted to POSIX
elseif pos('FEQ',_mpe2_name) > 0 then
echo File equations cannot be converted to POSIX
elseif pos('LOCK',_mpe2_name) > 0 then
echo MPE names with lockwords cannot be converted to POSIX
elseif word(_mpe2_name) = "POSIX" then
# already a POSIX name, qualify and return
setvar !rtnvar fqualify("!mpename")
else
# straight MPE name, convert to POSIX and return
setvar !rtnvar
dirname(fqualify("!mpename"))+"/"+ups(word("!mpename","."))
endif
hth - d
Donna Garverick, HP-CSA Sr. System Programmer
dgarverick -at- longs -dot- com
925-210-6631 Longs Drug Stores
Come, my friends, 'Tis not too late to seek a newer world.
Tho' much is taken, much abides; and tho'
We are not now that strength which in old days
Moved earth and heaven, that which we are, we are.
"Ulysses", A. Tennyson
>>>MY opinions, not Longs Drug Stores'<<<
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
|