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

RE: CCSID problem



Scott - Thanks for your quick reply.

Actually, I changed the comments in the section of code I sent you to say "PC server" instead of "Datamax printer" because I'm testing it at a different office than where the printer is and am sending the file to an FTP server on my laptop.

What we have been doing which works fine:
1. Inventory receiving program calls CL program BC110C (source attached).
2. CL program BC110C receives part number info as parms from the inventory receiving program and a) calls RPG program BC110 (source attached) which creates stream file BC100.txt, then b) runs the "regular" iSeries FTP command to send stream file BC110.txt to the Datamax printer which then prints the bar code label.

What we want to do:
Change the RPG program BC110 to use FTP to send stream file BC110.txt from within the RPG program and eliminate the need to exit and use "regular" FTP from the CL program.  We need the flexibility to programmatically create PC directories and variable FTP commands without having to add/update a source physical file as would be required otherwise.  My problem is that the "old way", using "regular" FTP gives me a "good" stream file, but the "new way", using FTPAPI code within the RPG program gives me the "bad" stream file.  Note: I've created the IFS stream file with CCSID of both 00037 and 00819 and it doesn’t seem to make a difference - result is the same.

Hope that is clearer.

My additional question was if I could simply "write" my stream file directly to the Datamax printer via FTP instead of first sending it to the IFS?  I saw the procedure "FTP_putraw" and wondered if that might be the way to do it?  Let me know.

Again, thanks in advance for your help.

Bruce Henke



-----Original Message-----
From: owner-ftpapi@xxxxxxxxxxxxx [mailto:owner-ftpapi@xxxxxxxxxxxxx] On Behalf Of Scott Klement
Sent: Wednesday, October 26, 2005 6:00 PM
To: ftpapi@xxxxxxxxxxxxx
Subject: Re: CCSID problem


Hi Bruce,

Ooooh... Datamax printer language!

If you're creating the file in ASCII, then there's no need for FTP to 
translate it.  Instead, just FTP it in binary mode:

      callp FTP_binaryMode(sess: *ON);

What I think you've done (I'm guessing) is that you created the stream 
file in ASCII, then FTPed it, translating from EBCDIC to ASCII.  The 
problem is, it was already in ASCII, so you ended up translating it to 
garbage.


> The two resulting files (one via iSeries FTP, the other via the FTPAPIs) 
> are attached.  The result is the same whether the CCSID of the IFS text 
> file is 37 or 819.  Our system value QCCSID is 65535.  The job default 
> CCSID is 37.

The job default, and QCCSID values have absolutely no impact on FTPAPI, 
unless you're specifying a CCSID of 0.

> Any help would be appreciated.  (Also, if possible, would like “getting 
> started” info on if you can FTP the text file directly without having to 
> first write to the IFS.)

I don't understand the question.  Where is the text file when your program 
begins?  Why are you writing it to the IFS, if that's not where you need 
it?

Why FTP a Datamax printer label to a PC in the first place?  Why not just 
send it to the printer?

-- 
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.361 / Virus Database: 267.12.5/148 - Release Date: 10/25/2005
 

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.361 / Virus Database: 267.12.5/148 - Release Date: 10/25/2005
 
    

Attachment: bc110c.clp
Description: bc110c.clp

Attachment: bc110.rpgle
Description: bc110.rpgle