cancel
Showing results for 
Search instead for 
Did you mean: 

HELP!!! FTP file transfer problem SAP-AS400

former_member184029
Participant
0 Kudos

Hi experts, I apologize because this post is duplicated but someone suggested me search help on this Forum.

There is a Job wich execute a program ( UI ) for receiving and sending files thru FTP, when we list Job Log on SM37, there is 3 Job with status canceled, when we see Job Log details the overview for job is

Message text

Job started

Step 001 started (program ZUI01, variant /JOB, user ID SAPB)

Data error in FTP copy - destination

Job cancelled after system exception ERROR_MESSAGE

The point is, User Interface transfer two files, header file is transfered from SAP to AS400 but detail file is not transfered.

I will appreciate any helpfull information because it's urgent, because is on PRD environment.

Regards,

Tokio

P.D. Points Rewards

Regards

Tokio

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member184029
Participant
0 Kudos

Not answered

teddylv_andersen2
Active Participant
0 Kudos

Hello Tokio,

Could it be that the FTP attributes where changed on the host?

Br,

Teddy

former_member184029
Participant
0 Kudos

Hi Teddy

Wich ( possible) FTP attributes could be changed? I guess something is lost, but there is no trace for that; I asked to SAP basis, no errors on SAP system and I asked to AS400 Administrator and no error on connection.

Please any helpfull ideal I will appreciate it!!!

Regards, Tokio

teddylv_andersen2
Active Participant
0 Kudos

Hi Tokio.

We sometimes change our FTP attributes from:

CHGFTPA NAMEFMT(PATH) CURDIR(HOMEDIR)

to:

CHGFTPA NAMEFMT(LIB) CURDIR(CURLIB)

The first one is used in our normal production situation and the second one is used when installing TMKSVR (Used when installing new systems)

Best regards

Teddy

former_member184029
Participant
0 Kudos

Teddy thanks for your answer!!!

About CHGFTPA, this in on AS400 server, right? the point is that no always this error message appears in different moments, how can I check FTP-User attributes for copyng?

Really thanks.

Regards

Tokio

Former Member
0 Kudos

Hi Tokio,

Teddi's attributes are no USER attributes, but SERVER attributes !

I would not check them, I would overwrite them as follows:

quote site na 0

or

quote site na 1

Then you always know, how it is set ...

If you tell us, that this happens sporadic only, I assume, that this is based on the fact, that you are doing this manually. Here, it is the point what you use as FIRST ftp command, because e.g. cd /tmp sets it to IFS. If you do some other commands first, this doesn't work anymore automatically.

Regards

Volker Gueldenpfennig, consolut.gmbh

http://www.consolut.de - http://www.4soi.de - http://www.easymarketplace.de

former_member184029
Participant
0 Kudos

Hi, Volker

Your answer gave me an idea about previus command execution, let me tell you that we have four (4) perform:

-First for opening connection:

<b>Source server.</b>

CALL FUNCTION 'HTTP_SCRAMBLE'

CALL FUNCTION 'FTP_CONNECT'

<b>Target server</b>

CALL FUNCTION 'HTTP_SCRAMBLE'

CALL FUNCTION 'FTP_CONNECT'

- Second (header file) and third (details file) for transfering files:

CALL FUNCTION 'FTP_COMMAND' ( For cd\tmp )

CALL FUNCTION 'FTP_COMMAND' ( For 'ascii' format )

CALL FUNCTION 'FTP_COPY' -> For copying

- Fourth for closing connection:

CALL FUNCTION 'FTP_DISCONNECT'

CALL FUNCTION 'RFC_CONNECTION_CLOSE'

When you said "<i>If you do some other commands first, this doesn't work anymore automatically.</i>" that mean when second perform is executed (header file) and after third perform is executed (details file) what is not working automatically?

Thanks in advance.

Tokio

Former Member
0 Kudos

Hi Tokio,

I would add that as first command before "CALL FUNCTION 'FTP_COMMAND' ( For cd\tmp )":

quote site na 1

=> the i5 FTP server gets "hardcoded" set to the IFS syntax that you obviously need as you use "cd\tmp"

btw:

I would change this to the correct syntax as follows:

cd /tmp

Regards

Volker Gueldenpfennig, consolut.gmbh

http://www.consolut.de - http://www.4soi.de - http://www.easymarketplace.de

former_member184029
Participant
0 Kudos

Hi Volker

I apologize for next question: what do you mean with "quote site na 1"?

Thanks.

Tokio

Former Member
0 Kudos

Hi Tokio,

this is a valid ftp command !

quote site na 1

Regards

Volker Gueldenpfennig, consolut.gmbh

http://www.consolut.de - http://www.4soi.de - http://www.easymarketplace.de

former_member184029
Participant
0 Kudos

Hi Volker

thanks for answering... I execute this throught FTP command and show me this:


ftp> quote site namefmt
250  Now using naming format "0".

Must I execute the suggested command ( quote site na 1) before command cd/tmp on each perform ( header file and detail file) ?.

Regards

Tokio

Former Member
0 Kudos

Hi Tokio,

in every new ftp session ...

Regards

Volker Gueldenpfennig, consolut.gmbh

http://www.consolut.de - http://www.4soi.de - http://www.easymarketplace.de

former_member184029
Participant
0 Kudos

Thanks Volker

If before CALL FUNCTION 'FTP_COMMAND' ( For cd/tmp ) I put CALL FUNCTION 'FTP_COMMAND' ( For quote site na "1"). Which attribute I'm changing on AS400 for copying file, if AS400 is using naming format "0"?

Regards

Tokio

Former Member
0 Kudos

Hi Tokio,

In short, when "quote site namefmt 0", you ftp with AS400's native library system.

When "quote site namefmt 1", you ftp with the root file system - more like unix style.

Best regards,

Victor