How to upload source member to the 400
![]() |
Cette page
a été mise à jour le
10 décembre 2009.
Contact ![]() |
![]() |
Versionning
My RPG tools use some /COPY or /INCLUDE. They are all downloadables here : COPY used in my tools
to upload to your system, you just have to :
On the IBMi, create an empty save file : CRTSAVF QGPL/JPLTOOLS
On your PC:
start FTP (start / execute / cmd)
start FTP and run this script :
C:\Documents and Settings\User>ftp |
Take care of authority : DSPSAVF qgpl/jpltools will say you
the name of the saved library : when I wrote this it's LAMONTRE1 owner of the objects : : when I wrote this it's LAMONTRErestore the SAVF :
CRTLIB LIB(JPLTOOLS) TEXT(WWW.JPLAMONTRE.FREE.FR)
RSTOBJ OBJ(*ALL)
SAVLIB(LAMONTRE1)
DEV(*SAVF)
SAVF(JPL/JPLTOOLS)
ALWOBJDIF(*OWNER)
RSTLIB(JPLTOOLS)Apply your security rules, for example
CHGOWN OBJ('/qsys.lib/jpltools.lib') NEWOWN(LAMONTRE) SUBTREE(*ALL)
And take care to CCSID. This toolbox is by default in American CCSID (IE EBCDIC 37)
This is particularly true fior the source file.
To be able to read, modify or compile any program, I HIGHLY recommand
to setup your job to the American context IE
DSPJOB
2. Display job definition attributes
then on third page:
Language identifier . . . . . . . . . . . . . . . : ENU
Country or region identifier . . . . . . . . . . : US
Coded character set identifier . . . . . . . . . : 37
Default coded character set identifier . . . . . : 37
Character identifier control . . . . . . . . . . : *JOBCCSID
Change your job acording to these values
You have code400 installed in your computer
You have the as400 or iSeries or SystemI5 disk shared, ie you can see it with the windows explorer
You have iSeriesNavigator
Neither shared disk nor iSeries Navigator :
With ftp
|
It is possible to script the FTP run to transfert many files at the same time. But as I have a shared I5 directory, I uses drag & drop. I don't provide FTP scripts
there is 2 naming conventions to get or put files on the I5, the QSYS naming and the IFS naming
When you type CD QGPL, you are using the QSYS name format
When you type CD /QSYS.LIB/QGPL.LIB, you are using the IFS name format.
To switch to QSYS name format, the FTPcommand is QUOTE SITE NAMEFMT 0
To switch to IFS name format, the FTPcommand is QUOTE SITE NAMEFMT 1
THE CCSID ISSUE : TRANSLATION ERRORS
If you encounter some translation errors For example, in my french source, @ is replaced by à, { by é, } by è, you can solve then with this indirect copy :
This tool is a free source text; you can redistribute it and/or modify it as much as you need. Just add as comment in the code a reference to this site : http://jplamontre.free.fr/jpltools.htm ... and send me an email Contactwith "jpltools" in the subject (it's for my antispam rules). I will be happy to know what you have done with the jpltools. This tool is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY :
THIS TOOLBOX IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE PROVIDER OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS TOOLBOX, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.