0 pts.
 How do I download posted RPG Code to my own system?
I'm new to this forum. I've found RPG code in the programmer tips area that I'd like to use on my system but can't figure out how to get it on my system other than typing it all in by hand! One topic had a clipboard function but I don't understand how to get it from the clipboard to the Qrpgsrc. Can anyone assist? Thanks!

Software/Hardware used:
ASKED: January 12, 2006  9:19 AM
UPDATED: November 25, 2009  1:17 AM
  Help
 Approved Answer - Chosen by TomLiotta

Open the source editor (lpex), use windows copy & paste. No need to FTP, CPYF, or other gyrations.

ANSWERED:  Nov 25, 2009  1:17 AM (GMT)  by TomLiotta

 
Other Answers:

I copy the code to my PC as a text file and then FTP it into my source code. I usually put the .txt file into my C:/ root directory.

From my PC, I bring up “Run” and at the command prompt, I key in ftp ’111.111.111.111′ to get to my iSeries. Once in ftp, I key “put xyzsource.txt MYLIB/QRPGLESRC.XYZSOURCE”. Viola, the source file is in my QRPGLESRC file.

=========================================================

Simplest for me is to paste it into a text file in my IFS /home directory through a basic mapped drive. Then it’s just a CPYFRMSTMF into ‘/qsys.lib/mylib.lib/qrpglesrc.file/mynewmbr.mbr’.

Since I create the text file from Windows, it automatically has the correct CCSID. And because my system has a valid QCCSID specified, there’s no need for any CCSID parms on the command. (You can probably issue CHGJOB CCSID(37) if your system has the incorrect QCCSID 65535.)

Tom

Last Wiki Answer Submitted:  November 24, 2009  8:15 am  by  TomLiotta   107,995 pts.
Latest Answer Wiki Contributors:  MadDogDing   0 pts.
To see other answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

if you can copy your text file to IFS (here sylk_h.txt), then you can

CPYFRMSTMF FROMSTMF(‘/IfsDir/Sample.txt’) TOMBR(‘/qsys.lib/mylib.lib/qxxxsrc.file/sample.mbr’) MBROPT(*REPLACE) STMFCODPAG(*PCASCII) CVTDTA(*AUTO) DBFCCSID(*FILE) TABEXPN(*NO)

CHGPFM FILE(mylib/QxxxSRC) MBR(sample) SRCTYPE(xxx) TEXT(‘description’)

If you can only copy to QDLS, then you can
CPYFRMPCD FROMFLR(JPL) TOFILE(QTEMP/JPL) FROMDOC(sample) TOMBR(sample) TRNTBL(*DFT) TRNFMT(*TEXT)

more details in french at http://jplamontre.free.fr/AS400/CopieCode.htm

 0 pts.