Calling a URL length more than 200 from CLP

480 pts.
Tags:
AS/400 DB2
CLP
CLPROGRAM
DB2
RPG
Hi Techies,

I would like to call a URL by passing some input values and retrieve some values from the results.

1. The URL lenght is more than 200, with special characters like % " < / >

2.I need to retrieve values from the particular website.

Can u please help me out soon, its been getting tougher more.

The URl looks like

http://...................../.........test.dll?API=Verify&XML=<AddressValidateRequest%20USERID="XXXXXXXX">..........<City>ENGLand</City><State>NJ</State>........</Zip4></Address></AddressValidateRequest>

I tried using a CLP using the command STRPCCMD using Batch file, i cant format the URL in it.

Or can u please suggest of what can be done? is that possible from RPG or any As400 commands, any solution is appreciated.

Please give me a solution.

Thanks in advance

As400Dev

 



Software/Hardware used:
As400

Answer Wiki

Thanks. We'll let you know when a new response is added.

There is no “canned” command to do what you are describing. You could certainly create a command where the CPP (be it in CL or RPG) provides the application level function you generally describe.

Bruce Vining
<a href=”http://www.brucevining.com/”>Bruce Vining Services</a>

============================================

It’s just a stab, but maybe you could build on this:

what about a physical file with your URL or URL template.
The file could be defined with one field, multiple fields, subdivided fields.
In your CL
DCLF FILE(/TESTURL)
RCVF DEV(*FILE) /* READ A RECORD*/

Then refer to the field names as &variables to manipulate or use in cmds.

??? I don’t get to work with URLs, so maybe I’m way off base.

Discuss This Question: 1  Reply

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • TomLiotta
    I would like to call a URL ... and retrieve some values from the results. In a CLP? Not very likely. The URL lenght is more than 200, ... using a CLP using the command STRPCCMD STRPCCMD is limited to char(132) lengths for its commands, so STRPCCMD is out. But since you're handing it off as a PC command to be executed by a PC against some remote web server, how where you expecting any results from the web server to show up inside of your running CL program? The only possibility I could imagine is if your CL opened its own socket to the HTTP server and posted the request directly and received the reply. That would take some pretty involved ILE CL coding at V5R4 or later, but it could probably be done. I'd certainly want to do it in a HLL such as RPG before CL. You might want to review Scott Klement's HTTPAPI to see if it's suitable. Or perhaps some clarification of what you need done might help? Tom
    125,585 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following