|
Ok I am just going with using the system API and the MOV command. Itnot
works. I was just hoping to find the API / Program behind the command
so I would not be adding that additional workload. Guess it just is
worth the effort as all the APIs I have found don't seem to movebetween
servers.be
Chris Bipes
Director of Information Services
CrossCheck, Inc.
-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Scott Klement
Sent: Thursday, November 12, 2009 11:54 AM
To: Midrange Systems Technical Discussion
Subject: Re: opendir() - THE ANSWER
Vern,
This is a bad idea. The programs in the QSHELL library are meant to
used inside the QShell environment.the
There are all sorts of things that are set up in that environment...
this includes the standard I/O streams being set up a particular way,
certain environment variables being set up a particular way, certain
descriptor set up, the services of a shell and all of the stuff that
all
shell does for you, being spawned a separate child job, etc.
These programs are written with the expectation that they will have
of that stuff set up. If you call the programs directly, you areusing
them in a manner that they weren't intended to be used!
If they happen to work because they don't happen to require the QShell
environment right now... well, okay, I guess they'll work then. Butyou
can't rely on that being the case going forward. Your app may work
today, then you might do a release upgrade or install a PTF and it may
stop working.of
It's just not a good idea to use software in a manner that it wasn't
intended for!
If you're really THAT hard-up for a MV utility, you'd be better off
finding an open source one and taking the relevant pieces of code out
here.
it so you can use it on i.
But I really don't see the value in calling the QShell MV command
why not just use the CL MOV command? That'll be more efficient than
the Qshell variety, and you'll be using it from the interface it wasbind
deisgned for.
Just write a simple little wrapper program like this:
PGM PARM(&FROM &TO)
DCL VAR(&FROM) TYPE(*CHAR) LEN(500)
DCL VAR(&TO) TYPE(*CHAR) LEN(500)
MOV OBJ(&FROM) TOOBJ(&TO)
ENDPGM
Compile that as a CL program (or if you prefer, as a CL module and
it to your RPG) then you can call it willy-nilly.it
Vern Hamberg wrote:
Every command in QShell is a symbolic link to a program - thoseprograms
handle parameters the way a C program does - in my experience. Thereis
a MV command in QShell, and its program is QSHELL/MV. This is anexample
of using it that does just what you want -
call QSHELL/MV ('/home/vern/aab.txt' '/home/aab.txt')
Scott, here's a chance for another article!!
I figured this out about 6 years ago and had forgot it. If you want
customers,
not to prompt when replacing, add a parameter with value '-f'.directory
Whoopee!!
Vern
Chris Bipes wrote:
Not so crazy.. But how to write records to a iSeries Database from
within that shell script? Then make it wake up an process the
until empty every few minutes. We receive images from our
databasecurrentlythousands a day, and move them from our FTP and WEB servers,
weto a windows 2003 server. Our problem has been finding images when
have too many files in one directory. This is why we are building a
database as the images come in, move them to our NAS which we have
mounted an empty IFS directory over. Then we can search the
to
find the image and know exactly where it is.
Chris Bipes
Director of Information Services
CrossCheck, Inc.
-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Vern Hamberg
Sent: Thursday, November 12, 2009 9:24 AM
To: Midrange Systems Technical Discussion
Subject: Re: opendir()
Chris
Here's a crazy idea - write a shell script and run it in PASE!
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.