- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- Re: URL decoding in DCL with Apache
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-26-2007 02:52 AM
тАО07-26-2007 02:52 AM
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-26-2007 03:54 AM
тАО07-26-2007 03:54 AM
Re: URL decoding in DCL with Apache
That written, a simple URL decode routine is probably a hundred lines of DCL; it's not a big deal.
If there are no other responses or pointers posted here, I'll post up some URL code in a week or so (depending on other project and other scheduled work), over at the HL site. (I've previously posted a basic DCL CGI topic, and forms- and URL-work would be a logical extension.)
The status of the DCL book is murky; I've not received a release or a notification from DP, indicating they're now done with it. But it's out of print.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-26-2007 04:15 AM
тАО07-26-2007 04:15 AM
Re: URL decoding in DCL with Apache
I've seen code examples for perl that are about ten lines. Why does it take 100 in DCL?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-26-2007 06:29 AM
тАО07-26-2007 06:29 AM
Re: URL decoding in DCL with Apache
"decode URLs"?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-26-2007 07:11 AM
тАО07-26-2007 07:11 AM
Re: URL decoding in DCL with Apache
And the reason it takes about a hundred lines is because DCL doesn't have a call-out capability, nor CGI-related extensions nor a library facility. So you roll explicit code in DCL, or you call into an executable image written in a compiled language, or you use perl or php or such.
Yes, php 4.3.10 is out-of-date. DCL itself is older.
The VAMP site doesn't look to be reachable, and I don't know if that's transient or permanent condition. On various other platforms, the xAMP sites have a packaged download containing all the giblets -- this for the platforms that don't have the xAMP giblets built into the base distro.
For some details on URL encoding, see
http://en.wikipedia.org/wiki/Percent-encoding
and a small herd of RFCs.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-26-2007 07:53 AM
тАО07-26-2007 07:53 AM
Re: URL decoding in DCL with Apache
I've watched "Desk Set" enough times to have
the phrase "never assume" well implanted in
my head.
I also wrote (4-DEC-2003) a DCL procedure to
handle a short test form when I was fooling
around with CGI, and an even simpler
procedure which I use to interpret the more
complexly coded stuff I see in my Web server
log. Some of this might be useful to the
original questioner, but I can't tell from
his question what he really wants.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-26-2007 08:01 AM
тАО07-26-2007 08:01 AM
SolutionIf you mean decoding extract parameters from the url I wrote a small procedure to do this:
$ url="http://test?a=1%44&b=x%21%23x&c="
$ query = f$element (1,"?",url)
$ if query.eqs."?" then goto done
$ paramidx = 0
$param_loop:
$ param=f$element (paramidx , "&" , query)
$ if param.eqs."&" then goto done
$ paramname=f$element (0,"=",param)
$ paramvalue=f$element (1,"=",param)
$ call decode "''paramname'" "pn"
$ call decode "''paramvalue'" "pv"
$! now you have the parameter name in the symbol PN
$! and the value in PV
$! substitute the next two lines with your code
$ write sys$output paramname,"=",paramvalue
$ write sys$output pn,"=",pv
$ paramidx = paramidx + 1
$ goto param_loop
$done:
$ exit
$decode: subroutine
$ val=""
$ rest=p1
$decodeloop:
$ part=f$element (0 , "%" , rest)
$ if part.eqs."%".or.part.eqs.rest
$ then
$ val = val + rest
$ 'p2'==val
$ exit
$ else
$ rest = f$extract (f$length(part) + 1, f$length(rest) , rest)
$ xn = f$extract (0,2,rest)
$ c[0,8] = %x'xn'
$ val = val + part + c
$ rest = f$extract (2,f$length(rest),rest)
$ endif
$ goto decodeloop
$ endsubroutine
It was not tested but you can see how to handle it. Also + signs are not converted to spaces!
Bojan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-26-2007 08:40 AM
тАО07-26-2007 08:40 AM
Re: URL decoding in DCL with Apache
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-26-2007 06:53 PM
тАО07-26-2007 06:53 PM
Re: URL decoding in DCL with Apache
After that, any part that could hold encoded chracaters could be examined and altered.
(Altered real-life) exmaple:
URL: http://server/cgi-bin/gateway/vxxx/1000/something?data1$data2"
or
OpenVMS Developer & System Manager
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-26-2007 07:04 PM
тАО07-26-2007 07:04 PM
Re: URL decoding in DCL with Apache
OpenVMS Developer & System Manager