- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- Re: DCL Command Buffer Overflow with 'a[n,n] := b'
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
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
тАО02-15-2006 09:22 PM
тАО02-15-2006 09:22 PM
$ DCF$'AREANAME'_RECORD['TEMP'] :== "''FIELD'"
Problem is, one of the field lengths is 400 characters, which blows the DCL limitation.
So, I tried doing :-
$ DCF$'AREANAME'_RECORD['TEMP'] == FIELD
....so that the translation is internal, but this gives :-
$ DCF$WEBR_RECORD[10,400] == FIELD
%DCL-W-IVCHAR, invalid numeric value - check for invalid digits
\ FIELD\
Can anyone think of a clever way to translate the field and store it in a record section, without having to use a literal?
Rob.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-15-2006 09:42 PM
тАО02-15-2006 09:42 PM
Re: DCL Command Buffer Overflow with 'a[n,n] := b'
Beginning to think it's an oversight by the engineers, from when they extended the DCL limits.
If the command string is greater than 254 characters, it fails :-
GAMNEW_ROB$ A = F$FAO("!229*X")
GAMNEW_ROB$ DCF$EMD_RECORD[51,400] :== "''A'"
GAMNEW_ROB$ A = F$FAO("!230*X")
GAMNEW_ROB$ DCF$EMD_RECORD[51,400] :== "''A'"
%DCL-W-BUFOVF, command buffer overflow - shorten expression or command line
\DCF$EMD_RECORD[51,400]:==XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
I am correct in thinking the DCL command line limit went to 1000 characters, or something similar on VMS 7.3-2?
Rob.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-15-2006 09:43 PM
тАО02-15-2006 09:43 PM
Re: DCL Command Buffer Overflow with 'a[n,n] := b'
perhaps you can store the elements in separate symbols and add them at the end, e.g.
- this doesn't work
$ b=f$fao("!500*X")
$ a[10,500]:="''b'"
%DCL-W-BUFOVF, command buffer overflow - shorten expression or command line
\A[10,500]:=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXX
- but
$ a=F$Fao("!10* ")
$ a=a+b
$ sh sym a
A = " XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
regards Kalle
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-15-2006 09:46 PM
тАО02-15-2006 09:46 PM
Re: DCL Command Buffer Overflow with 'a[n,n] := b'
I'd have to reconstruct the whole record from scratch every time I updated a single field.
Rob.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-15-2006 10:52 PM
тАО02-15-2006 10:52 PM
Re: DCL Command Buffer Overflow with 'a[n,n] := b'
for completeness: Which version / DCL patch level of VMS?
EDCL only came into VMS 7.3-2 by a DCL patch.
So before, this is entyrely to be expected, but after, I would call it a bug, of which Guy Peleg should be made aware.
Proost.
Have one on me.
jpe
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-15-2006 10:55 PM
тАО02-15-2006 10:55 PM
Re: DCL Command Buffer Overflow with 'a[n,n] := b'
- Embrace DATATRIEVE
- Document a 255 byte field length limitation for your tool, after estimating how much impact that woudl have. Offer workaround using multiple adjacent fields.
- Learn Pearl
- use a look-aside exception construction..
IF (F$TYPE(EXTENDED_'FIELDNAME')
THEN
$ DCF$'AREANAME'_RECORD['TEMP_PART_2'] :== F$EXTR(256,999,FIELD)
:
Hein.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-15-2006 10:58 PM
тАО02-15-2006 10:58 PM
Re: DCL Command Buffer Overflow with 'a[n,n] := b'
DEC AXPVMS VMS732_UPDATE V4.0 Patch Install 07-MAY-2005 09:11:18
Which contains DCL v2 I believe. I'll check out the latest versions of DCL to see if this has been corrected.
Any idea how I can email Guy?
Rob.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-15-2006 11:08 PM
тАО02-15-2006 11:08 PM
Re: DCL Command Buffer Overflow with 'a[n,n] := b'
ALPHA_ROB$$$ a[10,20] := f$ext(0,99,b)
ALPHA_ROB$$$ sh sym a
A = " F$EXT(0,99,B) "
Rob.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-15-2006 11:37 PM
тАО02-15-2006 11:37 PM
Re: DCL Command Buffer Overflow with 'a[n,n] := b'
It was just some handwaving to indicate a general direction, not to be used as exact example.
The implications of the := string assignment are intriuging (sp?) right?
Using = turns the [x,y] into a bitfield descriptor.
So it is back to the explicit substitution, with double-quote plus double single quote...
a[10,20] := f$ext(0,99,b)$ a[10,20] := "''f$ext(0,99,b)
$ show symb a
A = " TEST "
The other that is always fun about the = vs := assignments is how to get DCL help for it.
The intuitive $HELP = does not work of course as that looks too much like you are assigning something to the symbol help.
You have to go into interactive help, and then type in = (or := ) at the " Press RETURN to continue ... " prompt (or the "Topic? " prompt)
Hein.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-15-2006 11:55 PM
тАО02-15-2006 11:55 PM
Re: DCL Command Buffer Overflow with 'a[n,n] := b'
Hein already hinted at the solution:
VMS V7.3-2:
$ aaa = "abc"
$ xyz'aaa'[30,400]:="very long text"
$ sho sym xyzabc
XYZABC = "<30 spaces>very long text<386 spaces>"
Problem solved?
Proost.
Have one on me.
jpe
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-16-2006 12:13 AM
тАО02-16-2006 12:13 AM
Re: DCL Command Buffer Overflow with 'a[n,n] := b'
Rob.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-16-2006 01:01 AM
тАО02-16-2006 01:01 AM
Re: DCL Command Buffer Overflow with 'a[n,n] := b'
I've always got a reply from Guy using
dcl@hp.com
Kind Regards
John.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-16-2006 01:15 AM
тАО02-16-2006 01:15 AM
Re: DCL Command Buffer Overflow with 'a[n,n] := b'
SOMETHING is weird here!
My example is a litteral transcript from what I executed seconds before on our system.
$ field = "tekst"
$ temp = "10,400"
$ aaa = "xyz"
$ abc'aaa'def['temp']:="''field'"
$ show symb abc*
ABCXYZDEF = "<10 spaces>tekst<385 spaces>
For a better visibility, copy/paste the DCL above into any plain ASCII editor.
Points of attention:
- NO spaces between symbolname and [
- STRING assignment symbol MUST be := or :==;
= or == together with [ ] means integer assignment, with BIT specification between the [ ]
- right-hand-side of assignment MUST be between double "" , or it get compressed
- normal value substitution inside string, double ' to open, and single ' to close symbol substitution.
hth
Proost.
Have one on me.
jpe
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-16-2006 01:39 AM
тАО02-16-2006 01:39 AM
Re: DCL Command Buffer Overflow with 'a[n,n] := b'
Like Kalle I used to use constructs like: $ b=f$fao("!500*X") to generate a long string.
Now I may just switch to b[0,500]=" " when all I need is space.
And I may just start to use:
$del/sym b
$b[40,20] = text
To create 'aligned strings', starting with leading spaces and having a selected length.
Warning... as you are playing with this an other limitation you are likely to run into is documented under "help := parameter".
[offset,size] ... The value of the size plus the offset must not
exceed 769.
So if you only use this [] method to assign fields into a record, then you are stuck to 769 byte max record length, not 1024.
Hein.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-16-2006 01:44 AM
тАО02-16-2006 01:44 AM
Re: DCL Command Buffer Overflow with 'a[n,n] := b'
I'm sloppy.
I meant to use := assignments throughout the last reply.
Sorry for the clutter!
Better start brewing a pot of coffee, and use some, before I touch the keyboards again.
:-)
Hein.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-16-2006 02:03 AM
тАО02-16-2006 02:03 AM
Re: DCL Command Buffer Overflow with 'a[n,n] := b'
Warning... as you are playing with this an other limitation you are likely to run into is documented under "help := parameter".
[offset,size] ... The value of the size plus the offset must not
exceed 769.
I guess the HELP should be updated:
Changing TEMP in the example above to be "500,1400" results in a string with a length of 1900.
"2500,1400" => length 3900
Even "2500,2400" gives length 4900, but on showing the symbol I get %DCL-I-SYMTRUNC
But WRITE/SYMBOL SYS$OUTPUT still gives the full string.
Further testing: string length 7937 is still valid, 7938 gives DCL-W-INVRANGE
Proost.
Have one on me.
jpe
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-16-2006 02:30 AM
тАО02-16-2006 02:30 AM
Re: DCL Command Buffer Overflow with 'a[n,n] := b'
) does not go over the 255 character limit.
If you were to equate 'field' to a 300 character string, it would fail.
Rob.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-16-2006 05:23 AM
тАО02-16-2006 05:23 AM
Solution1. Extended DCL (aka EDCL) support shipped
with v7.3-2, no patch kits are required.
2. With EDCL, the length of the command line
increased from 255 characters to 4096. Using
hyphens the command may be expended up
to 8192 characters. Symbols are limited to
8192 characters.
3. OpenVMS V8.2 added support for large
tokens. Large tokens allows each token
on the command line to be 4000 characters
(tokens are limited to 255 characters
with V7.3-2).
Now to your question....you found a bug !
The command line limitations used
by DCL are constant in an SDL file. I found
one location where the limit is hardcoded
to 255. I changed it to use the symbolic
value and all is well....
Please file an official problem report
through your local support channel to
obtain the new image.
Thank you for finding this !
It is not everyday that someone finds
a bug in DCL (I'm talking about the CLI
not the related utilities). Come to
the bootcamp and I'll buy you a beer ;-)
Guy Peleg
OpenVMS Engineering
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-16-2006 07:45 AM
тАО02-16-2006 07:45 AM
Re: DCL Command Buffer Overflow with 'a[n,n] := b'
$ TEMP="10,200"
$ DCF$'AREANAME'_RECORD['TEMP']:== "''F$EXTRACT(0,200,FIELD)'"
$ TEMP="200,200"
$ DCF$'AREANAME'_RECORD['TEMP']:== "''F$EXTRACT(200,200,FIELD)'"
?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-24-2006 01:50 AM
тАО02-24-2006 01:50 AM
Re: DCL Command Buffer Overflow with 'a[n,n] := b'
In addition, there's also a similar bug with long symbol lengths in F$TYPE() which is being corrected (not sure if it's a good or bad month for me!).
Thanks for everyone's help on this.
Rob.