MIDRANGE dot COM Mailing List Archive



Home » MIDRANGE-L » May 2014

RE: Need to move all objects from lib A to lib B in batch mode with a replace option if the object already exists



fixed

John,

I have Python27 installed, but not yet configured.
I'm not comfortable changing the system locale and adding the system envvar, these changes could impact/break other apps.

12. Add the entry PYTHONHOME to the system environment variables
(Skip this step with release 2.3.3 or later! It's now superceded.)
ADDENVVAR ENVVAR(PYTHONHOME)
VALUE('/usr/python2.5') LEVEL(*SYS)
13. Change Your System "Locale" Information:
Change the system default:
CHGSYSVAL QLOCALE '/QSYS.LIB/NO_NO.LOCALE'
Change one user:
CHGUSRPRF username
LOCALE('/QSYS.LIB/NO_NO.LOCALE')
Change the current job:
ADDENVVAR ENVVAR(LANG)
VALUE('/QSYS.LIB/NO_NO.LOCALE')

Paul

-----Original Message-----
From: MIDRANGE-L [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of John Yeung
Sent: Tuesday, May 06, 2014 12:41 AM
To: Midrange Systems Technical Discussion
Subject: Re: Need to move all objects from lib A to lib B in batch mode with a replace option if the object already exists

On Mon, May 5, 2014 at 9:04 PM, Steinmetz, Paul <PSteinmetz@xxxxxxxxxx> wrote:
I'm going to take a closer look at Python, but I need to know how it
runs.

It comes with a *CMD object called PYTHON which, if you follow the instructions in the README, resides in library PYTHON27. So you can get an interactive Python session (somewhat like an interactive Rexx or STRSQL session) by issuing the command by itself:

PYTHON27/PYTHON

Or give it a script (in the form of an IFS stream file) to run:

PYTHON27/PYTHON '/my_script_dir/my_script.py'

You could wrap that up in a CLP or submit it directly:

SBMJOB JOB(MYJOB) CMD(PYTHON27/PYTHON '/my_script_dir/my_script.py')

The latest download and README as of this writing are here:

http://sourceforge.net/projects/iseriespython/files/Compiled/2.7/revE/

John Y.
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/midrange-l.






Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2014 by MIDRANGE dot 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 here. If you have questions about this, please contact