ASCII is not specific. There are MANY different character sets called "ASCII". CCSID 819 is ISO-8859-1, which is a particular "flavor" of ASCII.

You're correct that specifying 819 and 0 will cause the program to translate from your job's CCSID to ISO-8859-1 when it writes to the file.... but, I don't understand why this is desired. Your data is already ASCII, isn't it?

Are you translating it to EBCDIC in your progam, and then asking the IFS APIs to translate it back to ASCII? That doesn't make much sense, except maybe so you can see the data in the debugger or something...



On 10/2/2013 11:35 AM, Lynn McManus wrote:
If I understand it correctly, the O_CCSID and specifying the CCSID will
write the file as ASCII when set to 819. The last parm of 0 will, when the
file is already created, translate from the jobs currents CCSID to ASCII
when writing to the file.



Lynn McManus

-----Original Message-----
From: web400-bounces@xxxxxxxxxxxx [mailto:web400-bounces@xxxxxxxxxxxx] On
Behalf Of Grizzly Malchow
Sent: Wednesday, October 02, 2013 11:25 AM
To: Web Enabling the IBM i (AS/400 and iSeries)
Subject: Re: [WEB400] print stream file to zebra.

I don't really know what the differences between O_CCSID and O_CODEPAGE are,
but when I use O_CODEPAGE and specify 819 as the conversion ID, I get
readable ascii data in the file that is created. I think O_CODEPAGE says
that the data in the file is going to be in the code page I specify, which
is 819.

Also, if you are using O_TEXT_CREAT with O_CCSID and O_TEXTDATA, don't you
need to specify a value other than zero for the last parameter? Doesn't
leaving that value as zero then default the CCSID to the CCSID of the job,
which is most likely *EBCDIC?


-----Original Message-----
From: web400-bounces@xxxxxxxxxxxx [mailto:web400-bounces@xxxxxxxxxxxx] On
Behalf Of Lynn McManus
Sent: Wednesday, October 02, 2013 10:43 AM
To: 'Web Enabling the IBM i (AS/400 and iSeries)'
Subject: Re: [WEB400] print stream file to zebra.

open( %trimr(outputfile)
: O_WRONLY + O_CREAT + O_TRUNC
+ O_CCSID + O_TEXTDATA +
O_TEXT_CREAT
: M_RDWR
: 819
: 0 );

Lynn McManus


-----Original Message-----
From: web400-bounces@xxxxxxxxxxxx [mailto:web400-bounces@xxxxxxxxxxxx] On
Behalf Of Grizzly Malchow
Sent: Wednesday, October 02, 2013 10:37 AM
To: Web Enabling the IBM i (AS/400 and iSeries)
Subject: Re: [WEB400] print stream file to zebra.

Are you specifying O_CODEPAGE when you open the text file that ultimately
holds the label data?

For example:
fd2 = open( 'shipping_label.txt'
: O_WRONLY + O_CREAT + O_EXCL + O_CODEPAGE
: S_IRUSR + S_IWUSR + S_IRGRP + S_IROTH
:819);

I failed to mention that we do that as well.

-----Original Message-----
From: web400-bounces@xxxxxxxxxxxx [mailto:web400-bounces@xxxxxxxxxxxx] On
Behalf Of Lynn McManus
Sent: Wednesday, October 02, 2013 9:57 AM
To: 'Web Enabling the IBM i (AS/400 and iSeries)'
Subject: Re: [WEB400] print stream file to zebra.

My text file on the ifs has a CCSID of 819. I removed all my translation
code and took my decoded base64 and dumped to ifs text file created with 819
CCSID. Now when viewing this file it is unrecognizable code. Removed the
line feed check and just dumped back into qsysprt *userascii and still
nothing prints.

I know I have all the right components to make this work, I just cannot
figure out which sequence of events is the right combination.


Lynn McManus



-----Original Message-----
From: web400-bounces@xxxxxxxxxxxx [mailto:web400-bounces@xxxxxxxxxxxx] On
Behalf Of Grizzly Malchow
Sent: Wednesday, October 02, 2013 9:42 AM
To: Web Enabling the IBM i (AS/400 and iSeries)
Subject: Re: [WEB400] print stream file to zebra.

Lynn,
What is the CCSID of the IFS files you are trying to print? I use 819 and
that works for me. I don't bother with *EBCDIC to *ASCII translation, nor do
I bother with line feeds. If you write the base64 decoded data to a file
that is created with an ASCII CCSID you shouldn't have to do any translation
when it is sent to a *USERASCII spoolfile.


-----Original Message-----
From: web400-bounces@xxxxxxxxxxxx [mailto:web400-bounces@xxxxxxxxxxxx] On
Behalf Of Lynn McManus
Sent: Wednesday, October 02, 2013 8:53 AM
To: 'Web Enabling the IBM i (AS/400 and iSeries)'
Subject: Re: [WEB400] print stream file to zebra.

