HP3000-L Archives

June 2012, 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:
"Legault, Raymond D" <[log in to unmask]>
Reply To:
Legault, Raymond D
Date:
Thu, 7 Jun 2012 05:12:08 -0700
Content-Type:
text/plain
Parts/Attachments:
text/plain (106 lines)
USER DEFINED COMMAND FILE:  REPLACEF.CMDFILE.SYS

parm oldfile=" " , newfile=" " , savefile=" "
if not finfo("!oldfile",0)  or not finfo("!newfile",0) then
echo
echo REPLACEF oldfile, newfile [,saveoldfile]
echo
echo oldfile is the file to be replaced (purged)
echo
echo newfile is the file which will replace the oldfile.
echo
echo saveoldfile is a copy of the oldfile.[Must not exist.]
echo
echo This cmdfile uses the POSIX based tools to rename an
echo active program file, a program file that is being used.
echo The next person to run the program will get the new
echo version.
echo The feature has been implemented as of 5.0 .
echo
echo Check jcw Replacef 1=failed, 0=success    *error
echo
setjcw replacef ,1
setjcw replacef ,1
if not finfo("!oldfile",0)   then
echo       Old File:!oldfile does not exist...*error
endif
if not finfo("!newfile",0) then
echo       New File:!newfile does not exist...*error
endif
echo
else
setvar new finfo("!newfile",38)
setvar old finfo("!oldfile",38)
setvar go true
if "!savefile" <> " " then
fga !savefile
setvar save ups("/!fileaccount/!filegroup/!filefilename")
if finfo("!save",0) then
echo
echo !save exists.... please purge or rename.
echo  Command aborted.
setvar go false
endif
if go
echo cp.hpbin.sys "!old !save"
cp.hpbin.sys "!old !save"
setjcw replacef ,0
deletevar save
endif
endif
if finfo("!oldfile",0) and finfo("!newfile",0) and go
echo mv.hpbin.sys "-f !new !old"
mv.hpbin.sys "-f !new !old"
endif
deletevar old,new
endif

Ray 

-----Original Message-----
From: Michael [mailto:[log in to unmask]] 
Sent: Wednesday, June 06, 2012 11:57 AM
Subject: Re: posix mv problem

Read through this thread real quick, didn't see anyone say anything about HPPATH.

I always add "HPBIN.SYS" to the HPPATH variable, then from MPE
(CI.PUB.SYS) you can type MV or mv, and pass the parms as mentioned in quotes.

:MV "/fromfile ./tofile"

Similar to RENAME without the RENAME requirements.

--
Mike.


On 06/05/2012 12:11 PM, Keven Miller wrote:
> ok - I'll add my observations since not mentioned yet.
> I note that the subfolder changes, not the filename.
>    edi_in     to      edi_processed
>
> Could the error be due to some security trying to go to edi_processed?
>
> Keven Miller
>
> ----- Original Message ----- From: "John Pitman" <[log in to unmask]>
> To: <[log in to unmask]>
> Sent: Tuesday, June 05, 2012 12:44 AM
> Subject: [HP3000-L] posix mv problem
>
>
> Having trouble getting a programmatic mv to work....
>
> run sh.hpbin.sys;info='mv /STOCK2K/ASP/edi_in/fsfile3 
> /STOCK2K/ASP/edi_processed/fsfile3';
>
> * To join/leave the list, search archives, change list settings, *
> * etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

ATOM RSS1 RSS2