Operating System - OpenVMS
cancel
Showing results for 
Search instead for 
Did you mean: 

Datatrieve w/ BASIC RTL extensions - SYSTEM-F-ACCVIO

 
SOLVED
Go to solution
Art Wiens
Respected Contributor

Datatrieve w/ BASIC RTL extensions - SYSTEM-F-ACCVIO

I have rebuilt Datatrieve v7.3 on our new VMS v8.3 Alpha to include the BAS$EDIT function. Invoking the function gives:

$ dtr
DATATRIEVE V7.3
Digital Query and Report System
Type HELP for help
DTR> print fn$bas_edit(" abc ",255)

FN$BAS
EDIT

%SYSTEM-F-ACCVIO, access violation, reason mask=00, virtual address=0000000021EF78F4, PC=0000000000000016, PS=00000000

On the current system it works properly:

$ dtr
DEC DATATRIEVE V7.2
Digital Query and Report System
Type HELP for help
DTR> print fn$bas_edit(" abc ",255)

FN$BAS
EDIT

ABC

The DTR function is copied from the working one:

$DTR$FUN_DEF FN$BAS_EDIT, BAS$EDIT, 3
$DTR$FUN_OUT_ARG TYPE = FUN$K_STATUS
$DTR$FUN_IN_ARG TYPE = FUN$K_TEXT , OUT_PUT = TRUE
$DTR$FUN_IN_ARG TYPE = FUN$K_DESC, DTYPE = DSC$K_DTYPE_T, ORDER = 1
$DTR$FUN_IN_ARG TYPE = FUN$K_VALUE, DTYPE = DSC$K_DTYPE_L, ORDER = 2
$DTR$FUN_END_DEF

The DTRBLD procedure completes successfully, the new executables are installed as on the old system.

Any help would be appreciated.

Cheers,
Art
9 REPLIES 9
Art Wiens
Respected Contributor

Re: Datatrieve w/ BASIC RTL extensions - SYSTEM-F-ACCVIO

Other RTL functions work eg:

$DTR$FUN_DEF FN$SCG_ASCII, LIB$ICHAR, 1
$DTR$FUN_HEADER HDR = <"Ascii"/"Value">
$DTR$FUN_EDIT_STRING ^\ZZ9\
$DTR$FUN_OUT_ARG TYPE = FUN$K_VALUE, DTYPE = DSC$K_DTYPE_L
$DTR$FUN_IN_ARG TYPE = FUN$K_DESC, DTYPE = DSC$K_DTYPE_T, ORDER = 1
$DTR$FUN_END_DEF

DTR> print FN$SCG_ASCII("a")

Ascii
Value

97

Art
Hein van den Heuvel
Honored Contributor

Re: Datatrieve w/ BASIC RTL extensions - SYSTEM-F-ACCVIO

Hello Art,

I've used BAS$EDIT ages ago, but not with DTR 7.3. Maybe I'll try.

Our friend Bart Lederman wrote an example for it which you can find for example here:
http://wwwvms.mppmu.mpg.de/vmssig/src/C/bas$edit.txt
The defintion Bart uses is a little more explicit. For example it mentions $DTR$FUN_NOOPTIMIZE

(I agree, you should never optimize FUN, Fun should be accepted and enjoyed as it comes :-)

Can you run with the debugger, set module to the share, set breakpoint on BAS$EDIT, verify the arguments on entry and exit?

fwiw,
Hein.



Art Wiens
Respected Contributor

Re: Datatrieve w/ BASIC RTL extensions - SYSTEM-F-ACCVIO

I guess you're suggesting I rebuild DTR with the /DEBUG switch on the LINK command(s)? It's not linked with DEBUG by default.

Art
Art Wiens
Respected Contributor

Re: Datatrieve w/ BASIC RTL extensions - SYSTEM-F-ACCVIO

I've linked DTR with /MAP and /DEBUG. I'm a little lost at this point as to how to go about setting the breakpoint to be when the BAS$EDIT function is called and what do I look at to see the variables on entry and exit as you say? The only "test" I know to produce this error is with the print statement in DTR ie. I have no access to a "program" that might be doing this.

Did I mention I'm not a programmer? ;-)

Cheers,
Art

ps. should you really have more than an optimal amount of fun? Isn't that how heart attacks happen? ;-)
Hein van den Heuvel
Honored Contributor
Solution

Re: Datatrieve w/ BASIC RTL extensions - SYSTEM-F-ACCVIO


I talked to Art.
He also upgraded BASIC from 1.3 to 1.6 when upgrading DTR.

With that BAS$EDIT becomes DBASIC$EDIT
This should be resolved in DEC$BASRTL.EXE

So I recommend moving forward replacing all BAS$xxxxx funtions used by the corresponding DBASIC$ in DTRFND.MAR.
Compile, replact in DTRFUN.OLB
Cleans the DTRBLD.COM from BASRTL*_TV references and add the line
cluster=basrtl,,,sys$common:[syslib]dec$basrtl.exe/shareable
Put that right after FDVSHR.
That's where I put it in a test, and it worked.

Rebuid

Note: I reduced DTRBLD.COM to just the DTRSHR link command, with output to a private directory at first.

Define a logical to a bad name and see $DATA fail, just to be sure.
Then define to the new executable and try it!

Good Luck!
Hein.