Just make sure you specify TRANSFORM(*NO) and DESTTYP(*AS400) or you'll get crap on the other end.
Leave it to Bob. I'm thinking save *OUTQ to SAVF, FTP as binary, restore. Or CPYSPLF to flat file *FCFC, FTP, OVRPRTF for *FCFC, CPYF to printer file (all the while keeping CCSID's straight). And Bob comes out with LPR. D'oh!
Thank you verymuch Bob and Dale.
Bob> I feel SNDTCPSPLF would work fine.
When I tried the command I got the following error.
Message . . . . : Remote host system rejected the open attempt. Cause . . . . . : This may have occurred because the remote host does not have ports available for use or does not support TELNET. Recovery . . . : Try the request again or contact the system administrator.
My local system IP is 192.168.1.2 which is connected through a router.
I am using Windows 7, but I have enabled TelnetClient and TelnetServer through Control Panel> Programs > Trurn Windows Features on or off > Telnet Clinet.
You do understand that this is an AS/400 to AS/400 transfer example right? Not a PC to AS/40 transfer.
The two system are both AS/400 systems, right? (Meaning IBM System i or "POWER on i" boxes?) If not, then you can't use the DESTTYP(*AS400) parameter and probably not the TRANSFORM parameter.
Well Bob, I need to FTP the SPOOL FILE (NOT PF) data to a non AS400 System as Unicode/Excel/CSV file which contains both English and Arabic Characters.
Ah, there's the rub. You can't FTP spooled files, only data files. The file that you FTP can be PF-DTA, PF-SRC, SAVF, or something from IFS.
So what you're going to need to figure out is how to convert your spooled file to a data file. You can CPYSPLF to a PF-DTA, but it will be a flat file, just containing the text of each line of the spooled file.
If you really need CSV or Excel, you're going to need to do some programming. I often get requests along the lines of, "can you take such-and-such a report and send it in e-mail as a CSV?" Generally I modify the original report program and write to a stream file as an additional output, or sometimes as the only output, depending on the request. CSV is fairly easy. Excel is a little trickier, but if you're up for it, there are open source Java classes that can help.
Okay, you did say "different system" and that's why I wanted to clarify what your issue is.
Did you try it without the parameters I indicated (DESTTYP and TRANSFORM) which I customized in the example for AS/400 to AS/400 transfer. If you're going to a PC from an AS/400, then the default settings may be what you need. If not, play with those two settings to see if changing them can help.
Unless you copy the Spool File to a database file, you can't directly FTP the SPLF.
Once it is in a db format, you'll need a PC program that can interpret it or were you expecting it in text format?
If this is the case, try using CPYSPLF to copy it to a database file, then use FTPFILE (available on this website) to FTP the file. Try both binary and then TEXT transfer modes to see which one would work for your situation.
Excel can read CSV and there's almost never a reason to use Excel's native format instead of CSV unless formatting is an issue.
I understand SPLF can not be directly sent by FTP. Is it possible to convert the SPLF into Unicode (Not ASCII) so I can preserve the Arabic Characters which can be stored in IFS Folder?
ASCII converts Arabic Letters to ?????? in AS400 Display.
Copying to PF and sending the file in binary format will also not help as the destination system is not AS400.
The expected data should be in Unicode / Excel so, the arabic charecters can be viewed and processed.
Try creating a physical file with the Unicode CCSID and copy the SPLF to it. Then FTP the PF to the target system... sounds like you're going to have to play with it using trial/error.
Bob, I tried to create a PF and copied the SPLF to the PF. Then I did CPYTOSTMF to IFS Folder. (Sending PF through FTP using SAVF will not be of any help)
When I received data in Windows using FTP, the transfer was successful but data was some junk characters.
As Bob mentioned will do various trial and error options playing aroung with CCSID and see the results. In the mean time, if any one suggest me with the appropriate settings pleaase do so.
Ultimately what I want is to Convert the SPLF Data (Arabic + English) into a Stream File which can be sent by FTP to Non AS400, say Windows/Unix.
Thanks in Advance.
After CPYSPLF to PF, verify the CCSID is what you think with DSPFD and DSPFFD. And you should probably DSPPFM and [F10] to see in hex, to make sure it's actually Unicode.
Then after CPYTOSTMF, WRKLNK option 8 to see the attributes of the *STMF, again verifying that it's Unicode. If the *STMF is still Unicode, FTP it as BINary; otherwise the remote system may try to convert text to some local code page, thus possibly corrupting the Unicode characters.
I'd like to suggest again that it's probably easier, in the long run, to have the program that creates the report just write the *STMF directly.