phweb question specific to vms

Chris Sharman chris.sharman@ccagroup.co.uk
Fri, 02 Jul 2004 15:45:52 +0100


daniel.miller@nightfreight.co.uk wrote:

> hello all,
> 
> my situation is as follows:
> 
> 	Phweb screen A creates a unique physical rms indexed file with "run command" and then sets a 	process level logical with "setsystemval" that points the open name of a file in the dictionary to it. 	The screen is then able to put data into that file and pass the file name to screen B as a parameter, 	its a hidden field on the page. This is all in one procedure, which deassigns the logical with 	deletesystemval before finishing.
> 
> 	Phweb screen B then sets a logical to the passed filename and then reads the data from this file.
> 	It then does a deletesytemval before finishing.
> 
> The idea is each person who uses the website gets a unique temporary file with only their data which are cleared off the system after a couple of days.  Id prefer this to one big indexed file which all website users would have to access which i guess would need to be cleared daily or some such.
> 
> However this technique only works the first time, in subsequent uses of the page it keeps picking up data from previous uses.  It appears that with all the subprocesses with the dispatcher and phwebservers the logical is still assigned somewhere.  Similiar to with dcl subprocesses for run commands etc in normal ph.

How exactly do you 'create a unique file' - most webservers reuse 
processes, so if you use the process id, it won't be unique.
Show us the code that generates the unique name/file, please.

Given the propensity of web browsers to quit mid-transaction, you'd 
probably better call deletesystemval on entry too, in case there's some 
old, undeleted context.

I'd question the idea that every user needs a unique file, too, unless 
your user data size approaches or exceeds 32k: if you've got very large 
numbers of these users, you're going to finish up with a very large 
directory (which VMS can struggle with), and a lot of wasted space in 
partially filled clusters.
Having one file, and giving each user a unique record in it with a 
timestamp, will probably work better for smallish record sizes, and will 
do away with the "run command", which incurs the significant overhead of 
a process creation in VMS.

Chris


-----------------------------------------------------------------------

Any views expressed in this message are those of the sender and not
necessarily those of CCA Group.  The unauthorized use, disclosure,
copying or alteration of this message is forbidden.  The contents of
this message may be confidential and/or privileged, copyright CCA Group
and are intended solely for the use of the individual or entity to whom
they are addressed.  Whilst this message has been scanned, CCA Group
cannot guarantee that it is virus free or compatible with your systems
and accepts no responsibility for any loss or damage arising from its
use. The recipient is advised to run their own anti-virus software. If
you receive this message in error please contact
postmaster@ccagroup.co.uk immediately, destroy any copies and delete it
from your computer systems.