Search found 93 matches

by jonboy49
Thu Nov 10, 2022 8:15 pm
Forum: General
Topic: Web Services
Replies: 1
Views: 108

Re: Web Services

My first thought was that we all deal every day with systems that are massively web service based. Facebook, Amazon, Airline systems, UPS, Fedex, and on and on. They are a fact of life in modern application design. My second thought was "What are your alternatives". You say you are receivi...
by jonboy49
Thu Nov 03, 2022 10:06 pm
Forum: RPG IV
Topic: Load same data into multiple fields in one line of code
Replies: 3
Views: 156

Re: Load same data into multiple fields in one line of code

If you check the definition for prefix() you'll see that there is an option to specify a number of characters to strip off the existing name before adding the prefix. So you could achieve the renaming by saying Prefix( '' : 1 ) which would result in all the fields being named customer. Needless to s...
by jonboy49
Thu Nov 03, 2022 4:50 pm
Forum: RPG IV
Topic: Load same data into multiple fields in one line of code
Replies: 3
Views: 156

Re: Load same data into multiple fields in one line of code

Well the simple answer would be to stop using prefix on the file definition. That way all those fields on all files would share the same single piece of storage and an update to that value followed by an update to all of the files would do the job. Whether that would work or not depends on why prefi...
by jonboy49
Wed Nov 02, 2022 4:15 pm
Forum: HTTPAPI
Topic: HTTPAPI Timeout question
Replies: 3
Views: 87

Re: HTTPAPI Timeout question

Most of the APIs in HTTPAPI offer an optional timeout parameter Darryl which allow you to specify the timeout delay in seconds. For example: D http_get PR 10I 0 extproc('HTTP_URL_GET') D peURL 32767A varying const options(*varsize) D peFilename 32767A varying const options(*varsize) D peTimeout 10I ...
by jonboy49
Fri Oct 28, 2022 3:07 am
Forum: RPG IV
Topic: Sleep API not working correctly in sub-procedures
Replies: 2
Views: 80

Re: Sleep API not working correctly in sub-procedures

Your prototype is wrong. You are passing by reference (a pointer) when sleep() - as do most C library functions- requires the value be passed by VALUE. You code is never seeing the value you set - rather it is using the pointer to that value which could equate to any period of time. Proto should be:...
by jonboy49
Thu Oct 20, 2022 9:39 pm
Forum: YAJL-ILE
Topic: Error 1002
Replies: 5
Views: 238

Re: Error 1002

I just used your code as-is - except that I added doc=file to read in the json you supplied - no errors. So you're going to have to show some json that actually makes it go wrong - cos the stuff you posted works fine! You could use a few countprefix fields for your arrays so that you can easily tell...
by jonboy49
Thu Oct 20, 2022 7:56 pm
Forum: YAJL-ILE
Topic: Error 1002
Replies: 5
Views: 238

Re: Error 1002

P.S. I just ran your json through the program generated by YAJLGEN and had no errors. So there has to be something in your definitions that is causing the issue.
by jonboy49
Thu Oct 20, 2022 7:44 pm
Forum: YAJL-ILE
Topic: Error 1002
Replies: 5
Views: 238

Re: Error 1002

Basically a 1002 error is saying the data is invalid for the intended target. Since you didn't post the DS you are using or the DATA-INTO itself we have no idea what it might be.

Show us the code and we'll have a better idea.
by jonboy49
Thu Oct 13, 2022 9:38 pm
Forum: HTTPAPI
Topic: HTTPAPI Performance questions
Replies: 15
Views: 478

Re: HTTPAPI Performance questions

I did! Look at what I said. Here's a small extract of your source (with spacing added) wrapped in code tags // ---------------------------------------------------------- // Procedure interface - passed Parameters // ---------------------------------------------------------- dcl-pi json_05 extpgm; pC...
by jonboy49
Thu Oct 13, 2022 4:34 pm
Forum: HTTPAPI
Topic: HTTPAPI Performance questions
Replies: 15
Views: 478

Re: HTTPAPI Performance questions

Can you please edit the post to put code tags around the source so it is readable.
i.e. the word code in square brackets [ ] use /code to end it.

Code: Select all

    That will    produce correctly   spaced results like this    ssss