|
You need to describe in more detail how you are performing your test.
If, for example, you simply did a CHGJOB CCSID(273) and then entered a @
at a CCSID 37 terminal using a *DSPF with CHRID(*DEVD) then you would, in
debug, see a §.
You would also get the same § if you had your job in 37, the device was in
273, and the *DSPF was CHRID(*DEVD).
If you have the job in 273 and the device in 273 then you should get @.
What is your job CCSID?
What is your *DEVD CCSID (CHRID)?
What CCSID is the display device configured to be using?
What is your *DSPF CHRID setting? (the default is *DEVD, which is
essentially 65535 -- no conversion between the job and the device)
Bruce (who is off to Las Vegas and the RPG/DB2 Summit shortly)
Ashish Kulkarni <ashish.kulkarni13@xxxxxxxxx> wrote:
Hi
I did used
eval At_Sign = u'0040'
in my RPG code and i get @ sign no matter what the CCSID is (did not try
with 65535 as most of our systems are set not to use this)
But i have another issue now, i ask the user to enter the email address in
a
screen as input,
But if the CCSID is not 37 then i get different value for @ sign in my
RPGLE
program.
For example if i set CCSID as 273 then i get § instead of @ sign, even if
the user enters @ sign
So how do i convert this input value to @ sign for validation and then
inserting in database
Ashish
On Fri, Oct 17, 2008 at 1:54 PM, Bruce Vining wrote:
This Bruce V. does NOT agree ;)65535.
The system will take care of the conversion IF the job CCSID is NOT
But if the job CCSID is 65535 then no conversion will occur.you'll
Using the Unicode to Character approach I proposed in an earlier append
the conversion will take place in either case. If the job CCSID is not
65535 you'll get At_Sign in the job CCSID. If the job CCSID is 65535
get At_Sign in the job default CCSID. Since the job default CCSID willthing.
always match the job CCSID (except for the 65535 case) this means you'll
always get At_Sign in the "most likely correct" CCSID.
This is not true when using database conversion support.
Bruce Vining
Bruce Vining Services
Vern Hamberg wrote:
One technique is to put literals like the @ sign into a CCSID-tagged
field in a PF - it can even be tagged with 37. Then when it is brought
into your program, the system takes care of converting to the right
copied,
That's what a support guy at IBM said, and Bruce V. seemed to agree.
Vern
Takken, Cor wrote:
You don't want to check an email address only by the presence of therecipient(s) only. It may contain proprietary material, confidential
@-sign. A much better idea is to check it using regular expressions.
This will not remove the limitation of the CCSID, however there must be
a way to represent the string to check in unicode or the likes.
Just my incomplete 2 cents,
Cor
-----Original Message-----program,
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-
bounces@xxxxxxxxxxxx] On Behalf Of Ashish Kulkarni
Sent: vrijdag 17 oktober 2008 13:25
To: RPG programming on the AS400 / iSeries
Subject: Validate Email address in RPGLE
HiDoes anyone have sample of validating email address in RPGLE
For example in RPGLE i can write
'@':1 Scan $1SeMail @Pos
If @Pos = 0
//process error here
endif
But this code will only work if CCSID is 37, as @ will be valid only
for
CCSID 37, but what is CCSID is different.
How do i check for the character,
Does anyone have any idea or sample code to do so
Ash
--
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing
list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.
This e-mail and any attachment is for authorised use by the intended
information and/or be subject to legal privilege. It should not be
disclosed to, retained or used by, any other party. If you are not anlist
intended recipient then please promptly delete this e-mail and any
attachment and all copies and inform the sender. Thank you.
--
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing
To post a message email: RPG400-L@xxxxxxxxxxxxlist
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.
Bruce
Bruce Vining Services
507-206-4178
--
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing
To post a message email: RPG400-L@xxxxxxxxxxxx--
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.
Bruce
Bruce Vining Services
507-206-4178
--
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.
As an Amazon Associate we earn from qualifying purchases.
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.