× 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.



That will work. I'm not sure if the change has to be made before the JVM gets initialized, or before the point you call systools.httpxxxx. You could do it before you call the program. You can do it like you have and do it in the initialization process. Either should work. I just know about the issue because when we moved a package to a clients system it failed. In our case we changed QCCSID to 37 and made sure the user profiles all had *SYSVAL. Had them signoff and back on, and everything just worked. Personally I'm a big fan of not having QCCSID or user CCSID values set to 65535. If you don't have to deal with multiple CCSID's, just change it to a sane value.

On Tue, 2020-03-03 at 09:08 -0500, Robert Rogerson wrote:

@Kevin, I was getting an error when using Systools.HttpPostClob that turned

out to be ccsid=65535 related. In my program, in the Initialization

procedure, I coded


// Change the CCSID to 37 as some/most users have 65535 which causes the

program to abend

Exec sql


SELECT character_code_set_id


INTO :userCcsid


FROM QSYS2.USER_INFO


WHERE authorization_name = :psds.User;




Monitor;


cmdString = 'CHGJOB CCSID(37)';


Qcmdexc(cmdstring :%Len(cmdString));


On-error;


Endmon;


And then at the end of the program I added.


// Change the CCSID back to what it was

If userCcsid = '65535' or userCcsid = 'QCCSID';

Monitor;

cmdString = 'CHGJOB CCSID(*SYSVAL)';

Qcmdexc(cmdstring :%Len(cmdString));

On-error;

Endmon;

Endif;


This got rid of the error and the call to Systools.HttpPostClob completes

successfully. I'm wondering if I'm overlooking something as I understood

from your post that the chgjob had to be in the calling program.


Thanks,


Rob


On Tue, Mar 3, 2020 at 8:09 AM Kevin Bucknum <

<mailto:Kevin@xxxxxxxxxxxxxxxxxxx>

Kevin@xxxxxxxxxxxxxxxxxxx



wrote:


It's not something you change in the program, it has to be at the job

level. Do a chgjob ccsid(37) - or whatever ccsid you want to use - before

you run the program.

<https://www.ibm.com/support/knowledgecenter/ssw_ibm_i_73/rzajq/rzajqhttpoverview.htm>

https://www.ibm.com/support/knowledgecenter/ssw_ibm_i_73/rzajq/rzajqhttpoverview.htm



If your system is running 65535 you should probably look at the pros and

cons of changing it. Bruce Vining has a nice write up on it at the IBM

website.

<https://www.ibm.com/support/pages/what-impact-changing-qccsid-shipped-65535-another-ccsid>

https://www.ibm.com/support/pages/what-impact-changing-qccsid-shipped-65535-another-ccsid




On Mon, 2020-03-02 at 22:12 +0000, Kerwin Crawford via RPG400-L wrote:


I am looking at the program and am not sure where to put it. I have dried

a few places but did not work. Any ideas on where to put it?


I assume it is on this statement


exec sql select * into :latitude, :longitude


from json_table(systools.httpgetclob(:URL, ''),


'lax $.result.addressMatches[*]'


columns(


Latitude varchar(15) path '$.coordinates.y',


Longitude varchar(15) path '$.coordinates.x')


empty on error);



I have done it on sql scripts before. Usually in the select area like

this.


SELECT ENTRY_TIMESTAMP,


JOB_NUMBER CONCAT '/' CONCAT RTRIM(JOB_USER) CONCAT '/' CONCAT

RTRIM(JOB_NAME) AS JOB_NAME,


REMOTE_ADDRESS,


rtrim(cast(cast(substring(entry_data,2,10) as VARCHAR(10) for bit

data) as varchar(10) ccsid 37)) as User_Name


FROM TABLE(qsys2.display_journal(


'QSYS', 'QAUDJRN', -- Journal library and name


STARTING_RECEIVER_NAME => '*CURAVLCHN',


journal_entry_types => 'PW', -- Journal entry types


starting_timestamp => CURRENT TIMESTAMP - 48 HOURS)) -- Time

period



P#


Kerwin


IBMi Systems/Applications Programmer




-----Original Message-----


From: Kevin Bucknum [mailto:


<mailto:

<mailto:Kevin@xxxxxxxxxxxxxxxxxxx>

Kevin@xxxxxxxxxxxxxxxxxxx




<mailto:Kevin@xxxxxxxxxxxxxxxxxxx>

Kevin@xxxxxxxxxxxxxxxxxxx



]


