× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



On Wed, 11 Feb 2004 pnelson@xxxxxxxxxx wrote:

> Everything is set to go on the Oracle box side, and commands entered thru
> QSH actually worked as expected. The Unix programmer wants to build a
> script to be able to automate the process.

So it looks like things are working and ready to go, you just want a QSH
script to do them all for you.  If that is the case then you're all set.
QSH scripting is just like UNIX scripting.  Just put all the commands you
want to run in a file somewhere and then run the file.  For example, make
a text file using your text editor of choice with the following lines in
it:

#!/bin/sh
OLDDIR=`pwd`
NEWDIR='/home'
echo 'Changing to directory' $NEWDIR
cd $NEWDIR
pwd
ls
echo 'Changing back to directory' $OLDDIR
cd $OLDDIR
pwd
ls

Save this file as test.sh and put it on your as/400 in a directory like
/tmp.  Then make it executable by starting up QSH and doing:

chmod u+x /tmp/test.sh

Then execute the script:

/tmp/test.sh

You should see some nice output about it changing directories and some
lovely file listings.

Of you will want to make a file (script) that has the commands you use
from QSH to do your job.  Anything you type in QSH can be put in a script
and run.

James Rich

"As for security, being lectured by Microsoft is like receiving wise words
on the subject of compassion from Stalin."
      -- mormop on lwn.net

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.