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

RE: EXAMPLE2



Sender: "Nicolas Machado" <nicolas.machado@xxxxxxxxxxxxx>

Hi, VICTOR,
I'm from Argentina I don't know if you can speak spanish, maybe we can
understand better in that languaje.

As Scott say it's better to have permision to the IFS directory where you
are writing the response.
Any CGI action will generate a response, even if you wan't to only send
data.
So you have to check the athorities for the IFS directory that you are
using.

I recomend:

Create a directorio inside "/tmp", you can use the command CRTDIR.
Call it "VICTOR", so the path will be "/tmp/VICTOR"

and the change the last parameter of the example2 source, line 32.00, aprox.
( i don't know how much you change it )
so instead of : 
c                   eval      rc = http_url_post(                     
c                             'http://www.scottklement.com/cgi-bin/' +
c                               'email_comment.cgi':                  
c                             %addr(data): %len(%trimr(data)):        
c                             '/testpost.html')                       
                                                                      

Yo must have:
c                   eval      rc = http_url_post(                     
c                             'http://www.scottklement.com/cgi-bin/' +
c                               'email_comment.cgi':                  
c                             %addr(data): %len(%trimr(data)):        
c                             '/tmp/VICTOR/testpost.html')

                                                                      
Then, use WRKLNK '/tmp/VICTOR'
you have to see VICTOR directory, then you have to use option 9, to check an
set autorizations.

I hope this help you.
Best Regards


Nicolas Machado
Lic. en Sistemas
 
 






-----Original Message-----
From: owner-ftpapi@xxxxxxxxxxxxx [mailto:owner-ftpapi@xxxxxxxxxxxxx] On
Behalf Of Scott Klement
Sent: Friday, January 07, 2005 3:29 AM
To: ftpapi@xxxxxxxxxxxxx
Cc: Victor Cortinas
Subject: Re: EXAMPLE2


Sender: Scott Klement <sk@xxxxxxxxxxxxxxxx>



> First we tried to get EXAMPLE16 working, which would take a tracking 
> number, send it to UPS and get tracking number information back. We 
> insisted on getting that program to work without knowing all the LPP 
> needed to get program working.

I already wrote you a message telling you which licpgms you need to get it 
working.  Additionally, the install screen told you which ones you needed 
when you first installed HTTPAPI.

The message I wrote you is publicly archived at the following address, if 
for some reason you didn't receive it:
http://www.scottklement.com/archives/ftpapi/200501/msg00013.html


> We have now moved to program EXAMPLE2, which is supposed to post some 
> data to a cgi script.
>
> That sounds like something we need to do at our shop. Unfortunately, 
> again, the program compiles OK but give us a run time error
> of:
> Message . . . . :   DSPLY  You do not have permission to create that file

I've already explained this as well.  That message can be found here:
http://www.scottklement.com/archives/ftpapi/200501/msg00009.html


> We would like someone to help us out figure out the error on EXAMPLE2, 
> or some one that can direct us as to an application example that we 
> can take as base to develop our own.

Look at the code in example2.  You'll see code that looks like the 
following:

      c                   eval      rc = http_url_post(
      c                             'http://www.scottklement.com/cgi-bin/' +
      c                               'email_comment.cgi':
      c                             %addr(data): %len(%trimr(data)):
      c                             '/testpost.html')

What that's going to do is save the response from the web server in the
filename that was given as the last parameter.  In other words, it's going
to be a file called 'testpost.html' that's in the '/' (root) 
directory of your IFS.

In order to create a file in the root directory, you need to have write 
authority to that directory.  But you don't.

My suggestion is to change the filename to a place that you DO have 
permission to create a file (or perhaps, overwrite an existing file.)

Perhaps you have authority to the /tmp directory?  In that case, you could 
change the code to something like this:

      c                   eval      rc = http_url_post(
      c                             'http://www.scottklement.com/cgi-bin/' +
      c                               'email_comment.cgi':
      c                             %addr(data): %len(%trimr(data)):
      c                             '/tmp/testpost.html')

See what I did?  I added '/tmp' to the last line.

(Also, EXAMPLE2 executes the DSPF command a little further down in the 
code.  You'll have to change the filename there, too.)

You can save your file to ANYWHERE you want in the IFS, as long as you 
have been granted authority to create stream files in whichever directory 
you've chosen.

Please don't post the same question again. Try the things that I've 
suggested above. If they don't work, tell us what doesn't work about 
them.
-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubsribe from the list send mail to
majordomo@xxxxxxxxxxxxx with the body: unsubscribe ftpapi mymailaddr
-----------------------------------------------------------------------

-- 
No virus found in this incoming message.
Checked by AVG Anti-Virus.
Version: 7.0.300 / Virus Database: 265.6.8 - Release Date: 03/01/2005
 

-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.300 / Virus Database: 265.6.8 - Release Date: 03/01/2005
 


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