This is the file created on the IFS after decoding and translating. We are
storing the labels on the IFS so a reprint would be possible. When I call
the program to print the label, it retrieves the file, overrides to
*userascii and checks for line feed characters.

But nothing comes out of the printer.

Lynn

Lynn McManus



-----Original Message-----
From: web400-bounces@xxxxxxxxxxxx [mailto:web400-bounces@xxxxxxxxxxxx] On
Behalf Of Craig
Sent: Wednesday, October 02, 2013 8:40 AM
To: 'Web Enabling the IBM i (AS/400 and iSeries)'
Subject: Re: [WEB400] print stream file to zebra.

Lynn,

Is that is ascii or ebcdic?
It must be in ebcdic if you are using an outq.
If you send it directly to the 105SL using a socket, it must be ascii.
I do this all the time to 105SLs.

HTH,

Craig

-----Original Message-----
From: web400-bounces@xxxxxxxxxxxx [mailto:web400-bounces@xxxxxxxxxxxx] On
Behalf Of Lynn McManus
Sent: Wednesday, October 02, 2013 9:25 AM
To: 'Web Enabling the IBM i (AS/400 and iSeries)'
Subject: Re: [WEB400] print stream file to zebra.

This is the contents of my text file. It is a UPS label string generated by
UPS. I am printing to a Zebra 105SL.

¬XA¬LRN¬MNY¬MFN,N¬LH10,12¬MCY¬POI¬PW812¬CI27

¬FO620,1140
¬GFA,00969,00969,019,FFFFFFFFFFFFFFFFFFFFFFFFFFFFF000000000
FFFFFFFFFFFFFFFFFFFFFFFFFFFFF000000000
FFFFFFFFFFFFFFFFFFFFFFFFFFFFF000000000
FFFFFFFFFFFFFFFFFFFFFFFFFFFFF000000000
F0000000000001F8000000000000F000000000
F0000000000001F8000000000000F000000000
F0000000003F81F83FC000000000F000000000
F0000000003F81F83FC000000000F000000000
F000000000FFF9F9FFF000000000F000000000
F000000000FFF9F9FFF000000000F000000000
F000000000FFFFFFFFFC00000000F000000000
F000000000FFFFFFFFFC00000000F000000000
F000000000F07FFFF0FC00000000F000000000
F000000000F07FFFF0FC00000000F000000000
F000000000FC1FFFC3F000000000F000000000
F000000000FC1FFFC3F000000000F000000000
F000000000FFFFFFFFF000000000F000000000
F000000000FFFFFFFFF000000000F000000000
F0000000003FFFFFFFC000000000F000000000
F0000000003FFFFFFFC000000000F000000000
FFFFFFFFFFFFFFFFFFFFFFFFFFFFF000000000
FFFFFFFFFFFFFFFFFFFFFFFFFFFFF000000000
FFFFFFFFFFFFFFFFFFFFFFFFFFFFF000000000
F00000000001FFFFF00000000000F000000000
F00000000001FFFFF00000000000F000000000
F00000000003FFF9FC0000000000F000000000
F00000000003FFF9FC0000000000F000000000
F0000000003FE1F87FC000000000F000000000
F0000000003FE1F87FC000000000F000000000
F000000000FF81F83FF000000000F000000000
F000000000FF81F83FF000000000F000000000
F000000000FE01F803F000000000F000000000
F000000000FE01F803F000000000F000000000
F000000000F001F800F000000000F000000000
F000000000F001F800F000000000F000000000
F0000000000001F8000000000000F000000000
F0000000000001F8000000000000F0FFDC1C00
FFFFFFFFFFFFFFFFFFFFFFFFFFFFF0FFDC1C00
FFFFFFFFFFFFFFFFFFFFFFFFFFFFF00C1E3C00
FFFFFFFFFFFFFFFFFFFFFFFFFFFFF00C1E3C00
FFFFFFFFFFFFFFFFFFFFFFFFFFFFF00C1A2C00
FFFFFFFFFFFFFFFFFFFFFFFFFFFFF00C1B6C00
FFFFFFFFFFFFFFFFFFFFFFFFFFFFF00C1B6C00
0000000000000000000000000000000C1B6C00
0000000000000000000000000000000C19CC00
0000000000000000000000000000000C19CC00
0000000000000000000000000000000C19CC00
0000000000000000000000000000000C188C00
00000000000000000000000000000000000000
00000000000000000000000000000000000000
00000000000000000000000000000000000000
¬DN
¬FT20,630¬CVY¬BD2¬FH_¬FD003840358010000Ý)>_1E01_1D961Z99754258_1DUPSN_1DXXXX
X_1E07U-8+04S)H5U,DG$R#Y.SD&%":YH%ANEA:S,JJPW_1D7+ZS_0D_1E_04¬FS

