[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Basic FTPAPI Question



Sender: Scott Klement <sk@xxxxxxxxxxxxxxxx>


There are ones with names like EX3GET, which is a sample of a get process
and then there are others named something like TESTGET.  I can compile the
'TEST...' programs, but not the 'EX...' series.

The "TEST" members are the original sample programs that I wrote for FTPAPI back when version 1.0 was released. The "EX" members are similar programs that Thomas Raddatz wrote in order to insert into some documentation that he put together.


The important difference between them is the H-spec at the top. The FTPAPI versions have "H DFTACTGRP(*NO) BNDDIR('LIBFTP/FTPAPI')" in the H-spec so that you don't have to specify them manually on the compile command.

Adding these parms to the compile command will make the EX members compile as well. For example, the following command works on my box:

 CRTBNDRPG PGM(EX3GET) SRCFILE(LIBFTP/FTPAPISRC) DFTACTGRP(*NO)
            BNDDIR(LIBFTP/FTPAPI)

Now, I am no ILE expert either, so I may be missing something simple,
but I wanted to be sure I was looking at the right programs as examples before I dug deeper to figure this out.

Since you're new to ILE, I'll explain what these options do:


Basically, when you store your code in a service program, you need to provide other programs some way to find it. A binding directory is just that... a simple list of service programs (analogous to a library list) that the system will look in to find routines that it may need to use.

If you do a WRKBNDDIRE LIBFTP/FTPAPI you can see the contents of the FTPAPI binding directory. In this case, there's only one service program to search, the one called FTPAPIR4. That's where the FTP_xxxx routines are located... if it can't find the routines, you'll get errors in your job log like "Definition Not found for symbol 'FTP_CONN'"

And, of course, DFTACTGRP(*NO) takes the program out of OPM compatibility mode, which is required anytime you do anything with ILE.

-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubsribe from the list send mail
to majordomo@xxxxxxxxxxxxx with the body: unsubscribe ftpapi mymailaddr
-----------------------------------------------------------------------