[Info-vax] Port of PHP 5.3.10 for VMS about to be released (survey for features)

Mark Berryman mark at theberrymans.com
Thu Mar 8 15:29:05 EST 2012


I thought I'd do a port of 5.3.10 in order to get VMS up to date in the 
5.3 strain of PHP.  As part of this work, I'm looking to make a few 
additions to the OpenVMS extension.

Mark Daniel, he of WASD fame, wrote a DCLSymbol extension that allowed 
one to set and get DCL symbols from PHP.  This code has been folded into 
the OpenVMS extension with his kind permission.

I'd also like to add the ability to set and get logical names.  The 
question is: what is the best way to implement this?

One way is to copy the existing getdvi implementation:

getdvi = openvms_getdvi(item_code, device_name)
This allows one item code per call and returns the value of the item 
code, null if it is empty, and false (plus a warning) if the item_code 
doesn't exist.  The default device_name is TT.

So, choice 1:
trnlnm = openvms_trnlnm(logname, tabname, item_code);
with tabname and item_code being optional and the default item_code 
being LNM$_STRING.

Choice 2:
Duplicate the syntax of DCL.  This permits the full functionality of 
SYS$TRNLNM but is still one item code at a time.  All flags and items 
are specified and returned as strings.

Choice 3:
Duplicate the syntax of SYS$TRNLNM and have itmlst passed as a hash. 
The result would fill in the values of the items listed in the hash and 
the result returned by the call itself would simply be true or false.

The problem here is what is the best way to specify and return flags or 
constants (e.g. LNM$M_CASE_BLIND or PSL$C_SUPER).  PHP will not allow 
variable or constant names with a $ in them.  Some possibilities:

1. replace the $ with an _ and define them as constants
2. strip the prefix up through the _ and define the remainder as a 
constant (but this runs the risk of needing the same name for multiple 
values).
3. Pass and return them as strings.
4. Define a VMS super global with the needed values in it (e.g. 
$_VMS['LNM$M_CONCEALED']) that the programmer could retrieve and use as 
an integer.
5. Other thoughts?

I'm hoping to get some comments on this, or any other feature you'd like 
to see with PHP on VMS.

Mark Berryman

--- Posted via news://freenews.netfront.net/ - Complaints to news at netfront.net ---



More information about the Info-vax mailing list