Search found 887 matches

by Scott Klement
Wed Jul 09, 2025 11:27 pm
Forum: RPG IV
Topic: Trimming prototype/interface variables only works with certain lengths
Replies: 5
Views: 8423

Re: Trimming prototype/interface variables only works with certain lengths


If, however, I set my prototype to expect something longer--say, char(50)--but still only provide a string value that is 7 characters long, by default my CALL will still be sending a char(32) (7 chars + 25 blanks), but then some junk values (not necessarily blanks) will be in in the remaining 18 ...
by Scott Klement
Wed Jul 09, 2025 11:20 pm
Forum: HTTPAPI
Topic: v1.52 - Getting "Pointer not set" error on http_url_post_stmf() call.
Replies: 1
Views: 617

Re: v1.52 - Getting "Pointer not set" error on http_url_post_stmf() call.

What error did you receive? You provided the call stack entries that the error message was sent from/to, but you didn't provide the message itself.
by Scott Klement
Wed Jul 09, 2025 11:09 pm
Forum: YAJL-ILE
Topic: Using CCSID 1208 - accent characters
Replies: 5
Views: 15996

Re: Using CCSID 1208 - accent characters


When we make the http_req, we get a bad request. The API host is telling us that it should be encoded properly.


As far as I can tell, you are generating the JSON, not the remote host. Why would you ask them if their document is encoded properly?


We are using yajl and from what I am reading ...
by Scott Klement
Fri Jun 27, 2025 11:16 pm
Forum: RPG IV
Topic: Trimming prototype/interface variables only works with certain lengths
Replies: 5
Views: 8423

Re: Trimming prototype/interface variables only works with certain lengths

Yes, this has always been the case from day 1. The CALL command when used from the command-line ALWAYS defines character fields as CHAR(32) and ALWAYS defines numeric fields as PACKED(15, 5)

Nothing new about this. Its been this way since the AS/400 was originally introduced in 1988.

If you ...
by Scott Klement
Fri Jun 27, 2025 11:09 pm
Forum: RPG IV
Topic: Red x on display file
Replies: 3
Views: 45914

Re: Red x on display file

There are commercial tools that provide a full 5250 emulator (including all the 5250 buttons like error reset) for touch displays. You'll either need to get one of those, or... stop using 5250 and make a better UI for a touch display.
by Scott Klement
Fri Jun 27, 2025 11:07 pm
Forum: HTTPAPI
Topic: Invoke google api using JWT oauth2 with RSASHA256 encryption
Replies: 1
Views: 13524

Re: Invoke google api using JWT oauth2 with RSASHA256 encryption

Hello,

Yes, its possible.

Midrange Dynamics has a product called MDRest4i that has routines to generate JWT tokens using RSASHA-256 that are written in RPG and are aimed at RPG programmers. So that might work, assuming your OAuth2 is using JWT tokens (This is commonplace.)

You could also write it ...
by Scott Klement
Wed Jun 25, 2025 5:10 pm
Forum: HTTPAPI
Topic: Web service & content-type application/x-www-form-urlencoded
Replies: 2
Views: 12732

Re: Web service & content-type application/x-www-form-urlencoded

Please don't convert the debug log to a Word document or PDF, just send the original document unaltered. Changing it to these document formats can change the way blank lines are handled, the way characters are translated, etc. Just send the original document unchanged so I can see the details as ...
by Scott Klement
Wed Jun 25, 2025 5:17 am
Forum: HTTPAPI
Topic: HTTPAPI 1.51 minor errors
Replies: 2
Views: 13078

Re: HTTPAPI 1.51 minor errors

Thanks. I don't currently have an IBM i that I have FTP access to, so its hard to test that.

There's no good way to preserve the member text with FTP. I recommend using the save file or install via Git if the member text is important to you.

I've updated the website to 1.52 and hopefully the other ...
by Scott Klement
Tue Jun 17, 2025 3:30 pm
Forum: YAJL-ILE
Topic: YAJLINTO handling varying number of array records
Replies: 9
Views: 28833

Re: YAJLINTO handling varying number of array records


My JSON response has a data item called __Metadata which luckily I don't need so have ignored.


DATA-INTO has an option case=convert. This converts the JSON name into a valid RPG variable name.


data-into Root
%data(%trim(ifsfile)
: 'doc=file case=convert allowextra=yes allowmissing=yes ...
by Scott Klement
Mon Jun 09, 2025 4:24 pm
Forum: YAJL-ILE
Topic: YAJLINTO handling varying number of array records
Replies: 9
Views: 28833

Re: YAJLINTO handling varying number of array records


I have implemented a temporary work around on this one (in case it helps anyone else in the future).

The program/API will only get called once per day so +nanoseconds extra run time is irrelevant.

I have reverted back to the code from my original post, but just before executing the data-into ...