×
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.
<snip>
I have climbed the mountain today to find out if there is any existing code
or an API that will simplify parsing HTTP QueryStrings from RPG. I am
processing data and one of the fields being sent to us is a URL. I need to
extract some information from that query string. Obviously, parsing a
query string is fairly easy until you start having URL encoded values
("%20" and the like). We need to convert those sorts of values before
putting them in the database.
I am not one that likes reinventing the wheel and I find it hard to believe
something is out there that I just haven't found. I suppose if there is
not such a tool, there soon will be, because I am going to have to tackle
this issue one way or another.
</snip>If you want to parse the query string into a DB file format then take a look at QtmhCvtDb.
This API takes the query string and populates a DS or character string with the values. You pass it the name of the file and it will populate your DS/string with the query string data in the format of the file. It does something similar to eval-corr in that it will take the query parameters and populate the file fields with the same. Essesntially, it converts the query parameter data to the appropriate DB field data format (packed, zoned, etc) and then put it at the correct offset within the string.
I used it a long time ago and used an extname DS to hold the result. It worked quite well.
Not sure how you are getting this query string so don't know if this will help you with URL encoding. It is certainly an option for getting the data into the correct DB format though.
Cheers, and good luck
Larry Ducie
As an Amazon Associate we earn from qualifying purchases.
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.