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



Or you could use the built in sql functions.
**FREE
Dcl-S url varchar(2048);
Dcl-s result varchar(2048);
url = 'OAN_BORROWER%22,%22payload%22:[%7B%22loanNumber%22:2428%7D]';
Exec Sql Values(systools.urldecode(:url,'UTF-8')) into :result;
*Inlr = *On;
Return;

-----Original Message-----
From: MIDRANGE-L [mailto:midrange-l-bounces@xxxxxxxxxxxxxxxxxx] On Behalf Of Jay Vaughn
Sent: Thursday, February 14, 2019 10:31 AM
To: Midrange Systems Technical Discussion
Subject: Re: Help With Getting HTTP Server running

here is how i'm going to deal with it so that the front end guy is not burdened with it...

in my rpgle pgm..

EVAL jsonINP
jsonINP =
....5...10...15...20...25...30...35...40...45...50...55...60
1 '%7B%22env%22:%22D3X%22,%22command%22:%22GET_L'
61 'OAN_BORROWER%22,%22payload%22:[%7B%22loanNumber%22:2428%7D]%'
121 '7D


jsonINP = %scanrpl('%7B'
:'{'
:jsonINP);

jsonINP = %scanrpl('%7D'
:'}'
:jsonINP);

jsonINP = %scanrpl('%22'
:'"'
:jsonINP);

and wala...

EVAL jsonINP
JSONINP =
....5...10...15...20...25...30...35...40...45...50...55...60
1 '{"env":"D3X","command":"GET_LOAN_BORROWER","payload":[{"loan'
61 'Number":2428}]}


sometimes just not worth the risk of leaving it up to others.. and considering the fact i'm using a rather unorthodoxed way with this whole process I better assume that responsibilty...

now last thing is to have the YAJL produce back out the generate json output and I'm done!

Jay







On Thu, Feb 14, 2019 at 11:09 AM Nadir Amra <amra@xxxxxxxxxx> wrote:

You have to deal with the decoding, that is part of the HTTP standard
with regards to what characters may be specified on a URL. So browser
encodes before sending.






"MIDRANGE-L" <midrange-l-bounces@xxxxxxxxxxxxxxxxxx> wrote on
02/14/2019
09:47:58 AM:

From: Jay Vaughn <jeffersonvaughn@xxxxxxxxx>
To: Midrange Systems Technical Discussion
<midrange-l@xxxxxxxxxxxxxxxxxx>
Date: 02/14/2019 09:57 AM
Subject: Re: Help With Getting HTTP Server running Sent by:
"MIDRANGE-L" <midrange-l-bounces@xxxxxxxxxxxxxxxxxx>

thanks Bradley - still not quite what i'm looking for...

i think i may just about have it with the SK yahlserver setup...

so I can now reach my endpoint...

my iseries YAJL pgm gets called but there seems to be some encoding
going
on that is throwing off my json string...

This is what I'm calling from ARC using the GET method...

/rest/wsr00000/{"env":"D3X","command":"GET_LOAN_BORROWER","payload":
[{"loanNumber":2428}]}

in debug over on the i, I get this interpretation of it...

EVAL l_url
L_URL =
....5...10...15...20...25...30...35...40...45...50...55...60
1 '/rest/wsr00000/%7B%22env%22:%22D3X%22,%22command%22:%22GET_L'
61 'OAN_BORROWER%22,%22payload%22:[%7B%22loanNumber%22:2428%7D]%'
121 '7D

how can I preserve the original string format of the json input?

Ive tried enclosing the json input string in single quotes but no luck.

I've also tried an escape version of the string with no luck...
{\"env\":"D3X",\"command\":\"GET_LOAN_BORROWER\",\"payload\":
[{\"loanNumber\":2428}]}


any suggestions? almost there!

Jay




--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx To
subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives at
https://archive.midrange.com/midrange-l.

Please contact support@xxxxxxxxxxxx for any subscription related
questions.

Help support midrange.com by shopping at amazon.com with our affiliate
link: https://amazon.midrange.com

--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives at https://archive.midrange.com/midrange-l.

Please contact 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://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.