- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- Apache DCL Scripts
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
Forums
Discussions
Discussions
Discussions
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
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
02-22-2004 08:58 PM
02-22-2004 08:58 PM
Apache DCL Scripts
Some of the functions require the web server to spawn a batch job, which returns information back to the server process (through logicals).
The problem is that if the end user hits the stop button, or clicks on another link, it aborts the session, and the DCL script, before the two components have communicated so things get out of synch.
My question is, does anyone know how to stop the user being able to abort the current DCL script? I've tried the obvious like 'set nocontrol=(y,c)' but that doesn't work!
Cheers, Rob.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2004 11:54 PM
02-22-2004 11:54 PM
Re: Apache DCL Scripts
Sorry, no answer, but: do I read you correctly, you have Apache webserver using DCL scripts? I am very interested in something like that.
Not being in development, but in SystemManagement, I officially do no programming, but I can advise on good practice. If I can show a rather easy, rather simple (as in DCL) method to access VMS applications (and for this comparison I view CMS as an example application) then it could save us a lot of work, and hopefully also a lot of misery in half-functioning web-apps on half-functioning micro$oft systems.
No to mention that it might slow down (prevent?) the drain on VMS applications onto "nicer ( = webbrowser-based) platforms.
If you would be willing to help me, mail it to jpe@vdende.demon.nl
If you think it is generic enough to help more people, then a post at openvms.dcl is even better.
If I have the DCL, I will certainly look into your question! (if only because I might run into it myself).
TIA
Jan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-23-2004 12:18 AM
02-23-2004 12:18 AM
Re: Apache DCL Scripts
as Jan I'm interesting into DCL application with web.
Please post more info to help us!
@Antoniov
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-23-2004 12:31 AM
02-23-2004 12:31 AM
Re: Apache DCL Scripts
You need to tell Apache (or WASD) that the command file is exectable :-
ScriptAlias /cms-cgi/ "/cms$system/"
You then place all of your command files in this area, or alternatively whereever your current CGI-BIN directory is located.
You then create a command file and get it to write out the HTML page through SYS$OUTPUT, which is directed to the browser client by the web server.
For Apache, the first thing you output must be :-
$ WRITE SYS$OUTPUT F$FAO("!AS!/!/","Content-type: text/html")
otherwise you get an internal error.
I also use CGIUTL, stolen from the WASD package to 'decode' forms into DCL symbols and/or files, so that I can have the user submit various forms of data and make the web pages interactive.
Using these two basic principles, I create a dynamic, interactive database around CMS that is driven by a web server.
I've attached one of the CMS modules, there are around 60 in all, to show you what I mean.
If I can explain anything further, I'm happy to.
Rob.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-23-2004 12:36 AM
02-23-2004 12:36 AM
Re: Apache DCL Scripts
But if like me your a DCL nut-head (and it sounds like you both are) then go for it!!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-23-2004 01:58 AM
02-23-2004 01:58 AM
Re: Apache DCL Scripts
thanks you!
I will try it next days!
:-)
@Antoniov
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-23-2004 02:30 AM
02-23-2004 02:30 AM
Re: Apache DCL Scripts
I will definitely get some use out of this!
Jan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-24-2004 12:27 AM
02-24-2004 12:27 AM
Re: Apache DCL Scripts
>>>>>
I also use CGIUTL, stolen from the WASD package to 'decode' forms into DCL symbols and/or files, so that I can have the user submit various forms of data and make the web pages interactive.
<<<<<<<
Obviously (I hope) this is what I am lacking.
What exactly is it, and/or where do I get it?
Is there any more of this _to_me_not_so_trivial_ stuff that I need?
Thanks/
PS.
I did not find any spawning? That way I can not even look whether I might help you with your question...
Jan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-24-2004 01:56 AM
02-24-2004 01:56 AM
Re: Apache DCL Scripts
It's then a case of unpacking and following the installation instructions, to get the utilities.
You can visit the demo server - http://wasd.vsm.com.au/ - to have a look at what the utilities do.
Make sure you check out ConanTheLibrarian, it's a brilliant little utility for viewing libraries.
I'd have to say that WASD is about the best Web Server I've ever come across, but it's written and supported by one mad Australian, Mark Daniels, so for a critical environment is not a good choice.
How no commercial company hasn't offered Mark a fortune for the software I'll never know!
Regarding the SPAWN. It's not actually a spawn, but a SUBUSER (SUBMIT/USER=) I do. The command file it runs actions the request, using the account for the logged on user rather than the server account, and then sets a number of logicals to tell the web server it's complete.
You can similate my problem though using this script :-
$ SET ON
$ ON ERROR THEN GOTO PROBLEM
$ WAIT 00:10:00
$ EXIT
$PROBLEM:
$ REPLY /ALL "WEB SERVER HAD A PROBLEM!!"
$ EXIT
Simply run this as a CGI program, and hit the STOP button on your browser to have the command file terminate and send the message.
It's this type of problem I want to stop.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-24-2004 01:56 AM
02-24-2004 01:56 AM
Re: Apache DCL Scripts
http://wasd.vsm.com.au/wasd/
parhaps one of the scripts packages is what you want.
Purely Personal Opinion
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-24-2004 02:02 AM
02-24-2004 02:02 AM
Re: Apache DCL Scripts
Have I really got the VMS Guru's stumped on this one.......
Will no one answer my plea.......
Can Batman really save Robin from the evil Dr Dread......
......Tune in next week for another trilling installment.
Nana, Nana, Nana, Nana - Nana, Nana, Nana, Nana - BATMAN!!!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-24-2004 08:42 AM
02-24-2004 08:42 AM
Re: Apache DCL Scripts
$ ON CONTROL_Y THEN GOTO DO_SYNC
$ ON ERROR THEN GOTO SYNC_TO
$ DO_SYNC:
$
etc...
_JB_
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-24-2004 06:13 PM
02-24-2004 06:13 PM
Re: Apache DCL Scripts
Btw : I hope they implement "ON STOP" or "ON KILL" some day.
If a client disconnects from a running script (by hitting the browser Stop button, or selectinganother hyperlink) the loss of network connectivity is detected by the server at the next output write. Generally it is necessary for there to be some mechanism for a client to stop long-running(and presumably resource consuming) scripts. Network disconnection is the only viable one. Experience would indicate however that most scripts are short running and mostdisconnections are due to clients changing their minds about waiting for a page to build or having seen the page superstructure moving on to something else. With these considerations in mind there is significiant benefit in not running-down ascript immediately the client disconnection is detected. A short wait will result in most scripts completing their output elegantly (the script itself unaware the output is not beingtransmitted on to the client), and in the case of persistent scripts remaining available for the next request, or for standard CGI the process remaining for use in the next CGI script. The period allowing the script to complete it's processing may be set using the HTTPD$CONFIGconfiguration directive
DclBitBucketTimeout]. It should be set to say fifteen seconds, or whatever is appropriate to the local site.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-24-2004 08:04 PM
02-24-2004 08:04 PM
Re: Apache DCL Scripts
actually, what you want is that the user is NOT able to follow another link or quit the browser.
If this happens, as you said the _session_ is aborted, meaning the process is deleted, but batchjobs started will continue. this is (happily enough) normal behaviour.
I think you'll need some form of handshake between the batch process and the process started by Apache. To give you an idea:
* Let the process started by Apache, pass info to the batch-job stating it's presence. Either as parameter, logicals or passed via a mailbox or socket. data could be PID, processname, CGI-data like WWW_REMOTE_USER etc. The only requirement is that if the "parent process" dies, this data is gone as well.
* The batch process will check the existence of the "parent process" before and after updates have been done. You can do it one change at a time, or the whole bunch together.
* Changes are not committed unless the parent process has been notified, which in turn has signalled the user and received a confirmation of commit.
* if NOT committed, chnages are to be reversed.
HTH
Willem
OpenVMS Developer & System Manager
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-24-2004 08:07 PM
02-24-2004 08:07 PM
Re: Apache DCL Scripts
This is just not a practical solution, so I still need a way of stopping the web server from aborting the command file.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-24-2004 09:00 PM
02-24-2004 09:00 PM
Re: Apache DCL Scripts
it's not clear in my mind the exact terms of your problem. Correct me if I wrong.
You have a client that open a web session and obviuosly create a new process on server; this process run a DCL script interactively with clien request.
A request can start a batch job and when batch has terminated send back info about its own results; process script recevied info and show theese info to web page.
Now your problem is: when web client hit stop or change link, DCL script abort (but obviusly batch continue his work).
My question is:
a) If web client hit stop, this means he wants halt, so there is not problem to send back any information; perhaps you would stop batch job?
b) if web client change link, may be operator will return on same session a few time after, but in this case DCL script was aborted and it's not possible find any information on previous session (because http protocol has not any session support); do you retrieve information of previous session in this case?
c) what does happen if web client send refresh page request?
d) HTML standard permit you hide all browser button: this is very hard solution, is it good for you?
Sorry for long sentence but my english is very poor!
@Antoniov
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-24-2004 09:06 PM
02-24-2004 09:06 PM
Re: Apache DCL Scripts
your description of the problem is fairly accurate.
If the user is just viewing information, it doesn't matter if he hits STOP. When the user requests information to be updated, he cannot hit STOP because only half of the information is updated.
So, I need some way of being able to ingore the STOP button, or anything else that aborts the server process.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-24-2004 09:40 PM
02-24-2004 09:40 PM
Re: Apache DCL Scripts
in this moment I don't remember how make, but I'm sure it's possible disable browser button. Today I'll read my HTML book to refresh my mind and tomorro I can send you this information.
@Antoniov
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-24-2004 09:45 PM
02-24-2004 09:45 PM
Re: Apache DCL Scripts
That's why this has to be done on the server and not the client.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-24-2004 10:12 PM
02-24-2004 10:12 PM
Re: Apache DCL Scripts
I don't think there an answer other than something similar to what I suggested.
So, I need some way of being able to ingore the STOP button, or anything else that aborts the server process.
As said: you don't want the remote user to end this session as long as the process runs. Actually: you'd like to prevent him to switch off his machine, unplug the network... You are no dounbt aware that you shouldn't under-estimate the user's creativity (and certainly not if he's a professional computer-user!).
You will get exactly the same problem in case of failure of external origins: connection, power...It may be even worse, since this may not involve just one user, but hundreds. I don't know your environment in that matter but if it involves a lot of users, you'll have a lot of discrepancies - and a lot of reversing to do.
Really, No Kidding.
Since you have no control over the user's behaviour, you'll have to take precautions within your application, so the work, once started, will be finished completely (no matter what), or can be reversed easily.
Since the latter is no option, you'll need some form of protocol, where the remote user can add what he wants, confirms it and has to acceept the work is done as he said. Even if he 'logs out' (that's what he does by closing the browser)
OpenVMS Developer & System Manager
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-24-2004 10:24 PM
02-24-2004 10:24 PM
Re: Apache DCL Scripts
Let me expand on the application a little.
There are a set of master files, PROJECT.MAS, ELEMENTS.MAS and DIARY.MAS. These are all part of my WebCMS application and are updated by the web server process.
When the user reserves an element the web server submits a batch job that does some critical checking (i.e. can this element be reserved, does it exist, etc) then reserves the element.
It then reports back to the web server process as to the success or failure of reservation/s. The web server then updates the master files with new and amended details.
If the user has hit the STOP button, taken another like or a variety of other things, the web server ignores waiting for the reponse back from CMS and goes onto the next instruction. This then gets the WebCMS database out of synch with the CMS database.
One solution I thought about is to have the batch job do all of the updating, but for actions that don't always require CMS, this would make the response a lot slower than need be (because of the overhead of starting a batch job).
It would also mean I have to rewrite an awful lot of code, to have the batch job o the work instead of the web server.
All of this just so that the user can't do the equivilent of CTRL-C !!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-25-2004 12:38 AM
02-25-2004 12:38 AM
Re: Apache DCL Scripts
my opinion there is not direct solution for your problem.
Stopping process id depending from web client so you need control the browser: you have not any alternative! Otherwise you have create a new process indipendent from web client (as batch job or via loginout.exe).
I think in both way you have to rewrite a lot of software.
On cliente side, if you will not disable all button (I agree it's a bad choice) you can make quite nothing; HTML can't help you; Javascript can inform you about some events but they don't solve the problem (for example you can know when end user move mouse out of the windows); VBAscript permit you more control but is limited to IE (no Netscape neither Opera or Konquedor).
Another way is using cookie; you could store information on web client and restore theese information when new session starts to resync database.
You know your software so you can think what's best path to walk: I can only post information about various standard or feature.
@Antoniov
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-25-2004 06:26 PM
02-25-2004 06:26 PM
Re: Apache DCL Scripts
Split it up.
Just an idea:
1. Check, report data is Ok, ask for confirmation. Batchjob stops
2a. User as stopped: nothing wrong. Forget about it...
2b. User confirms - starts another jobv doing the reservation. All of it. Reports, job stops.
3a. User has gone: well, all has been reservered and will stay that way.
3b. User does not retrieve the file. No trouble! It will stay 'reserved'.
3c. User retrieves the file. Could be directly, but at a later stage as well, depending on your implementation.
4. After some time, you'll need to 'unreserve' files that have been reserved in 2b, but were never retrieved. Could be within hours if no answer was returned after 2b, could be days later. Anyway, this will be a regular process, perhaps to be run at 'quit times' (No access to the WebCMS application, I guess).
That way, no matter what happens, there will be just ONE transition in each program:
* check data
* Checked -> reserved
* reserved -> downloaded or
* reserved -> unreserved
Willem
OpenVMS Developer & System Manager
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-25-2004 06:44 PM
02-25-2004 06:44 PM
Re: Apache DCL Scripts
If the system crashes, the stop button is used, IE is stopped, webserver crashes, ... you can end up with a mess.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-25-2004 06:54 PM
02-25-2004 06:54 PM
Re: Apache DCL Scripts
It then reports back to the web server process as to the success or failure of reservation/s. The web server then updates the master files with new and amended details.
this is exactly the point that introduces the discrepancies. The batchjob should ONLY report. Changes in data should either be part of this batchjob - as part of the reporting. Never by the server process because of the batchjob. The server process will only INITIATE the action. Each batchjob could than refer to the saved state of the previous one.
One solution I thought about is to have the batch job do all of the updating, but for actions that don't always require CMS, this would make the response a lot slower than need be (because of the overhead of starting a batch job).
The checking could well be done by the server process.
If batch is too slow, consider a detached process that is contacted (mailbox, socket) to handle the request for reservation. Part of the report _could_ be the update of the state of the request completely, or (What would be miy apporach) both web-based process (to initiate) and batch (to finalize).
It would also mean I have to rewrite an awful lot of code, to have the batch job do the work instead of the web server.
All of this just so that the user can't do the equivilent of CTRL-C !!
I don't agree here at all.
Since the system (that is: web server) has NO control at all of the user environment, your application must take loss of connection (for whatwever reason) in account. That _will_ require a great deal of program design FIRST, and SECOND a good deal of programming.
(You may contact me (at grootersnet dot nl) directly if I can be of any further help)
Willem
OpenVMS Developer & System Manager