× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Marty,

You seem to have a good grasp of the situation.  If the job CCSID is not 
65535 then the default job CCSID will always be set to the job CCSID.  If 
the job CCSID is 65535 then the default CCSID will be based solely on the 
language ID of the job.  If you are confident that the device CHRID will 
always be in synch with the langid of the job then you should be OK (but 
watch out for users traveling from one location to another where each 
location has a different device configuration).

For interactive jobs, the job name is the same as the name of the 
workstation or emulator session that you signed on to.

Do your users run the command directly from the command line?  If not, you 
may also want to check out the CHRIDCTL job attribute.  This defaults to 
*DEVD (take data from the device as is -- what you are currently seeing), 
but can also be set to values such as *JOBCCSID, *USRPRF, and *SYSVAL 
which can be used to have i5/OS do conversion from the device CHRID to a 
more appropriate CCSID.  This works well for display files, panel groups, 
and program prompted commands; but can be massively confusing when used in 
conjunction with the command line for user entered commands (for either 
direct execution or prompting from the command line).  If your users use 
the command line just ignore this paragraph.  If you prompt the comand for 
them you may want to play with the CHRIDCTL parameter. 

And not really relevant to your current situation but, for others who may 
come across this note, CHRIDCTL can also be specifed as the CHRID value 
for CRTDSPF and CRTPNLGRP -- providing a more granular solution than a job 
attribute for those not using commands for data entry.

Hope this helps,
Bruce Vining
 



"Urbanek, Marty" <Marty_Urbanek@xxxxxxxxxxxx> 
Sent by: midrange-l-bounces@xxxxxxxxxxxx
06/24/2006 10:40 AM
Please respond to
Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx>


To
<midrange-l@xxxxxxxxxxxx>
cc

Subject
job CCSID versus default CCSID, Interactive job name=device?






I've been having problems with a cmd and some programs that run in 
different countries. The problem deals with character conversions of 
variant characters. Unfortunately, the variant characters cannot be 
avoided and must be dealt with. 

There are two sources of these variant characters:
1 - input to command by user
2 - written by a program that was compiled in US under CCSID 37

First, these values are written to a physical file and then later copied 
to a stream file using CPYTOSTMF. This process can really make a mess of 
the variant characters under some conditions.

Based on experimenting, I've determined that:
1 - characted input coming from command will be in the code page of the 
device the user is typing on
2 - the data written by the program is always in CCSID 37 (it's a physical 
file so it is always 65535)

Therefore, when the same variant characters are written to the PF from the 
two sources and the device is not using CP 37, there can be two different 
sets of hex values for the same characters.

http://archive.midrange.com/rpg400-l/200301/msg00321.html

Based on the post above by Bruce Vining and reading in Info Center, I need 
to get the program to write its data in the same CCSID as the command by 
having the program figure out what values to use for the variant 
characters it writes rather than writing hard coded values. Once this is 
accomplished, all the data in the PF will be in the same CCSID and then I 
can explicitly specify the CCSIDs to use on the CPYTOSTMF command.

I have all of this working, but I have a couple of questions:

1 - In trying to retrieve the job CCSID via RTVJOBA, I've run across the 
"regular" CCSID versus the "default" CCSID. Although I've read the help 
text and I understand literally what it is saying, I'm confused as to 
which one to use and what it really means in practice. For example, if my 
system has QCCSID=37, my user profile says CCSID=65535 and my terminal 
device is CP 297, the job attributes say CCSID=65535 but DFTCCSID=297 
(langid=FRA). DFTCCSID ssems to work for me. It is also possible that I am 
setting up test scenarios which are not valid, but it is always nice to 
handle or at least detect crazy configurations with the program rather 
than a support call.

2 - To retrieve the code page of the terminal, I've been using RTVJOBA to 
get the interactive job name and then use that to call QDCRDEVD API. In my 
experience, this is what I have seen, but is it really safe? Is the 
interactive job name always equal to the device name you are signed in on 
(assuming command is run interactively)?

Thanks,
-Marty


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.