HOME

FORUM

UPLOAD SOURCE

RPGLE/RPG

CLLE

SQLRPGLE

DDS

API

OTHER

JAVA

IFS

HTML

JAVA SCRIPT

PHP

MYSQL

XML

OLE DB



    
Enter keyword to search code examples.


Welcome to Code400.com   

Okay...We all like to get free stuff..Right?!? Well thats what we are offering here....Free Stuff
  1. Free storage for your source code.
    Post Your Source

  2. Free access to code samples. (site search)

  3. Free place to ask questions or just say what you want. 
    Share your thoughts

We are interested in what you have to say. If you can’t find what your’e looking for on this site....   Tell us  We will add it.

The small print says: We provide the source code on this site as only a guide. We do not recommend that anyone run any of the code provided on this site without first testing it. If you choose to download source from this site directly onto your production box without testing....Well, YOU are completely to blame and we don’t want to hear about it.

Random Quote

There's never a new fashion but it's old. Geoffrey Chaucer





Batch FTP by day


This utility will allow you to add any amount of FTP commands into a table by day. This can then be run from job scheduler or end-of-day.

The utility consists of two Iseries tables and one RPGLE program. DOWNLOAD
Download text files

Some screen shots

BATCHFTPP - This file contains all the FTP jobs by day.


BATCHFTPP - View of individual record. You may want to scramble the password???


BATCHFTPWP - This file is written by the RPG program BATCHFTPR for each FTP record.
LCD changes your Iseries directory while CD changes the remote server directory.

Example of CPYTOIMPF from within RPG
	CSR   $Convert2CSV  Begsr
     C*
     C* CPYTOIMPF  FROMFILE(&FROMLIB/&FROMFILE) TOSTMF(&TOFILE) +
     C*                           MBROPT(*ADD) STMFCODPAG(*PCASCII) +
     C*                           RCDDLM(*CRLF)
     C                   Time                    Dec6
     C                   Eval      RandomName = %Trim(@userid) +
     C                                          %Trim(%Char(Dec6))
     C*
     C                   Eval      CmdString = %Trim('CPYTOIMPF FROMFILE(')
     C                                       + %Trim(SNDFILLIB)
     C                                       + %Trim('/')
     C                                       + %Trim(SNDFILE)
     C                                       + %Trim(') TOSTMF(')
     C                                       + %Trim(Q)
     C                                       + %Trim(ToStreamFile)
     C                                       + %Trim('/')
     C                                       + %Trim(RandomName)
     C                                       + %Trim(Q)
     C                                       + %Trim(') MBROPT(*ADD)@')
     C                                       + %Trim('STMFCODPAG(*PCASCII)')
     C                                       + %Trim('@RCDDLM(*CRLF)')
     C*
     C                   Eval      CmdString = %Xlate('@':' ':CmdString)
     C                   eval      CmdLength = %len(%trim(CmdString))
     C*
     C                   call      'QCMDEXC'
     C                   parm                    CmdString
     C                   parm                    CmdLength
     C*
     C                   Endsr

	

About Code400.com | resume | Search | Site Map | Suggestions
© Copyright 2003-2008 Code400.com



Wednesday Mar 10, 2010 @ 4:19 AM