如何理解 client.mon 文件中提到的 Int-Proc 条目? [英] How to understand a Int-Proc entry, mentioned in client.mon file?

查看:49
本文介绍了如何理解 client.mon 文件中提到的 Int-Proc 条目?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试在 appBuilder 中打开 *.w 文件时,我正在处理一系列错误.我设法找到了该文件的先前版本,该版本可以正常打开,并且发现两个文件之间存在以下差异:

每个程序段信息---------------------------------文件段#Segments 总大小---- ------- --------- ----------Good_version.w...内部处理:19 1 26232...坏版本.w...内部处理:19 1 32712

如您所见,Int-Proc"数字 19 似乎是一个,超过了段大小(超过 32K),因此是导致问题的原因.

现在显而易见的问题是:我如何知道Int-Proc"的含义?19号?我的代码中有一些过程,但数量与Int-Proc"的总数不符.(非常天真:我在 client.mon 中有 38 个Int-Proc"条目,但在我的源代码中只有 21 个 End procedure. 条目.

编辑
在超过 32K 限制的情况下采取的措施是将过大的程序拆分成更小的部分.但是在Bad_version.wGood_version.w之间,好像一共扩展了5个程序,我想知道我需要拆分哪一个.

解决方案

免责声明:我从未使用过 AppBuilder.

还有:

I'm dealing with a list of errors while trying to open a *.w file in the appBuilder. I managed to find a previous version of that file, which opens fine, and I see following differences between both files:

Per procedure segment information
---------------------------------
    File  Segment  #Segments  Total-Size
    ----  -------  ---------  ----------
    Good_version.w
    ...
        Int-Proc: 19    1     26232
    ...        
    Bad_version.w
    ...
        Int-Proc: 19    1     32712

As you can see, "Int-Proc" number 19 seems to be the one, exceeding the segment size (above 32K) and hence is the one causing the problem.

Now the obvious question: how can I know the meaning of "Int-Proc" number 19? I have some procedures inside my code but the number does not correspond with the total number of "Int-Proc" (very naïvely: I have 38 "Int-Proc" entries in client.mon but only 21 End procedure. entries in my source code).

Edit
The action to take in case of exceeding 32K limit is splitting the procedure, which grows too large, into smaller pieces. However, between Bad_version.w and Good_version.w, it seems that in total 5 procedures have been expanded, and I'd like to know which one I need to split.

解决方案

Disclaimer: I have never used the AppBuilder.

client.mon is for r-code statistics, so I think that instead of .w there should be a .r there. The AppBuilder has a 32000 byte (= maximum size of a character variable) limit for internal procedures. 32000 new lines will also break the AppBuilder view, but compile to 0 bytes (or so).

I /thought/ the AppBuilder would complain about an internal procedure being too large upon selecting the procedure that is too large. If not you will need to get the /text/ content size of block of your .w between procedure and end procedure and you know which are your problem.

Something like:

def var lcw    as longchar  no-undo.
def var iprocs as integer   no-undo.
def var lcproc as longchar  no-undo.
def var cc     as character no-undo.
def var ic     as integer   no-undo.

cc = chr(1).

copy-lob from file "my.w" to lcw.

assign 
   lcw = replace( lcw, 'procedure ', cc )
   lcw = replace( lcw, 'end procedure', cc )
   iprocs = num-entries( lcw, cc )
   .

do ic = 1 to iprocs:

   lcproc = entry( ic, lcw, cc ).
   if length( lcproc ) > 31000 then
      message substring( lcproc, 1, 100 ) view-as alert-box.

end.

Intrigued by how the AppBuilder really complains:

  • started the AppBuilder
  • created a Smart Window
  • opened the first procedure section (it was a trigger)
  • added // some comment
  • saved the .w
  • opened the .w with Notepad++ and blew up // some comment to be larger than 32000 bytes

Opened .w with AppBuilder, endless errors. Quit.

-> Added -debugalert to my shortcut. On first error started debugger. Debugger tries to start, but does not (remember the hidden procedures post)

-> Added -zn to my shortcut. On first error started debugger. It starts. While I cannot see any source code since I have not extracted the source code pls, I can see and view all variable and buffers.

Since I had blown up a trigger, the error reported _trg. Viewing _trg:

And:

这篇关于如何理解 client.mon 文件中提到的 Int-Proc 条目?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