1

我在 d3 pick basic 中有一个文件变量,我试图找出它对应的文件。

我尝试了显而易见的事情:

print f *suppose the file variable's name is f in this case

但这没有用,因为:

SELECTION: 58[B34] in program "FILEPRINTER", Line 7:  File variable used 
where string expression expected.

我也尝试过这样的事情:

list f *didn't compile
execute list dict f *same error
execute list f *same error

但那些也没有用。

如果有人想知道,我首先尝试这样做的原因是在我正在使用的代码库中上下传递了一个全局变量,但我找不到全局变量在哪里变量从中获取其值。

4

1 回答 1

0

That file pointer variable is called a "file descriptor". You can't get any information from it.

You can use the file-of-files to log Write events, and after a Write is performed by the code, check to see what file was updated. The details for doing this would be a bit cumbersome. You really should rely on the Value-Add Reseller or contract with competent assistance for this.

If this is not a live end-user system, you can also modify an item getting written with some very unique text like "WHAT!FILE!IS!THIS?". Then you can do a Search-System command to search the entire account (or system) to find that text. See docs for proper use of that command.

This is probably the best option... Inject the following:

IF @USER = "CRISZ" THEN ; * substitute your user ID
  READU FOO FROM F,"BLAH" ELSE
    DEBUG
    RELEASE F,"BLAH"
  END
END

That code will stop only for one person - for everyone else it will flow as normal. When it does stop, use the LIST-LOCKS command to see which file has a read lock for item "BLAH". That's your file! Don't forget to remove and recompile the code. Note that recompiling code while users are actively using it results in aborts. It's best to do this kind of thing after hours or on a test system.

If you can't modify the code like that, diagnostics like this can be difficult. If the above suggestions don't help, I think this challenge might be beyond your personal level of experience yet and recommend you get some help.

If suggestion here Does help, please flag this as the answer. :)

于 2014-06-16T19:32:08.640 回答