Operating System - OpenVMS
1753797 Members
7387 Online
108800 Solutions
New Discussion юеВ

DCL Command Buffer Overflow with 'a[n,n] := b'

 
SOLVED
Go to solution
Robert Atkinson
Respected Contributor

DCL Command Buffer Overflow with 'a[n,n] := b'

I have a routine that builds up a record using field registers, like this :-

$ 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.
19 REPLIES 19
Robert Atkinson
Respected Contributor

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.
Karl Rohwedder
Honored Contributor

Re: DCL Command Buffer Overflow with 'a[n,n] := b'

Rob,
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
Robert Atkinson
Respected Contributor

Re: DCL Command Buffer Overflow with 'a[n,n] := b'

Because the utility is designed to work with individual fields within the record, that just wouldn't be feasable.

I'd have to reconstruct the whole record from scratch every time I updated a single field.

Rob.
Jan van den Ende
Honored Contributor

Re: DCL Command Buffer Overflow with 'a[n,n] := b'

Robert,

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
Don't rust yours pelled jacker to fine doll missed aches.
Hein van den Heuvel
Honored Contributor

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.

Robert Atkinson
Respected Contributor

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.
Robert Atkinson
Respected Contributor

Re: DCL Command Buffer Overflow with 'a[n,n] := b'

Last option won't work I'm afraid Hein :-

ALPHA_ROB$$$ a[10,20] := f$ext(0,99,b)
ALPHA_ROB$$$ sh sym a
A = " F$EXT(0,99,B) "

Rob.
Hein van den Heuvel
Honored Contributor

Re: DCL Command Buffer Overflow with 'a[n,n] := b'

Right.. sorry 'bout that. Just Cutting&Pasting.
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.
Jan van den Ende
Honored Contributor

Re: DCL Command Buffer Overflow with 'a[n,n] := b'

Yeah...

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
Don't rust yours pelled jacker to fine doll missed aches.