Sent: Monday, March 2, 2020 3:30 PM


To:


<mailto:

<mailto:rpg400-l@xxxxxxxxxxxxxxxxxx>

rpg400-l@xxxxxxxxxxxxxxxxxx




<mailto:rpg400-l@xxxxxxxxxxxxxxxxxx>

rpg400-l@xxxxxxxxxxxxxxxxxx




Cc: Kerwin Crawford <


<mailto:

<mailto:kcrawford@xxxxxxxxxxx>

kcrawford@xxxxxxxxxxx




<mailto:kcrawford@xxxxxxxxxxx>

kcrawford@xxxxxxxxxxx





Subject: Re: challenging tasks? Got one to discuss?



If your CCSID is 65535 then yes, that would cause it to error out.



On Mon, 2020-03-02 at 21:07 +0000, Kerwin Crawford via RPG400-L wrote:



Booth, I have found some of your stuff interesting.



I just looked at this and thought, I need to try it.



I copied the two SQLRPGLE programs and the DSPF to my system. They

compiled without issue. I think that is a first.



I get these results.



Location Response



Street 2800 37th St NW Trial 1 failed: SQL code -332



City Rochester Trial 2 failed: SQL code -332



State MN Trial 3 failed: SQL code -332



ZIP 55901




I looked up -332 and it said "Character conversion is not defined." I am

not sure what conversion it is refering to.



Do I need to set up my CCID or something?







[

<https://www.medtronsoftware.com/img/MedtronMinilogo.bmp>

https://www.medtronsoftware.com/img/MedtronMinilogo.bmp

] Kevin Bucknum

Senior Programmer Analyst

MEDDATA / MEDTRON

120 Innwood Drive

Covington LA 70433

Local: 985-893-2550

Toll Free: 877-893-2550



<https://www.medtronsoftware.com>

https://www.medtronsoftware.com





CONFIDENTIALITY NOTICE


This document and any accompanying this email transmission contain

confidential information, belonging to the sender that is legally

privileged. This information is intended only for the use of the

individual or entity named above. The authorized recipient of this

information is prohibited from disclosing this information to any other

party and is required to destroy the information after its stated need has

been fulfilled. If you are not the intended recipient, or the employee of

agent responsible to deliver it to the intended recipient, you are hereby

notified that any disclosure, copying, distribution or action taken in

reliance on the contents of these documents is STRICTLY PROHIBITED. If you

have received this email in error, please notify the sender immediately to

arrange for return or destruction of these documents.

--

This is the RPG programming on IBM i (RPG400-L) mailing list

To post a message email:

<mailto:RPG400-L@xxxxxxxxxxxxxxxxxx>

RPG400-L@xxxxxxxxxxxxxxxxxx


To subscribe, unsubscribe, or change list options,

visit:

<https://lists.midrange.com/mailman/listinfo/rpg400-l>

https://lists.midrange.com/mailman/listinfo/rpg400-l


or email:

<mailto:RPG400-L-request@xxxxxxxxxxxxxxxxxx>

RPG400-L-request@xxxxxxxxxxxxxxxxxx


Before posting, please take a moment to review the archives

at

<https://archive.midrange.com/rpg400-l>

https://archive.midrange.com/rpg400-l

.


Please contact

<mailto:support@xxxxxxxxxxxx>

support@xxxxxxxxxxxx

for any subscription related

questions.


Help support midrange.com by shopping at amazon.com with our affiliate

link:

<https://amazon.midrange.com>

https://amazon.midrange.com





[https://www.medtronsoftware.com/img/MedtronMinilogo.bmp] Kevin Bucknum
Senior Programmer Analyst
MEDDATA / MEDTRON
120 Innwood Drive
Covington LA 70433
Local: 985-893-2550
Toll Free: 877-893-2550
https://www.medtronsoftware.com



CONFIDENTIALITY NOTICE

This document and any accompanying this email transmission contain confidential information, belonging to the sender that is legally privileged. This information is intended only for the use of the individual or entity named above. The authorized recipient of this information is prohibited from disclosing this information to any other party and is required to destroy the information after its stated need has been fulfilled. If you are not the intended recipient, or the employee of agent responsible to deliver it to the intended recipient, you are hereby notified that any disclosure, copying, distribution or action taken in reliance on the contents of these documents is STRICTLY PROHIBITED. If you have received this email in error, please notify the sender immediately to arrange for return or destruction of these documents.

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.