What is a good substitute for DSPF with physical files that contain nulls?

戏子无情 提交于 2020-06-18 16:49:06

问题


I have found that the command DSPF (Display Physical file) does not correctly display records that contain a null. If I define a physical file in DDS with the ALWNULL keyword on a field, then fill the file with data, DSPF will correctly display the data for records without nulls, but all records that contain at least one null will display only blanks in both the null and the non-null fields.

This can be misleading. For example in the screenshot below, the seemingly blank records have data in most of their fields with null only in the date. It displays as blanks in character mode and as zeros in hex mode, not indicating what the real values stored in the physical file are.

Is there a different system command or freely available utility that shows what the data really is? I have found DSPF to be quite useful in debugging and would like to be able to see what the characters and hex values (especially for packed decimals) really are. I could use SQL to see the data, but sometimes it is better to get a raw dump, especially if you are using RPG statements like SETLL or CHAIN and don't want to be misled by SQL ordering.


回答1:


DSPPFM shows the data for fields that aren't null, and it shows the default value for any fields that are null, usually blanks or zeros, but you can set a different default value when you create the file.




回答2:


SQL...

SQL doesn't have an ordering unless you give it one. So if you want to see data in the order that an RPG RLA program would be using it, specify 'ORDER BY KEY1, KEY2'

There are other commercial options, such as ProData's DBU utility. But SQL is your best bet.



来源:https://stackoverflow.com/questions/47781704/what-is-a-good-substitute-for-dspf-with-physical-files-that-contain-nulls

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!