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

Re: Posting to a page with JavaScript



Sender: daparnin@xxxxxxxxxxxxxx





Scott,

> To do that, you'll want to use the chdir() API (chdir = change director).

Thanks again.  I know working directories, relative, and absolute path
names from DOS.  Using a CHDIR in an RPG program on the iSeries isn't
something that  naturally comes to mind.  Hopefully it will in the future.
I have added the chdir() API. It works great and helped me avoid formatting
what's getting fed to the encoder.  I've used your IFS examples in another
program to open and read an IFS file.  This just adds to the knowledge.
Thanks for the help, it was much appreciated.


Dave Parnin
--
Nishikawa Standard Company
Topeka, IN  46571
daparnin@xxxxxxxxxxxxxx





                                                                                                              
                      Scott Klement                                                                           
                      <sk@xxxxxxxxxxxxx        To:       ftpapi@xxxxxxxxxxxxx                                 
                      com>                     cc:                                                            
                      Sent by:                 Subject:  Re: Posting to a page with JavaScript                
                      owner-ftpapi@xxxx                                                                       
                      e.ods.net                                                                               
                                                                                                              
                                                                                                              
                      02/14/2006 04:59                                                                        
                      PM                                                                                      
                      Please respond to                                                                       
                      ftpapi                                                                                  
                                                                                                              




Sender: Scott Klement <sk@xxxxxxxxxxxxxxxx>

Hi Dave,

> Content-Disposition: form-data; name="File"; filename="/ACH/ACHNISCO.TXT"
>
> I debugged the program and after the file was created and closed I edited
> it to be:
>
> Content-Disposition: form-data; name="File"; filename="ACHNISCO.TXT"

When HTTPAPI (or any other program that uses teh IFS interface) receives a
filename that does NOT start with a slash "/" charater, it'll look for
that filename starting in your current working directory.

(You can think of your current directory as being similar to your current
library (*CURLIB), except that it's for IFS files rahter than traditional
ones.)

Therefore, if you want it to list "ACHNISCO.TXT" without the /ACH at the
start, you can change your current directory to /ACH, and then pass only
"ACHNISCO.TXT" to the encoder routine.

To do that, you'll want to use the chdir() API (chdir = change director).
It's prototyped for you in the IFSIO_H member of HTTPAPI.  So you can
code:

     /copy HTTPAPI_H
     /copy IFSIO_H
      .
      .
  other stuff goes here,including creating the MFD encoder
      .
      .
      chdir('/ACH');
      http_mfd_encoder_addstmf(enc: 'File': 'ACHNISCO.TXT': 'text/plain');
      .
      .

Does that make sense?

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

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