问题描述
我正在使用实用程序vutil将一些COBOL dat文件转换为ASCII:
vutil -extract input.dat> output.txt
我无法从COMP数据字段中获得人类可读的响应。
这是我的FD文件的一部分
05 FAT-TIPOFT图片9(4)。
05 FAT-DINI PIC 9(8)。
05 FAT-DFIN图片9(8)。
05 FAT-IMPON PIC S9(7)V99 COMP。
05 FAT-INPS PIC99。
05 FAT-IMPINPS PIC S9(7)V99 COMP.。
05 FAT-IVA PIC99。
这是一个ASCII转换示例:
0107200230062003,p00 20³°6 00 6
该转换仅适用于NON-COMP字段
是否有其他命令或替代实用程序或技术来转换COMP字段?
注意,我不想进入Cobol世界,我只想转换数据并摆脱它!
可能的解决方案:
-
您可能不想写Cobol程序,对于一个文件,它可能是最快&最便宜的解决方案。
-
有许多声称可以读取Acu Cobol文件的商业软件包,尽管可能很昂贵。
-
对于此文件,您可以查看
在RecordEditor lib目录中,有一个JRecord.properties用于定义Cobol方言。
I'm converting some COBOL dat file to ASCII using utility vutil:
vutil -extract input.dat > output.txt
I can't get a human readable response from COMP data fields.Here's is part of my FD file
05 FAT-TIPOFT PIC 9(4). 05 FAT-DINI PIC 9(8). 05 FAT-DFIN PIC 9(8). 05 FAT-IMPON PIC S9(7)V99 COMP. 05 FAT-INPS PIC 99. 05 FAT-IMPINPS PIC S9(7)V99 COMP. 05 FAT-IVA PIC 99.
And here an ASCII convertion example:
0107200230062003 ‚p00 20 ³° 6 00 6
The convertion is fine only for the NON-COMP fields
Is there any additional command or alternative utility or technique to convert COMP fields?
Note I don't want to enter into Cobol world, I just want to convert data and get rid of it!
解决方案Possible solutions:
You may not want to write a Cobol program, for one file, it will probably be the quickest & cheapest solution.
There are various commercial packages that claim to read Acu Cobol files, probably expensive though.
For this file, you could look at the RecordEditor, with a bit of fiddling you might (and I do mean might) get it work. For this Cobol-Copybook try importing it as a Mainframe or Open-Cobol copybook. I suspect Open-?Cobol Microfocus might be better. (Note: I am the author of the RecordEditor)
I think data might be, with out the binary file and the original data, I can not be sure.
The first 16 bytes in the supplied data look like 2 dates, so I have aligned with FAT-DINI/FAT-DFIN, this is just a guess though:
0107200230062003 ‚p00 20 22223333333333333333008733000033 00000107200230062003002000000020
in The recordEditor I get:
In the RecordEditor lib directory, there is a JRecord.properties for "defining Cobol dialects".
这篇关于将cobol COMP数据转换为ASCII的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!