Operating System - OpenVMS
1753905 Members
9917 Online
108810 Solutions
New Discussion юеВ

DCL command buffer overflow

 
Wim Van den Wyngaert
Honored Contributor

DCL command buffer overflow

VMS 7.3

$ Read x x_rec
$ y=f$extr(0,10,x_rec)
DCL-W-BUFOV, command buffer overflow

x is a file with long records (1200 char).

How to get around this overflow ?

Wim
Wim
26 REPLIES 26
Karl Rohwedder
Honored Contributor

Re: DCL command buffer overflow

Seems to be on VAX :-)

You may try the EXTRACT (freeware CD) utility, gathering the output via the PIPE command:

$ pip extract sc:a.dat /col=(1:10) | (read sys$pipe a ; def/job test &A)
$ y = F$trnlnm("TEST")

or

write your own program.

regards Kalle

Wim Van den Wyngaert
Honored Contributor

Re: DCL command buffer overflow

No VAX but Alpha. No way getting around without installing stuff ?

BTW : I don't need the whole record, only the beginning and I prefer not to do a convert to truncate the file.

Wim
Wim
Volker Halle
Honored Contributor

Re: DCL command buffer overflow

Wim,

if you are ONLY interested in the first 10 bytes of each record, CONVERT/FDL=.../TRUNCATE to a temp file first, then process the temp file.

Or upgrade to V7.3-2 or higher to be able to use Extended DCL - but you know that ;-)

Volker.
Wim Van den Wyngaert
Honored Contributor

Re: DCL command buffer overflow

I tried this but no error and not working. Funny bug or feature.

>open/read x login.com
>read x xx
>sh symb xx
XX = "$ set nover"
>read x xx[0,10]
>sh symb xx
XX = "$ set nover"

(and there is only ser verify)

Wim
Wim
Robert Gezelter
Honored Contributor

Re: DCL command buffer overflow

Wim,

I do not believe that partial assignments to strings were supported in the DCL READ command (the HELP text is specific--"symbol-name").

The lack of a reported syntax error is certainly a bug (although I do not have the time to verify it, or its age).

- Bob Gezelter, http://www.rlgsc.com
John Gillings
Honored Contributor

Re: DCL command buffer overflow

Wim,

(sigh), Yes, DCL has limitations. That particular limitation was extended several years ago (>5) in EDCL, available in V7.3-2 and above (why are you still on V7.3? -2 is guaranteed to be binary compatible with all non-privileged code - it's a trivial upgrade, well tested and very well understood). Sorry, there are no valid excuses for running V7.3. I'll accept there are some arguments for V6.2 and V5.5-2, but NOT V7.3.

If you're not prepared to install a later version, then use a different programming language that doesn't have the same limitations. Even if you don't have any other compilers, for the specific issue here, (copy the first 10 characters of the first record in a file into a specific symbol), you could write a less than 20 line MACRO32 program which would work on any OpenVMS system, any version, any platform.

A crucible of informative mistakes
Wim Van den Wyngaert
Honored Contributor

Re: DCL command buffer overflow

John,

This is a bank and lots of money flows thru the VMS platform. No way to upgrade (already on lots of unsupported stuff of Sybase and Reuters, core people gone with the wind) unless you sign a document that you will pay for all the damages. But bring a large check in that case. And a very rich sponsor.

BTW : it's 7.3 not fully patched.

Wim
Wim
Ian Miller.
Honored Contributor

Re: DCL command buffer overflow

*insert usual stuff about risks of running unsupported versions versus risk of upgrading*

Follow the advice of JG and use another language. The version of DCL you are running has limits and you have hit one of them.
____________________
Purely Personal Opinion
Wim Van den Wyngaert
Honored Contributor

Re: DCL command buffer overflow

I went for the convert of the file before using it.
Wim