Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Maybe a problem with AS400Message #174

Open
4E71-NOP opened this issue Apr 14, 2024 · 1 comment
Open

Maybe a problem with AS400Message #174

4E71-NOP opened this issue Apr 14, 2024 · 1 comment

Comments

@4E71-NOP
Copy link

Hello,

First of all. Awesome tools!!! Keep it alive.


I'm not sure it's a bug but I can't find a workaround on this issue. I have trouble with the returned messages from a command.

Synptoms

I do something like this.

            // commandTerm type is CommandCall
            retResp = commandTerm.run(cmd);
            if (!retResp) {
                StringBuilder errorMessages = new StringBuilder();
                AS400Message[] l1 = commandTerm.getMessageList();

                for (int i = 0; i < l1.length; i++) {
                    errorMessages.append(l1[i].getSeverity() + " : " + l1[i].getText() + "\n");
                }
		// some code to log somewhere

            }

I get :

30 : Non autorisä § la commande XXXXX de la bibliothüque *LIBL.
30 : Erreur trouväe dans la commande XXXXX.

instead of:
30 : Non autorisé à la commande XXXXX de la bibliothèque *LIBL.
30 : Erreur trouvée dans la commande XXXXX.

for french localization.


I was connected to PUB400.com

dspsysval qccsid shows:
[...]
Coded character set                          
  identifier . . . . . :   273        1-65535

State of the entry in the array

textCcsid = 65535
l1[i].getTextCcsidConversionStatusIndicator() = 1

"1 No conversion occurred because either the message or message help text was 65535 or the CCSID you wanted the message or message help text converted to was 65535."

History

I tried to use textConverter, AS400Text but it's worst.

Conclusion

To me :

  • It seems something went wrong converting text I received.
  • or I do something wrong like a missing parameter somewhere (I mean provide more parameters).

We're left with

  • If there is something I should have done the proper way, pls tell me the things I should check ? (like provide the local CCSID etc)
  • If there something wrong what would be the workaround ?

Nota Bene : is not exclusive to french.

Thx for your time.

@jeber-ibm
Copy link
Member

It could be that the CCSID is not set correctly for the job handling the command request. Typically, that CCSID will come from the user profile of the connecting user. You can start by checking the profile of the user that is connecting to make sure it is not 65535.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants