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

2. RE: mkdir failing in TESTMIRIN (Mike Krebs)

Wow do I feel like a bonehead! Thanks Mike! I think after not being able to see that difference and my previous problem with an additional space in my FTP_ROOT; it's about time for this old boy to take a trip to Lenscrafters for a new pair of specs!

Thanks again Loek and Mike for all your help on both problems and your patience in dealing with the visually challenged!

Best Regards,
Jerry L. Birch

Message: 2
Date: Thu, 11 Dec 2014 10:22:15 -0600
From: Mike Krebs <mkrebs@xxxxxxxxxxxxxxxxxx>
To: HTTPAPI and FTPAPI Projects <ftpapi@xxxxxxxxxxxxxxxxxxxxxx>
Subject: RE: mkdir failing in TESTMIRIN
Message-ID: <3DF08BA25872B644A1421B9F085B1829A0E600FA33@xxxxxxxxxxxx>
Content-Type: text/plain; charset="us-ascii"

Hi Jerry,

Not sure if you copy pasted or typed but aj1 and ajl are not the same.

-----Original Message-----
From: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx [mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Jerry Birch
Sent: Wednesday, December 10, 2014 9:14 PM
To: ftpapi@xxxxxxxxxxxxxxxxxxxxxx
Subject: mkdir failing in TESTMIRIN

The TESTMIRIN program statement below in the "do_dir" subprocedure is failing.

callp     mkdir(%trimr(LocalDir): 511)

This is causing the following statement "if chdir(%trimr(LocalDir)) < 0" to fail and set the Diagnostic message in the job log to "chdir(): No such path or directory."

So to try to identify the return error of the failed mkdir command, I added the Diagnostic message logic to the mkdir command as shown below:

c**                 callp     mkdir(%trimr(LocalDir): 511)
c                   if        mkdir(%trimr(LocalDir): 511) < 0
c                   callp     DiagMsg('mkdir(): ' +
c                                  %str(strerror(errno)))
c                   return    -1
c                   endif

Which generated the same message in the job log as shown below:

0: > CWD
0: 250 CWD command successful.
0: > TYPE A
0: 200 Type set to A.
0: > PORT 10,30,1,7,243,62
0: 200 PORT command successful.
0: > NLST
0: 150 Opening ASCII mode data connection for file list.
0: 226 Transfer complete.
mkdir(): No such path or directory.

Below is a debug display of variable LocalDir right before the mkdir and chdir commands:

EVAL LocalDir
    1   '/imports/ncr_aj1/incoming                                   '
   61   '                                                            '
  121   '                                                            '
  181   '                                                            '
  241   '                                                            '
  301   '                                                            '
  361   '                                                            '
  421   '                                                            '
  481   '                                                            '
  541   '                                                            '
  601   '                                        '


This is the WRKLNK command illustrating the path exists on the local IBMi system up to the point of the directory path where the mkdir command in do_dir is called to create the same directory found on the FTP Server (the FTP Server directory to mirror).

                           Work with Object Links

Directory  . . . . :   /imports/ncr_ajl/incoming

Type options, press Enter.
 2=Edit   3=Copy   4=Remove   5=Display   7=Rename   8=Display attributes
 11=Change current directory ...

Opt   Object link            Type     Attribute    Text
     import.ajl             STMF

So obviously the path is there so I don't understand the "No such path or directory." error. Can anyone shed some light on what I am doing wrong or what the problem might be?

Best Regards,
Jerry L. Birch


This is the FTPAPI mailing list digest.  To unsubscribe, go to:

End of Ftpapi Digest, Vol 98, Issue 15

This is the FTPAPI mailing list.  To unsubscribe, please go to: