ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

FTP from CLP/CLLE programs

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • FTP from CLP/CLLE programs

    Hi, I have this situation - I wish to migrate from FTP to SFTP several processes, for many of them the process is clear, I have the FTP script with the information related to the files to be transferred and the location on the remote system, those scripts are statics or generated dinamically, for example something like this:
    username password
    cd dir1
    put AS400_library/File1 File1.csv
    close
    quit

    where AS400_library is a permanent library from my environment and Fille1 is a physical file from this library.

    for all the processes like this I copy the file to be transferred and the script file, adapted to SFTP/SSH - without the username and password, only with commands which are able to be interpreted by sftp, into the IFS directory, after this step I launched the program which done the sftp with a special user profile configured for this.

    but from some of them processes I saw in the FTP script, the input file with the ftp commands that the file to be transferred is not in a permanent AS400 library, I don't think that are DB2 file, because it looks like this:

    username password
    cd dir1
    put qtemp/file1.csv file1.csv

    Could you tell me please of what kind of file it is about? because as I know in a AS400 library we can't have a file with extension, I don't think that those files are DB2 files, such PF, or can we have some kind of file in QTEMP library?
    it is possible that in those processes, somewhere upstream, to create a directory into IFS called qtemp/?
    It is possible to be streamfiles?

    Thank you in advance

  • #2
    You can have a file with an extension in IBM i - it just doesn't any real significance to it outside of it being there. To demonstrate issue the following command:

    CRTPF FILE(QTEMP/FILE.CSV) RCDLEN(128)

    It will create a file FILE.CSV in library QTEMP. You're limited to the 10 character file names - but they can include the '.'

    Comment


    • #3
      I understand, but I have a file like this qtemp/aaaaaaaaaa.csv - with a length of 15 char.. have any idea what kind of file is it? Because I know as you said, that all DB2 files are with name length of 10 char, is it posibly to have an SQL table? created with create table somewhere upstream in the process? or it may be a stream file in the IFS? in a directory named qtemp/ ?

      Comment


      • #4
        Somewhat back to your original question - yes you can have a directory in your IFS called qtemp - from a command line:

        wrklnk '/*'

        This will let you poke around the IFS from the green screen.

        Comment

        Working...
        X