cancel
Showing results for 
Search instead for 
Did you mean: 

File FTP to AS400 Library folder

Former Member
0 Kudos

hi mates,

Using the receiver FTP adapter & content conversion, I'm dropping a file on AS400 in a library folder (/QSYS.LIB/XYZ.LIB/). The file is getting created with 'FILE' extension. When I download it on to my desktop and view it with wordpad, I see the actual contents and a line with non-readable character (the char looks line a box).

However, AS400 people say that the file is not usable for their programs. Because ithey run some SQL queries on it and that doesnt return any data and also when they view the content with their toold they see some non-readable characters.

What is the Receiver FTP config for dropping the fille onto a AS400 library?

I've tried using file type, Text with diff encodings given in file adapter help & Binary. It dint help.

Did any one do this kind of thing earlier? Am I missing something here.

I appreciate your inputs & references.

thx

praveen

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

hey

please try to open up the File in MS word and see if you still get that special characters?

thanx

ahmad

Former Member
0 Kudos

ahmad,

I still see the same characters in MS Word.

My concern is AS400 people to view properly...I dont care if I can see them or not..

first of all is file adapter approach right? I see some suggestion on the forum to use JDBC adapter to connect to As400.

thx

praveen

Former Member
0 Kudos

Hey

in the first reply you said that file is being created with a FILE extension,can't you change it to .txt,so that AS400 people can read it?

also you can definitely use File adapter to integrate AS400,JDBC is just another option but for that you need to deploy drivers first.

Note:I m assuming that you have FTP server on AS400

thanx

ahmad

Message was edited by:

Ahmad

Message was edited by:

Ahmad

Former Member
0 Kudos

Ahmad,

I can certainly a .TXT file..but not in the library folder..then there should be another script/procedure which will convert it to AS400 usable format.

What I'm trying is a direct method w/o any scripts/procedures.

Yes, I've a FTP server on AS400.

thanks

praveen

Former Member
0 Kudos

Hey

as you urself said that there are some special characters,could you please check adapter monitoring in RWB.

thanx

ahmad

Former Member
0 Kudos

ahmad,

adapter monitoring & message monitoring shows that the processing is successful.

Moreover, if I drop the same file on to NFS, it has contents in perfect shape. I guess the problem is...how it is behaving on AS400 library.

thx

praveen

Former Member
0 Kudos

Hey

yeah,its some encoding problem.anyways, have a look at the following to make sure that you are using the correct encoding for you iSeries

http://publib.boulder.ibm.com/infocenter/iseries/v5r3/index.jsp?topic=/rzaha/fileenc.htm

also try asking the AS400 people which encoding they expect.

i would say,dont do any FCC right now and see if the XML is going properly or not and are they able to read thata XML.if XML goes fine,then use the same encoding and do FCC.

also if you are seeing the special character(the box) in the bottom of the file,then it means that AS400 is behaving funny for new Line('nl').

Use '0x2B' instead of 'nl'

thanx

ahmad

Message was edited by:

Ahmad

justin_santhanam
Active Contributor
0 Kudos

Praveen,

Are u using any encoding format ? If not can u try with the encoding format ISO8859_1

Praveen read the below link ,it might be useful

http://www-1.ibm.com/support/docview.wss?uid=nas1b919ff1b461a3b7386256fcc0080d66a

Best regards,

raj.

Message was edited by:

Raj

Former Member
0 Kudos

Ahmad,

Using the code page 'Cp037' did the job....thanks a lot and points too...

Raj,

I did not try the option you gave me...setting the encoding for the entire FTP as the codepage specification did the job..anyways...thats very useful information..I appreciate it..and points for you as well

I'm very happy that a not-a-regular issue like this has been resolved with help of forum members...

As usual..SDN XI Forum rocks !!

thx

praveen

ravi_raman2
Active Contributor
0 Kudos

Praveen,

The easiest solution is to map a drive to the as400 from your windows machine, let me know if you need instructions on how to do that. As once you do that then you can map a drive to /QOpenSys/QIBM.......then the party begins..

I also have a cl program i wrote by which u can map directly to the root and that also resolves the ascii character issues with this.

Regards

Ravi Raman

Answers (1)

Answers (1)

Former Member
0 Kudos

There is a simple solution for this issue.

Best way for sending text files to systems like AS400 whcih has defferent encoding and new line characters, is using text mode for transfer which leaves the translation process to FTP server connecting to unlike binary mode where transfer happens in exact bytes w/o any translation.

praveen