¬FT15,23¬A0N,20,24¬FVQUEST¬FS
¬FT15,42¬A0N,20,24¬FV2707591248¬FS
¬FT15,61¬A0N,20,24¬FV300 EAST CHESTNUT STREET¬FS ¬FT15,81¬A0N,20,24¬FVMURRAY
KY 42071¬FS ¬FT60,183¬A0N,28,32¬FVPROPST DISCOUNT DRUGS, INC.¬FS
¬FT60,213¬A0N,28,32¬FV2565397443¬FS
¬FT60,244¬A0N,28,32¬FV717 PRATT AVENUE NE¬FS
¬FT60,288¬A0N,45,44¬FVHUNTSVILLE AL 35801¬FS
¬FT380,30¬A0N,30,34¬FV3 LBS ¬FS
¬FT673,34¬A0N,28,32¬FV 1 OF 1¬FS
¬FT620,736¬A0N,100,76¬FV ¬FS
¬FO677,640¬GB123,123,122¬FS

¬FT300,618¬BY3¬BCN,103,N,N,,A¬FV42035801¬FS

¬FT290,493¬A0N,80,70¬FVAL 357 0-01¬FS
¬FT10,704¬A0N,56,58¬FVUPS GROUND¬FS
¬FT10,737¬A0N,26,30¬FVTRACKING #: 1Z 4E6 310 03 9975 4258¬FS
¬FO0,762¬GB800,4,4¬FS

¬FT790,1039¬A0N,22,26¬FV ¬FS
¬FT10,1035¬A0N,22,26¬FVBILLING: ¬FS
¬FT126,1035¬A0N,22,26¬FVP/P ¬FS
¬FT10,1151¬A0N,22,26¬FVDealer No.: 2817¬FS ¬FT15,153¬A0N,28,32¬FVSHIP TO:
¬FS ¬FO0,637¬GB798,14,14¬FS

¬FO0,997¬GB800,14,14¬FS

¬FO0,416¬GB800,4,4¬FS

¬FO240,416¬GB3,221,3¬FS

¬FT190,1188¬A0N,14,20¬FVXOL 13.09.14 NV45 42.0A 07/2013¬FS
¬FT105,982¬BY3¬BCN,202,N,N,,A¬FV1Z4E63100399754258¬FS

¬FT273,896¬A0N,95,74¬FVSAMPLE¬FS
¬XZ¬XZ

Lynn McManus

-----Original Message-----
From: web400-bounces@xxxxxxxxxxxx [mailto:web400-bounces@xxxxxxxxxxxx] On
Behalf Of Jan Grove Vejlstrup
Sent: Wednesday, October 02, 2013 1:11 AM
To: web400@xxxxxxxxxxxx
Subject: Re: [WEB400] print stream file to zebra.

Hello Lynn

What is the content of the file, you send to the zebra-printer? What is the
model of the zebra-printer?

Best regards

Jan

Am 02.10.2013 00:28, schrieb Lynn McManus:
Hello all again,



I am having an issue with a printer file I create as *userascii goes
to the printer and disappears. I am reading a text file from the
IFS,(I can open the file and see my ZPL font), I read the stream file,
parse out the line feeds, write to qsysprt.

Printer file gets created, cannot open as it is *userascii. When
released it simply disappears and nothing prints.



Any ideas?



Thanks in advance!



Lynn



Lynn McManus




--
This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400) mailing
list To post a message email: WEB400@xxxxxxxxxxxx To subscribe, unsubscribe,
or change list options,
visit: http://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives at
http://archive.midrange.com/web400.

--
This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400) mailing
list To post a message email: WEB400@xxxxxxxxxxxx To subscribe, unsubscribe,
or change list options,
visit: http://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives at
http://archive.midrange.com/web400.


--
This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400) mailing
list To post a message email: WEB400@xxxxxxxxxxxx To subscribe, unsubscribe,
or change list options,
visit: http://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives at
http://archive.midrange.com/web400.

--
This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400) mailing
list To post a message email: WEB400@xxxxxxxxxxxx To subscribe, unsubscribe,
or change list options,
visit: http://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives at
http://archive.midrange.com/web400.

--
This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400) mailing
list To post a message email: WEB400@xxxxxxxxxxxx To subscribe, unsubscribe,
or change list options,
visit: http://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives at
http://archive.midrange.com/web400.

--
This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400) mailing
list To post a message email: WEB400@xxxxxxxxxxxx To subscribe, unsubscribe,
or change list options,
visit: http://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives at
http://archive.midrange.com/web400.

--
This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400) mailing
list To post a message email: WEB400@xxxxxxxxxxxx To subscribe, unsubscribe,
or change list options,
visit: http://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives at
http://archive.midrange.com/web400.

--
This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400) mailing
list To post a message email: WEB400@xxxxxxxxxxxx To subscribe, unsubscribe,
or change list options,
visit: http://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives at
http://archive.midrange.com/web400.

--
This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400) mailing
list To post a message email: WEB400@xxxxxxxxxxxx To subscribe, unsubscribe,
or change list options,
visit: http://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives at
http://archive.midrange.com/web400.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.