是否有免费的(如啤酒中的)COBOL 代码流程图生成器?

发布于 2024-08-28 21:46:24 字数 1539 浏览 10 评论 0原文

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(6

空心↖ 2024-09-04 21:46:24

我不羡慕你。在大多数情况下,手动跟踪 COBOL 程序相当简单(尽管很乏味)。我也遇到过同样的情况,最终还是手动完成了。无论如何,学习一门新语言总没有坏处,所以它也不是完全白费的。

查找短语“PROCEDURE DIVISION”并从那里开始。按照您遇到的任何“PERFORM”语句来跟踪逻辑。如果你最终没有自杀,你就会成为一个更好的人。

I don't envy you. For the most part, tracing through a COBOL program by hand is fairly straightforward (albeit tedious). I've been in the same situation, and ended up doing it by hand. It never hurts to learn a new language anyways, so it's not entirely in vain.

Look for the phrase "PROCEDURE DIVISION" and start there. Follow into any "PERFORM" statements you run into to trace the logic. If you don't end up killing yourself you'll come out a better person.

那请放手 2024-09-04 21:46:24

我用 python 编写了一个简单的 COBOL 流程图生成器,它使用 Graphiz。
这真的很简单,生成一个对我的目的有用的 .jpg 图表,也许对你来说不一样。

不管怎样,如果你愿意,你可以在这里给我发邮件 http://www.contactify.com/a6148 我会把我的小脚本发给你。如果你在 Linux 上,你几乎肯定已经安装了 python,在 Windows 上,你必须将它与 yapgvb 模块一起安装,

请告诉我!
再见

I've written a simple flow chart generator for COBOL in python, which uses Graphiz.
It's really trivial and generate a .jpg chart that is useful for my purposes, maybe it won't be the same for you.

Anyway, if you want you can send me a mail here http://www.contactify.com/a6148 and i'll send you my little script. If you're on linux you almost certainly have python installed, on windows you have to install it together with yapgvb module

Let me know!
Bye

神经大条 2024-09-04 21:46:24

COBOL 比 BNF 表示法更古老,不能使用任何 LR(k) 类型语法来描述。大多数流行的词法/解析策略不适用于这种语言(至少在没有大量深夜和家禽语言的情况下)。因此,高质量的 COBOL 解析器很难获得。那些现有的通常都卖得不少。

如果没有强大的、免费的解析器,你找到免费的(就像在语音中,忘了啤酒)COBOL 图表工具的机会是相当渺茫的。我遇到的一切(我在这里是出于慈善目的)都很弱。

构建自己的工具可能是一项艰巨的任务。查看COBOL 语法。 COBOL 是一门大语言,准备好做一些严肃的工作。

首先做一些严肃的数学计算:需要转换多少代码?摆脱 COBOL 值多少钱?如果无法提出合理的财务论证,那么就继续使用当前的 COBOL 应用程序吧。

如果您可以继续进行,那么您可以尝试将 OpenCobol 作为代码的起点分析/转换系统。但是,您需要熟悉 C 和 COBOL 才能完成这项工作。如果您使用 IBM COBOL 方言,并且可以访问 IBM 大型机编译器,那么请查看 ADATA 编译器选项,这将为您提供程序的 AST。这些是一些可能的起点。

另一种方法是获得商业 COBOL 转换/翻新产品。我对这些产品没有太多的个人经验,因此无法推荐任何一种产品。

如果数学不能很好地支持学习 COBOL 来进行转换,那么就使用现有的 COBOL 应用程序即可。您不会是第一个得出这个结论的人!

COBOL is older than BNF notation and cannot be described using any LR(k) type grammar. Most of the popular lexing/parsing strategies do not work for this language (at least not without a lot of late nights and fowl language). Consequently, quality parsers for COBOL are hard to come by. Those that exist generally command a pretty penny.

Without robust, freely available, parsers your chances of finding free (as in speech, forget beer) diagramming tools for COBOL are pretty slim. Everything I have come across is (I am being charitable here) pretty weak.

Building you own tools can be a daunting task. Have a look at COBOL Grammar. COBOL is a big language, be prepared to do some serious work.

First do some serious math: How much code needs to be converted? How much is it worth to get rid of COBOL? If a sound financial argument cannot be made, then just live with your current COBOL application.

If you can make a case to proceed, then you might try looking into OpenCobol as a starting point for your code analysis/conversion system. However, you will need to be up-to-seed on both C and COBOL to make this work. If you are working with an IBM COBOL dialect, and have access to an IBM mainframe compiler, then look into the ADATA compiler option, this will give you an AST of your program. These are some possible starting points.

The alternative is to obtain a commercial COBOL conversion/renovation product. I do not have much personal experience with these products and cannot recommend any particular one over another.

If the math doesn't support learning COBOL well enough to do the conversion, then just live with the existing COBOL application. You would not be the first person to come to this conclusion!

绮筵 2024-09-04 21:46:24

我也在寻找其中之一。

我目前正在编写 COBOL 程序,但项目经理想要图片,即使程序已经编写、测试和部署!

visustin 看起来不错,但需要相当长的时间来分析一些程序。可能是因为它们相当大。最小的也有3500+行。

我正在使用 COBOL74 在 UNISYS 大型机上工作,并且 vistustin 不理解 DMSII 的某些(任何)COBOL74 扩展,这也无济于事。

不管怎样,时间紧迫,所以我们只订购了一份。希望对于那些看不懂文字而需要以图表形式查看的人来说,它已经足够好了。

I'm looking for one of those as well.

I'm currently writing NEW COBOL programs but the project manager wants pictures even though the programs are written, tested and deployed!

The visustin thing looks good but takes quite a long time to analyze some of the programs. Probably due to them being rather large. The smallest is 3500+ lines.

It also doesn't help that I'm working on a UNiSYS mainframe using COBOL74, and vistustin doesn't understand some (any) of the COBOL74 extensions for DMSII.

Any how time is pressing so we've just ordered a copy. Hopefully it'll be good enough for those who can't read words and need to see it as diagrams.

年少掌心 2024-09-04 21:46:24

IBM 有一款名为 Asset Analyzer 的产品(目前它可能以 Rational Websphere Asset Analyzer 或类似名称进行营销)。

它将分析您的整个 Cobol 源代码库并帮助您重构并提供大量的程序理解报告。它实际上构建了一个网站,因此您可以根据自己的喜好在高或低级别上浏览您的程序逻辑。

IBM has a product called Asset Analyzer (these days it is probably being marketed as the Rational Websphere Asset Analyzer or some such).

It will analyze your entire library of Cobol source and help you refactor as well as give plenty of program understanding reporting. It actually builds out a website so you can surf your program logic at as high or low level as you like.

熊抱啵儿 2024-09-04 21:46:24

不,据我所知(40 年的经验),没有可靠的 COBOL 流程图工具。

与普遍看法相反,COBOL 程序可能是一件非常复杂的事情。

COBOL 的本质很简单,但 COBOL 的正确使用和逻辑却并非如此。

No, there is no reliable COBOL flowchart tool of which I am aware (40 years experience).

Contrary to common opinion a COBOL program can be a very complicated matter.

The essentials of COBOL are simplistic, the proper use and logic of COBOL is not.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文